{% extends "template.html" %}{% load i18n wger_extras django_bootstrap_breadcrumbs %}
{% block template %}
{% if show_shariff %}
    {% include 'misc/fragments/shariff_modal.html' %}
{% endif %}


{% if trainer_identity %}
<div class="alert alert-info" style="margin-top: 1em;">
    {% blocktrans with current_user=user|format_username %}You are
browsing the site as the user "{{current_user}}", all actions are performed on his data.
    {% endblocktrans %}
    <a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">
        {% blocktrans with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktrans %}
    </a>
</div>
{% endif %}

{% if show_shariff %}
    <button type="button"
            class="btn btn-default btn-xs pull-right"
            data-toggle="modal"
            data-target="#shariffModal"
            style="margin-top: 0.5em;">
        <span class="glyphicon glyphicon-retweet"></span>
        {%  trans "Share" %}
    </button>
{% endif %}


<h2 id="page-title" class="page-header">
    {% block title %}{% endblock %}
</h2>

<div class="row">
    <div class="col-sm-8" id="main-content">
        {% if messages and not no_messages %}
            {% for message in messages %}
                <div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">
                <a href="#" class="close extra-bold" data-dismiss="alert">&times;</a>
                {{message}}
                </div>
            {% endfor %}
        {% endif %}

        {% render_breadcrumbs "django_bootstrap_breadcrumbs/bootstrap3.html" %}

        <div id="content">
        {% block content %}{% endblock %}
        </div>
    </div>
    <div class="col-sm-4" id="main-sidebar">
        {% block sidebar %}
        {% endblock %}
    </div>
</div>
{% endblock %}
