<script>$('body').removeClass().addClass('logout-warning')</script>
<h1>
    <p>{% now "h:i A" %}</p>
    You're now logged out of the {{ area }}, {{ badge_user.first_name }}.
</h1>
<audio src="{% url 'media' 'warning.mp3' %}" autoplay></audio>
<h2>
    {% if tools_in_use %}
        <p>You are currently still logged in to the following tools:</p>
        <ul>
            {% for usage_event in tools_in_use %}<li>{{ usage_event.tool.name }}</li>{% endfor %}
        </ul>
    {% endif %}
    {% if staff_charge %}
        <br>
        <p>You are currently still charging staff time to:</p>
        <ul>
            <li>{{ staff_charge.customer }} for project {{ staff_charge.project }}</li>
        </ul>
    {% endif %}
</h2>
{% if door.areas.count != 1 %}
    <div class="alert alert-warning clearfix" style="margin-top: 55px;">
        <h3 class="" style="margin-bottom: 0">Would you like to log into another area?</h3>
        <p>
            <button role="button"
                    class="btn btn-default btn-lg btn-block btn-extra-large"
                    onclick="revert_to_default_content()">
                Exit (<span class="countdown">15</span>)
            </button>
        </p>
        {% for other_area in door.areas.all %}
            {% if other_area != area %}
                <p>
                    <button type="button"
                            class="btn btn-success btn-lg btn-block btn-extra-large"
                            onclick="enter_area('{{ badge_user.badge_number }}', undefined, {{ other_area.id }})">
                        Login to the {{ other_area.name }}
                    </button>
                </p>
            {% endif %}
        {% endfor %}
    </div>
{% endif %}
<script>revert(15);</script>
