{% load menu static i18n %}
<!DOCTYPE HTML>
<html lang="en">
	<head>
		<title>{% block title %}{{ page_title | capfirst }}{% endblock %}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		{% block head %}{% endblock %}
	</head>
	<body>
		{% block body %}
			{% block sticky-flash %}
				<div id="sticky-flash" class="flash">
					{% block user-takeover %}
						{% if request.user.is_authenticated and request.token and request.token.active_takeover.user.pk == request.user.pk %}
							<div class="flash-msg alert alert-error"><span class="msg-text">{{ request.user }} {% trans 'is not your account. Be carefull!' %}</span></div>
						{% endif %}
					{% endblock %}
					{% if messages %}
						{% for message in messages %}
							<div{% if message.tags %} class="flash-msg alert alert-{{ message.tags }}"{% endif %}><span class="msg-text">{{ message }}</span></div>
						{% endfor %}
					{% endif %}
				</div>
			{% endblock %}
			{% block menu %}
				{% if request.user.is_authenticated %}
					{% block left-menu %}
						{% menu 'IS' %}
					{% endblock %}
				{% endif %}
			{% endblock %}
			{% block middle %}
              <div id="page-content-wrapper">
                <div class="container-fluid">
                  <div class="row">
                    <div class="{% block col-classes %}col-lg-12{% endblock %} main-content">
                      <div class="header">
                        {% block header-content %}
                          {% block bread-crumbs %}
                            {% if request.user.is_authenticated %}
                              {% bread_crumbs %}
                            {% endif %}
                          {% endblock %}
                          {% block tabs-menu %}
                            {% if tabs %}
                              {% include 'menu/tabs_menu.html' with tabs=tabs %}
                            {% endif %}
                          {% endblock %}
                        {% endblock %}
                      </div>
                      <div class="content clearfix">
                        {% block content %}{% endblock %}
                      </div>
                    </div>
                  </div>
                  {% block another-cols %}{% endblock %}
                </div>
              </div>
            {% endblock %}
            {% block footer %}
              <footer>
                <div class="pull-right">
                  <span>{{ PROJECT_VERBOSE }} &copy; {% now "Y" %} (v {{ PROJECT_VERSION }})</span>
                </div>
              </footer>
            {% endblock %}
        {% endblock %}
        {% block foot-scripts %}
            {% if JS_DEV %}
              <script src="{% static 'js/goog/base.js' %}" type="text/javascript"></script>
              <script src="{% static 'js/deps.js' %}" type="text/javascript"></script>
              <script src="{% static 'js/start.js' %}" type="text/javascript"></script>
              <script src="http://localhost:35729/livereload.js"></script>
            {% else %}
              <script src="{% static 'js/app.js' %}" type="text/javascript"></script>
            {% endif %}
            <script type="text/javascript">
              {% block scripts %}
                app.start(window, {error: '{% trans 'Internal error occurred. Service is unavailable, sorry.' %}', loading: '{% trans 'Loading...' %}'}, {% if JS_DEV %}true{% else %}false{% endif %});
              {% endblock %}
            </script>
        {% endblock %}
	</body>
</html>
