<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/jpeg" href="{{ static('img/favicon.jpg') }}">
<link href="{{ static('css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ static('css/bootstrap-theme.min.css') }}" rel="stylesheet">
<link href="{{ static('css/bootstrap-table-responsive.css') }}" rel="stylesheet">
<link href="{{ static('css/bootstrap-datetimepicker.min.css') }}" rel="stylesheet">
<link href="{{ static('css/bootstrap-dialog.css') }}" rel="stylesheet">
<link href="{{ static('css/ladda-themeless.min.css') }}" rel="stylesheet">
<link href="{{ static('css/front/common.css') }}" rel="stylesheet">
{% block top_styles %}
{% endblock top_styles %}
<!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{# @note: jQuery is loaded at top, otherwise django-smart-selects inline scripts will fail. #}
<script src="{{ static('js/jquery.min.js') }}"></script>
{% block head %}
{% endblock head %}
</head>
<body>
    {% block body %}
    {# @note: bootstrap.dialog is used instead of server-generated bootstrap modal. #}
    {# bs_modal('alert_modal', 'Message', [{'dismiss': 'modal', 'name': 'modal_close', 'text': 'Ok'}]) #}
    <header class="col-md-2">
        <nav class="navbar navbar-default" role="navigation">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav nav-pills nav-stacked nav-main">
                    {% block mainmenu %}
                    <li>
                        <a href="/{# url('home') #}">
                            <span class="glyphicon glyphicon-home"></span> В начало
                        </a>
                    </li>
                    {% endblock mainmenu %}
                </ul>
            </div>
        </nav>
    </header>
    <main class="col-md-10">
        <div class="container">
            {% if messages %}
            <div class="messages">
                {% for message in messages %}
                    {% set msg_class='alert alert-danger' %}
                    {% if message.tags %}
                        {% set msg_class = add_css_classes(msg_class, message.tags) %}
                    {% endif %}
                <div class="{{ msg_class}}">
                    <a class="close" data-dismiss="alert">&times;</a>
                        {{ message }}
                </div>
                {% endfor %}
            </div>
            {% endif %}
            {% block main %}
            {% endblock main %}
        </div>
    </main>
    {% endblock body %}
    <script src="{{ static('js/underscore-min.js') }}"></script>
    <script src="{{ static('js/sprintf.min.js') }}"></script>
    <script src="{{ static('js/js.cookie.js') }}"></script>
    <script src="{{ url('django.views.i18n.javascript_catalog') }}"></script>
    <script src="{{ static('js/knockout-3.3.0.js') }}"></script>
    <script src="{{ static('js/jquery.form.min.js') }}"></script>
    <script src="{{ static('js/moment-with-locales.min.js') }}"></script>
    <script src="{{ static('js/bootstrap.min.js') }}"></script>
    <script src="{{ static('js/bootstrap-dialog.min.js') }}"></script>
    <script src="{{ static('js/bootstrap-datetimepicker.min.js') }}"></script>
    <script src="{{ static('js/spin.min.js') }}"></script>
    <script src="{{ static('js/ladda.min.js') }}"></script>
    <script src="{{ static('js/front/plugins.js') }}"></script>
    <script src="{{ static('js/front/app.js') }}"></script>
    <script language="JavaScript">
        App.conf = {{ client_conf|escapejs(True) }};
        App.clientData = {{ client_data|escapejs(True) }};
    </script>
    <script src="{{ static('js/front/button-popover.js') }}"></script>
    <script src="{{ static('js/front/tooltips.js') }}"></script>
    {% block bottom_scripts %}
    {% endblock bottom_scripts %}
</body>
</html>
