{% import 'admin/layout.html' as layout with context -%}
{% import 'admin/static.html' as admin_static with context %}
<!DOCTYPE html>
<html>
  <head>
    <title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock %}</title>
    {% block head_meta %}
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
    {% endblock %}
    {% block head_css %}
        <link href="{{ admin_static.url(filename='bootstrap/bootstrap2/css/bootstrap.css') }}" rel="stylesheet">
        <link href="{{ admin_static.url(filename='bootstrap/bootstrap2/css/bootstrap-responsive.css') }}" rel="stylesheet">
        <link href="{{ admin_static.url(filename='admin/css/bootstrap2/admin.css') }}" rel="stylesheet">
    {% endblock %}
    {% block head %}
    {% endblock %}
    {% block head_tail %}
    {% endblock %}
  </head>
  <body>
    {% block page_body %}
    <div class="container">
      <div class="navbar">
        <div class="navbar-inner">
          {% block brand %}
          <span class="brand">{{ admin_view.admin.name }}</span>
          {% endblock %}
          {% block main_menu %}
          <ul class="nav">
            {{ layout.menu() }}
          </ul>
          {% endblock %}
          {% block menu_links %}
          <ul class="nav pull-right">
            {{ layout.menu_links() }}
          </ul>
          {% endblock %}
          {% block access_control %}
          {% endblock %}
        </div>
      </div>

      {% block messages %}
      {{ layout.messages() }}
      {% endblock %}

      {% set render_ctx = h.resolve_ctx() %}

      {% block body %}{% endblock %}
    </div>
    {% endblock %}

    {% block tail_js %}
    <script src="{{ admin_static.url(filename='vendor/jquery-2.1.1.min.js') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='bootstrap/bootstrap2/js/bootstrap.min.js') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/moment-2.8.4.min.js') }}" type="text/javascript"></script>
    <script src="{{ admin_static.url(filename='vendor/select2/select2.min.js') }}" type="text/javascript"></script>
    {% endblock %}

    {% block tail %}
    {% endblock %}
  </body>
</html>
