{% load i18n static %}<!DOCTYPE html>
{% load vali_tags %}
{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
{% vali_config as VALI_CONFIG %}
<html lang="{{ LANGUAGE_CODE|default:'en-us' }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
{# <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static 'admin/css/base.css' %}{% endblock %}" /> #}
    <link rel="stylesheet" type="text/css" href="{% static 'vali/assets/js/plugins/bootstrap-treeview.min.css' %}" />
    <link rel="stylesheet" type="text/css" href="{% static '' %}vali/themes/{% VALI_THEME %}/main.css" />
    <link rel="stylesheet" type="text/css" href="{% static 'vali/assets/vali.css' %}" />
    {% if VALI_CONFIG.font_awesome_url %}
    <link rel="stylesheet" type="text/css" href="{% static VALI_CONFIG.font_awesome_url %}" />
    {% else %}
    <link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    {% endif %}
    {% block responsive %}
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}" />
    {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive_rtl.css' %}" />{% endif %}
    {% endblock %}
{% block extrastyle %}{% endblock %}
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static 'admin/css/rtl.css' %}{% endblock %}" />{% endif %}
{% block extrahead %}{% endblock %}


{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
{% load i18n %}

<body class="app sidebar-mini {% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}"
  data-admin-utc-offset="{% now 'Z' %}">
<!-- Header -->
    <!-- Navbar-->
    <div class="app-header">
        {% block branding %}Vali{% endblock %}
      <!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar"></a>
      <!-- Navbar Right Menu-->
      <ul class="app-nav">

        <!--Notification Menu-->
        <li class="dropdown"><a class="app-nav__item" href="#" data-toggle="dropdown"><i class="fa fa-bell-o fa-lg"></i></a>
              <ul class="app-notification dropdown-menu dropdown-menu-right">
                <li class="app-notification__title">{% blocktrans with count=notifications.count %} You dont have {{ count }} new notifications. {% endblocktrans %}</li>
                <div class="app-notification__content">
                    {% for noti in notifications %}
                  <li><a class="app-notification__item" href="javascript:;">
                      <span class="app-notification__icon">
                          <span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x text-primary"></i>
                              <i class="fa fa-envelope fa-stack-1x fa-inverse"></i>
                          </span>
                      </span>
                      <div>
                        <p class="app-notification__message">Lisa sent you a mail</p>
                        <p class="app-notification__meta">2 min ago</p>
                      </div>
                  </a></li>
                    {% endfor %}

                </div>
                <li class="app-notification__footer"><a href="{{ notification_admin|default:'#' }}">{% trans 'See all notifications.' %}</a></li>
              </ul>
        </li>
        <!-- User Menu-->
          {% block usertools %}
        {% if has_permission %}
          <li class="dropdown">
              <a class="app-nav__item" href="#" data-toggle="dropdown"><i class="fa fa-user fa-lg"></i>
                {% block welcome-msg %}
                    {% trans 'Welcome,' %}
                    <strong>{% firstof user.get_short_name user.get_username %}</strong>.
                {% endblock %}
              </a>
              {% block userlinks %}
              <ul class="dropdown-menu settings-menu dropdown-menu-right">
                  {% if site_url %}
                  <li><a class="dropdown-item" href="{{ site_url }}"><i class="fa fa-cog fa-lg"></i>{% trans 'View site' %}</a> </li>
                  {% endif %}
                  {% if user.is_active and user.is_staff %}
                    {% url 'django-admindocs-docroot' as docsroot %}
                    {% if docsroot %}
                        <li><a class="dropdown-item" href="{{ docsroot }}"><i class="fa fa-user fa-lg"></i>{% trans 'Documentation' %} </a></li>
                    {% endif %}
                  {% endif %}
                {% if user.has_usable_password %}
                <li><a class="dropdown-item" href="{% url 'admin:password_change' %}"><i class="fa fa-user fa-lg"></i>{% trans 'Change password' %}</a> </li>
                {% endif %}
                <li><a class="dropdown-item" href="{% url 'admin:logout' %}"><i class="fa fa-sign-out fa-lg"></i> {% trans 'Log out' %}</a></li>
              </ul>
              {% endblock %}
        </li>
        {% endif %}
        {% endblock %}
      </ul>
        {% block nav-global %}{% endblock %}
    </div>
 <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
{% if not is_popup %}
{% block appmenu %}
    <div class="app-sidebar">
        <div class="app-sidebar__user"><i class="fa fa-user-o fa-2x ml-1 mr-3"></i>
        <div>
            <p class="app-sidebar__user-name">{% firstof user.get_short_name user.get_username %}</p>
            <p class="app-sidebar__user-designation">{{ user.email }}</p>
        </div>
        </div>
        <ul class="app-menu">
            {% if VALI_CONFIG.dashboard %}
                {% url 'admin:index' as adminurl %}
                <li><a class="app-menu__item {%if request.path == adminurl %}active{% endif %}" href="{{ VALI_CONFIG.dashboard.url|default:adminurl}}"><i class="app-menu__icon fa fa-dashboard"></i><span class="app-menu__label">{{ VALI_CONFIG.dashboard.name|default:'Dashboard' }}</span></a></li>
            {% endif %}
            {% get_menu request as app_list %}
            {% if app_list %}
                {% for app in app_list %}
                <li class="treeview{% if app.app_url in request.path %} is-expanded{% endif%}">
                    <a class="app-menu__item" href="{{ app.app_url }}" data-toggle="treeview" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">
                        <i class="app-menu__icon fa fa-laptop"></i>
                        <span class="app-menu__label">{{ app.name }}</span>
                        <i class="treeview-indicator fa fa-angle-right"></i>
                    </a>
                    <ul class="treeview-menu">
                        {% for model in app.models %}
                            {% if model.group_name %}
                                <li class="treegroup{% if app.app_url in request.path %} is-expanded{% endif%}">
                                    <a class="app-menu__item" href="javascript:void(0)" data-toggle="treegroup" title="{{ model.group_name }}">
                                        <i class="app-menu__icon fa fa-dot-circle-o ml-2"></i>
                                        <span class="app-menu__label">{{ model.group_name }}</span>
                                        <i class="treegroup-indicator fa fa-angle-right"></i>
                                    </a>
                                    <ul class="treegroup-menu pl-0">
                                        {% for submodel in model.models %}
                                            {% if submodel.admin_url %}
                                                <li><a class="treeview-item model-{{ submodel.object_name|lower }} {% if  submodel.admin_url in request.path %} active{% endif %}" href="{{ submodel.admin_url }}"><i class="icon fa fa-circle-o pl-3"></i> {{ submodel.name }}</a></li>
                                            {% else %}
                                                <li>{{ submodel.name }}</li>
                                            {% endif %}
                                        {% endfor %}
                                    </ul>
                                </li>
                            {% else %}
                                {% if model.admin_url %}
                                    <li><a class="ml-2 treeview-item model-{{ model.object_name|lower }} {% if  model.admin_url in request.path %} active{% endif %}" href="{{ model.admin_url }}"><i class="icon fa fa-circle-o"></i> {{ model.name }}</a></li>
                                {% else %}
                                    <li>{{ model.name }}</li>
                                {% endif %}
                            {% endif %}
                      {% endfor %}
                    </ul>
                </li>
                {% endfor %}
            {% else %}
                <p>{% trans "You don't have permission to edit anything." %}</p>
            {% endif %}

        </ul>
    </div>
{% endblock%}
{% endif %}

<!-- Container -->
<div id="container" class="{% if not is_popup %}app-content{% endif %}">

    {% if not is_popup %}
        <div class="app-title">
            <div>
              <h5><i class="fa fa-list"></i> {% firstof opts.verbose_name_plural cl.opts.verbose_name_plural title %}</h5>
              {% block breadcrumbs %}
                <ul class="app-breadcrumb breadcrumb">
                    <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a></li>
                    {% if title %}
                        <li class="breadcrumb-item"><a href="#"> {{ title }} </a></li>
                    {% endif %}
                </ul>
                {% endblock %}
            </div>

            {% block object-tools %}{% endblock %}
        </div>
    {% endif %}

    {% block messages %}
    <div class="col messagelist">
        {% if messages %}

            {% for message in messages %}
              <div{% if message.tags %} class="alert alert-dismissible alert-{{ message.tags }}"{% endif %}>
                <button class="close" type="button" data-dismiss="alert">×</button>
                {{ message|capfirst }}
              </div>
            {% endfor %}

        {% endif %}
     </div>
    {% endblock messages %}

    <!-- Content -->
    <div id="content" class="{% block coltype %}container{% endblock %}">
        {% block pretitle %}{% endblock %}
        {% block content_title %}{% endblock %}
        {% block content %}
        {{ content }}
        {% endblock %}
        {% block sidebar %}{% endblock %}
        <br class="clear" />
    </div>
    <!-- END Content -->

    {% block footer %}<div id="footer"></div>{% endblock %}
</div>
<!-- END Container -->
<script src="{% static ''%}vali/assets/js/jquery-3.2.1.min.js"></script>
<script src="{% static ''%}vali/assets/js/popper.min.js"></script>
<script src="{% static ''%}vali/assets/js/bootstrap.min.js"></script>
<script src="{% static ''%}vali/assets/js/main.js"></script>
<script src="{% static 'vali/assets/vali.js' %}"></script>
<!-- The javascript plugin to display page loading on top-->
{# <script src="{% static ''%}vali/assets/js/plugins/bootstrap-treeview.min.js"></script> #}
<script src="{% static ''%}vali/assets/js/plugins/pace.min.js"></script>
{% block extrafoot %}{% endblock %}
</body>
</html>
