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

{% load static %}
{% load bootstrap %}
{% load i18n %}
{% load discourse_username %}

{% block inside_content %}
<div class="container-fluid">
    <div class="row">
        {% include "membertools/partials/app_status_banner.html" with application=app %}
    </div>
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Application Details" %}</div>
            {% include "membertools/partials/appdetails_app.html" with application=app %}
        </div>
        {% if app.status != app.STATUS_ACCEPT and app.status != app.STATUS_REJECT %}
        <div class="panel panel-primary clearfix">
            <div class="panel-heading">{% translate "Required Steps" %}</div>
            {% include "membertools/partials/checks_app.html" %}
        </div>
        {% endif %}
        <div class="panel panel-primary">
            <div class="panel-heading">{% translate "Characters" %}</div>
            <table class="table">
                <tr>
                    <th class="text-center"></th>
                    <th class="text-center">{% translate "Name" %}</th>
                    <th class="text-center">{% translate "Corp" %}</th>
                    <th class="text-center">{% translate "Alliance" %}</th>
                </tr>
                {% for char in app.characters %}
                    <tr>
                        <td class="text-center">
                            <img class="ra-avatar img-responsive img-circle" src="{{ char.portrait_url_32 }}">
                        </td>
                        <td class="text-center">{{ char.character_name }}{% if app.main_character and char == app.main_character %} <span class="label label-primary">Main</span>{% endif %}</td>
                        <td class="text-center">{{ char.corporation_name }}</td>
                        <td class="text-center">{{ char.alliance_name }}</td>
                    </tr>
                {% endfor %}
            </table>
        </div>
    </div>
    <div class="row">
        <div class="panel panel-primary">
            <div class="panel-heading">Responses</div>
            <div class="panel-body">
                <dl class="app-responses">
        {% for response in responses %}
                    <dt>{{ response.question.title }}</dt>
                    <dd>{{ response.answer|linebreaksbr }}</dd>
        {% endfor %}
                </dl>
            </div>
        </div>
    </div>
</div>
{% endblock %}
