{% extends 'allianceauth/base.html' %}
{% load i18n %}
{% block page_title %}{% trans "Corporation Member Data" %}{% endblock %}
{% block content %}
    <div class="col-lg-12">
        <h1 class="page-header text-center">{% trans "Corporation Member Data" %}</h1>
        <div class="col-lg-10 col-lg-offset-1 container">
            <nav class="navbar navbar-default">
                <div class="container-fluid">
                    <ul class="nav navbar-nav">
                        {% if available_corps %}
                            <li class="dropdown">
                                <a href="#" id="dLabel" class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">{% trans "Corporations" %}<span class="caret"></span></a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                    {% for corpstat in available_corps %}
                                        <li>
                                            <a href="{% url 'corpstat:view_corp' corpstat.corp.corporation_id %}">{{ corpstat.corp.corporation_name }}</a>
                                        </li>
                                    {% endfor %}
                                </ul>
                            </li>
                        {% endif %}
                        {% if available_alliances %}
                            <li class="dropdown">
                                <a href="#" id="dLabel2" class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">{% trans "Alliances" %}<span class="caret"></span></a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel2">
                                    {% for alliance_id, alliance_name in available_alliances.items %}
                                        <li>
                                            <a href="{% url 'corpstat:view_alliance' alliance_id %}">{{ alliance_name }}</a>
                                        </li>
                                    {% endfor %}
                                </ul>
                            </li>
                        {% endif %}
                        {% if perms.corputils.add_corpstats %}
                            <li>
                                <a href="{% url 'corpstat:add' %}">{% trans "Add" %}</a>
                            </li>
                        {% endif %}
                    </ul>
                    <form class="navbar-form navbar-right" role="search" action="{% url 'corpstat:search' %}" method="GET">
                        <div class="form-group">
                            <input type="text" class="form-control" name="search_string" placeholder="{% if search_string %}{{ search_string }}{% else %}{% trans "Search all corporations..." %}{% endif %}">
                        </div>
                    </form>
                </div>
            </nav>
            {% block member_data %}{% endblock %}
        </div>
    </div>
{% endblock %}