{% load i18n %}
{% load static %}
{% load evelinks %}

<!-- Sidebar panel-->
<div class="panel panel-default">
    <div class="panel-heading">Characters</div>
    <div class="panel-body">
        <ul class="sidebar_characters">
            {% for character in all_characters %}
                {% if character.memberaudit_character_pk and character.has_access%}
                    <li class="sidebar_character character-{{ character.memberaudit_character_pk }}{% if auth_character.character_name == character.character_name %} active{% endif %}">
                        <a href="{% url 'memberaudit:character_viewer' character.memberaudit_character_pk %}">
                            {% include "memberaudit/partials/character_viewer/sidebar_character.html" %}
                        </a>
                    </li>
                {% else %}
                    <li class="sidebar_character_disabled">
                        {% include "memberaudit/partials/character_viewer/sidebar_character.html" %}&nbsp;
                        <i class="fas fa-exclamation-triangle text-muted" title="Unregistered character"></i>
                    </li>
                {% endif %}
            {% empty %}
                <li class="sidebar_character_disabled"><span class="text-muted">(orphan)</span></li>
            {% endfor %}
        </ul>
    </div>
</div>
