{% extends "membertools_admin/base.html" %}

{% load static %}
{% load bootstrap %}
{% load i18n %}
{% load humanize %}

{% block inside_content %}
<div class="container-fluid">
    <div class="row">
        <div class="panel panel-primary clearfix">
            <div class="panel-heading">{% translate "Character Details" %}</div>
            <div class="panel-body">
            {% include "membertools_admin/partials/character_detail.html" %}
            </div>
        </div>
    </div>
    {% if char_detail.member %}
    <div class="row">
        <div class="panel panel-primary clearfix">
            <div class="panel-heading">{% translate "Member Details" %}</div>
            <div class="panel-body">
            {% include "membertools_admin/partials/member_detail.html" with member=char_detail.member %}
            </div>
        </div>
    </div>
    {% endif %}
    <div class="row">
        <div class="panel panel-primary clearfix">
            <div class="panel-heading">{% translate "Required Steps" %}</div>
            {% include "membertools_admin/partials/checks_table.html" %}
        </div>
    </div>
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Characters" %}</div>
            <div class="panel-body">
            {% include "membertools_admin/partials/characters_table.html" with current_character=char_detail.eve_character main_character=char_detail.main_character %}
            </div>
        </div>
    </div>
    {% if perms.membertools.application_admin_access %}
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Applications" %}</div>
            <div class="panel-body">
            {% include "membertools_admin/partials/app_list.html" %}
            </div>
        </div>
    </div>
    {% endif %}
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Actions" %}</div>
            <div class="panel-body text-center">
            {% if perms.membertools.view_comment and perms.membertools.add_comment %}
                <button id="add-comment-button" type="button" class="btn btn-primary">{% translate "Comment" %}</button>
            {% endif %}
                <a href="{% url 'membertools_admin:char_detail_memberaudit_update' char_detail.id %}" class="btn btn-primary">Update MA</a>
            </div>
        </div>
    </div>

    {% if comments and perms.membertools.view_comment %}
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Comments" %}</div>
            <div class="panel-body">
            {% include "membertools_admin/partials/comments_list.html" %}
            </div>
        </div>
    </div>
    {% endif %}
    {% if perms.membertools.add_comment and not edit_comment %}
    <div class="row panel panel-primary add-comment-panel" id="add-comment-panel">
        <div class="panel-heading">
            {% translate "Add Comment" %}
            <button type="button" class="close" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
        <div class="panel-body">
            <form class="form-signin" role="form" method="POST" action="{% url 'membertools_admin:char_detail_comment_create' char_detail.id %}">
                {% csrf_token %}
                {% include "membertools_admin/partials/comment_form.html" %}
            </form>
        </div>
    </div>
    {% endif %}
</div>
{% endblock %}
{% block search_box %}
{% include "membertools_admin/partials/search_form.html" %}
{% endblock %}
