{% import 'admin/layout.html' as layout 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="{{ url_for('admin.static', filename='bootstrap/css/bootstrap.css') }}" rel="stylesheet">
        <link href="{{ url_for('admin.static', filename='bootstrap/css/bootstrap-responsive.css') }}" rel="stylesheet">
        <link href="{{ url_for('admin.static', filename='admin/css/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="{{ url_for('admin.static', filename='vendor/jquery-1.8.3.min.js') }}" type="text/javascript"></script>
    <script src="{{ url_for('admin.static', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
    <script src="{{ url_for('admin.static', filename='select2/select2.min.js') }}" type="text/javascript"></script>
    {% endblock %}

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