{% extends "allianceauth/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block page_title %}{% trans "Fatlink view" %}{% endblock page_title %}

{% block content %}
    <div class="col-lg-12">
        <h1 class="page-header text-center">{% trans "Edit fatlink" %} "{{ fatlink }}"
            <div class="text-right">
                <form>
                    <button type="submit" onclick="return confirm('Are you sure?')" class="btn btn-danger" name="deletefat" value="True">
                        {% trans "Delete fat" %}
                    </button>
                </form>
            </div>
        </h1>
        <div class="panel panel-default">
            <div class="panel-heading">{% trans "Registered characters" %}</div>
            <div class="panel-body">
                <table class="table table-responsive table-hover">
                    <tr>
                        <th class="text-center">{% trans "User" %}</th>
                        <th class="text-center">{% trans "Character" %}</th>
                        <th class="text-center">{% trans "System" %}</th>
                        <th class="text-center">{% trans "Ship" %}</th>
                        <th class="text-center">{% trans "Eve Time" %}</th>
                        <th></th>
                    </tr>
                    {% for fat in registered_fats %}
                        <tr>
                            <td class="text-center">{{ fat.user }}</td>
                            <td class="text-center">{{ fat.character.character_name }}</td>
                            {%  if fat.station != "No Station" %}
                                <td class="text-center">{% blocktrans %}Docked in {% endblocktrans %}{{ fat.system }}</td>
                            {% else %}
                                <td class="text-center">{{ fat.system }}</td>
                            {% endif %}
                            <td class="text-center">{{ fat.shiptype }}</td>
                            <td class="text-center">{{ fat.fatlink.fatdatetime }}</td>
                            <td class="text-center">
                                <form>
                                    <button type="submit" class="btn btn-warning" name="removechar" value="{{ fat.character.character_id }}">
                                        <span class="glyphicon glyphicon-remove"></span>
                                    </button>
                                </form>
                            </td>
                        </tr>
                    {% endfor %}
                </table>
            </div>
        </div>
    </div>
{% endblock content %}
