{% extends "frasco_layout.html" %}

{% block head %}
  {% assets "@admin" %}
{% endblock %}

{% block page_body %}
<body>
  <div id="page-wrapper" class="active">

    <!-- Sidebar -->

    <div id="sidebar-wrapper">
      <ul class="sidebar">
        <li id="toggle-sidebar" class="sidebar-main">
          <a href="#">
            {{ app.config.get("TITLE", "Admin") }}
            <span class="menu-icon glyphicon glyphicon-transfer"></span>
          </a>
        </li>
        {% for item in get_menu("admin") %}
          {% if item.separator %}
          <li class="sidebar-title separator"><span>{{ item.label }}</span></li>
          {% elif item.is_visible() %}
          <li class="sidebar-list {{ 'active' if item.is_current() else '' }}">
            <a href="{{ item.url() }}">{{ item.label }}{% if item.icon %} <span class="menu-icon fa fa-{{ item.icon }}"></span>{% endif %}</a>
          </li>
          {% endif %}
        {% endfor %}
      </ul>
      <div class="sidebar-footer">
        <div class="col-xs-4">
          <a href="http://getfrasco.com" target="_blank">Frasco</a>
        </div>
        <div class="col-xs-4">
          <a href="http://getfrasco.com/help/admin" target="_blank">Help</a>
        </div>
      </div>
    </div>

    <!-- End Sidebar -->

    <div id="content-wrapper">
      <div class="page-content">

        <!-- Header Bar -->

        <div class="row header">
          <div class="col-xs-12">
            <div class="meta pull-left">
              <div class="page{% if admin_section_desc %} small{% endif %}">
                {{ admin_section_title }}
              </div>
              {% if admin_section_desc %}
              <div class="breadcrumb-links">
                {{ admin_section_desc }}
              </div>
              {% endif %}
            </div>
            <div class="actions pull-right">
              <{ bs_linkbtn url_for("index") "Back to site" }/>
            </div>
          </div>
        </div>

        <!-- End Header Bar -->

        <!-- Main Content -->
        <div class="row alerts-container">
          <div class="col-xs-12">
            <{ bs_flash_messages }/>
          </div>
        </div>

        {% block main %}
        <div class="row">
          <div class="col-lg-12">
            {% content %}{% endcontent %}
          </div>
        </div>
        {% endblock %}

        <!-- End Main Content -->

      </div><!-- End Page Content -->
    </div><!-- End Content Wrapper -->
  </div><!-- End Page Wrapper -->
</body>
{% endblock %}