{% load i18n %}
{% load static %}
{% load staticfiles %}
<link rel="stylesheet" href="{% static "css/footer.css" %}">

<footer class="footer">
    <div class="container">
        <div class="d-flex align-items-center justify-content-end">
            <div class="p-2">
                <span><i class="fa fa-copyright"></i>{% trans "Aalto-yliopiston Sähköinsinöörikilta ry" %} {% now 'Y' %}</span>
            </div>
            <div class="p-2">
                <form class="lang-form form" action="{% url 'set_language' %}" method="post">{% csrf_token %}
                    <span class="form-group">
                        <input name="next" type="hidden" value="{{ redirect_to }}" />
                        <select onchange="this.form.submit()" class="lang-select form-control" name="language">
                            {% get_current_language as LANGUAGE_CODE %}
                            {% get_available_languages as LANGUAGES %}
                            {% get_language_info_list for LANGUAGES as languages %}
                            {% for language in languages %}
                            <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
                                {{ language.name_local }} ({{ language.code }})
                            </option>
                            {% endfor %}
                        </select>
                    </span>
                </form>
            </div>
            <div class="ml-auto p-2">
                <span class="nav-item">
                    <a href="/members"><i class="fa fa-group fa-2x"></i></a>
                </span>
                <span class="nav-item">
                    <a href="/infoscreen"><i class="fa fa-info fa-2x"></i></a>
                </span>
                <span class="nav-item">
                    <a href="/admin"><i class="fa fa-gears fa-2x"></i></a>
                </span>
            </div>
        </div>

    </div>
</footer>
