123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- {% extends "admin/base.html" %}
- {% load i18n static jet_tags %}
- {% block extrastyle %}
- {{ block.super }}
- {% get_current_jet_version as JET_VERSION %}
- <link rel="stylesheet" type="text/css" href="{% static "jet/css/vendor.css" %}?v={{ JET_VERSION }}" />
- <link rel="stylesheet" type="text/css" href="{% static "jet/css/icons/style.css" %}?v={{ JET_VERSION }}" />
- <link rel="stylesheet" type="text/css" href="{% static "jet/css/themes/default/base.css" %}?v={{ JET_VERSION }}" />
- <link rel="stylesheet" type="text/css" href="{% static "jet/css/themes/default/jquery-ui.theme.css" %}?v={{ JET_VERSION }}" />
- <link rel="stylesheet" type="text/css" href="{% static "jet/css/themes/default/select2.theme.css" %}?v={{ JET_VERSION }}" />
- {% endblock %}
- {% block extrahead %}
- {{ block.super }}
- <script type="text/javascript" charset="utf-8">
- var DATE_FORMAT = "{% get_date_format %}";
- var TIME_FORMAT = "{% get_time_format %}";
- var DATETIME_FORMAT = "{% get_datetime_format %}";
- </script>
- <script src="{% static "jet/js/build/bundle.min.js" %}"></script>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
- {% endblock %}
- {% block footer %}
- {{ block.super }}
- {% jet_delete_confirmation_context %}
- {% jet_change_form_sibling_links_enabled as show_siblings %}
- {% if change and show_siblings %}
- <div class="changeform-navigation">
- {% spaceless %}
- {% jet_previous_object_url as url %}
- <a{% if url %} href="{{ url }}"{% endif %} class="segmented-button left{% if not url %} disabled{% endif %}">
- <span class="changeform-navigation-button icon-arrow-left"></span>
- </a>
- {% jet_next_object_url as url %}
- <a{% if url %} href="{{ url }}"{% endif %} class="segmented-button right{% if not url %} disabled{% endif %}">
- <span class="changeform-navigation-button icon-arrow-right"></span>
- </a>
- {% endspaceless %}
- </div>
- {% endif %}
- {% get_side_menu_compact as SIDE_MENU_COMPACT %}
- {% if not is_popup %}
- <div class="related-popup-container">
- <a href="#" class="related-popup-back"><span class="related-popup-back-icon icon-arrow-left"></span> <span class="related-popup-back-label">{% trans "back" %}</span></a>
- <span class="icon-refresh loading-indicator"></span>
- </div>
- <div class="sidebar">
- <div class="sidebar-wrapper">
- <div id="branding">
- {% block branding %}{% endblock %}
- </div>
- <div class="sidebar-section">
- {% if user.is_active and user.is_staff %}
- <div>
- <a href="{% url 'admin:index' %}" class="sidebar-link icon">
- <span class="sidebar-link-icon icon-data"></span>
- <span class="sidebar-link-label">{% trans 'Home' %}</span>
- </a>
- </div>
- {% endif %}
- {% if site_url %}
- <div>
- <a href="{{ site_url }}" class="sidebar-link icon">
- <span class="sidebar-link-icon icon-open-external"></span>
- <span class="sidebar-link-label">{% trans 'View site' %}</span>
- </a>
- </div>
- {% endif %}
- {% url 'django-admindocs-docroot' as docsroot %}
- {% if docsroot %}
- <div>
- <a href="{{ docsroot }}" class="sidebar-link icon">
- <span class="sidebar-link-icon icon-book"></span>
- <span class="sidebar-link-label">{% trans 'Documentation' %}</span>
- </a>
- </div>
- {% endif %}
- {% block nav-global %}{% endblock %}
- </div>
- {% if user.is_active and user.is_staff %}
- {% get_menu as app_list %}
- {% if app_list.apps or app_list.pinned_apps %}
- {% if SIDE_MENU_COMPACT %}
- {% for app in app_list.all_apps %}
- <div class="sidebar-section">
- <div class="sidebar-title">
- <a href="{{ app.app_url }}" class="sidebar-title-link">
- {% if app.name != app.app_label|capfirst|escape %}
- {{ app.name }}
- {% else %}
- {% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}
- {% endif %}
- </a>
- </div>
- {% for model in app.models %}
- {% if model.admin_url %}
- <div>
- <a href="{{ model.admin_url }}" class="sidebar-link">
- <span class="sidebar-right">
- <span class="sidebar-right-arrow icon-arrow-right"></span>
- </span>
- {{ model.name }}
- </a>
- </div>
- {% endif %}
- {% endfor %}
- </div>
- {% endfor %}
- {% else %}
- <form action="{% url "jet:toggle_application_pin" %}" method="POST" id="toggle-application-pin-form">
- {% csrf_token %}
- <input type="hidden" name="app_label">
- </form>
- <div class="sidebar-section">
- <div class="sidebar-title">{% trans 'Applications' %}</div>
- <div class="apps-list-pinned">
- {% for app in app_list.pinned_apps %}
- <a href="{{ app.app_url }}" class="sidebar-link popup-section-link app-item" data-app-label="{{ app.app_label }}" data-popup-section-class="sidebar-popup-section-{{ app.app_label }}">
- <span class="sidebar-left collapsible">
- <span class="sidebar-left-pin icon-star pin-toggle"></span>
- <span class="sidebar-left-unpin icon-cross pin-toggle"></span>
- </span>
- <span class="sidebar-right">
- <span class="sidebar-right-arrow icon-arrow-right"></span>
- </span>
- {% if app.name != app.app_label|capfirst|escape %}
- {{ app.name }}
- {% else %}
- {% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}
- {% endif %}
- </a>
- {% endfor %}
- </div>
- <a href="#" class="sidebar-center-link apps-hide">
- <span class="apps-hide-label apps-visible">{% trans "Hide applications" %}</span>
- <span class="apps-hide-label apps-hidden">{% trans "Show hidden" %}</span>
- </a>
- <div class="apps-list">
- {% for app in app_list.apps %}
- <a href="{{ app.app_url }}" class="sidebar-link popup-section-link app-item" data-app-label="{{ app.app_label }}" data-popup-section-class="sidebar-popup-section-{{ app.app_label }}">
- <span class="sidebar-left collapsible">
- <span class="sidebar-left-pin icon-star pin-toggle"></span>
- <span class="sidebar-left-unpin icon-cross pin-toggle"></span>
- </span>
- <span class="sidebar-right">
- <span class="sidebar-right-arrow icon-arrow-right"></span>
- </span>
- {% if app.name != app.app_label|capfirst|escape %}
- {{ app.name }}
- {% else %}
- {% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}
- {% endif %}
- </a>
- {% endfor %}
- </div>
- </div>
- {% endif %}
- {% endif %}
- <div class="sidebar-section">
- <div class="dialog-confirm" id="bookmarks-add-dialog" title="{% trans "Add bookmark" %}">
- <form action="{% url "jet:add_bookmark" %}" method="POST" id="bookmarks-add-form">
- {% csrf_token %}
- <p>{% trans "Title" %}:</p>
- <input type="text" name="title" class="fill_width">
- <p>{% trans "URL" %}:</p>
- <input type="text" name="url" class="fill_width">
- </form>
- </div>
- <form action="{% url "jet:remove_bookmark" %}" method="POST" id="bookmarks-remove-form">
- {% csrf_token %}
- <input type="hidden" name="id">
- </form>
- <div class="dialog-confirm" id="bookmarks-remove-dialog" title="{% trans "Delete bookmark" %}">
- <p>{% trans "Are you sure want to delete this bookmark?" %}</p>
- </div>
- <div class="sidebar-title">
- <span class="sidebar-right">
- <a href="#" class="sidebar-right-plus bookmarks-add" title="{% trans "Add bookmark" %}"{% if title %} data-title="{{ title }}"{% endif %}><span class="icon-add"></span></a>
- </span>
- {% trans 'bookmarks' %}
- </div>
- <div class="bookmarks-list">
- {% get_bookmarks user as bookmarks %}
- {% for bookmark in bookmarks %}
- <a href="{{ bookmark.url }}" class="sidebar-link bookmark-item">
- <span class="sidebar-right collapsible">
- <span class="sidebar-right-remove bookmarks-remove" data-bookmark-id="{{ bookmark.pk }}">{% trans "Remove" %}</span>
- </span>
- {{ bookmark.title }}
- </a>
- {% endfor %}
- <a class="sidebar-link bookmark-item clone">
- <span class="sidebar-right collapsible">
- <span class="sidebar-right-remove bookmarks-remove">{% trans "Remove" %}</span>
- </span>
- </a>
- </div>
- </div>
- {% endif %}
- </div>
- <div class="sidebar-copyright">powered by DJANGO JET</div>
- {% if app_list and not SIDE_MENU_COMPACT %}
- <div class="sidebar-popup-container">
- <div class="sidebar-popup">
- {% for app in app_list.apps|add:app_list.pinned_apps %}
- <div class="sidebar-popup-section sidebar-popup-section-{{ app.app_label }}">
- <div class="sidebar-popup-title">
- {% if app.name != app.app_label|capfirst|escape %}
- {{ app.name }}
- {% else %}
- {% trans app.app_label as app_label %}{{ app_label|capfirst|escape }}
- {% endif %}
- </div>
- <input class="sidebar-popup-search" placeholder="Search...">
- <ul class="sidebar-popup-list">
- <li class="sidebar-popup-list-item app-{{ app.app_label }}{{ app.current|yesno:" current," }}">
- <a href="{{ app.app_url }}" class="sidebar-popup-list-item-link">{% trans 'Application page' %}</a>
- </li>
- {% for model in app.models %}
- <li class="sidebar-popup-list-item model-{{ model.object_name|lower }}{{ model.current|yesno:" current," }}">
- {% if model.admin_url %}
- <a href="{{ model.admin_url }}" class="sidebar-popup-list-item-link">{{ model.name }}</a>
- {% else %}
- {{ model.name }}
- {% endif %}
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endfor %}
- </div>
- </div>
- {% endif %}
- </div>
- {% endif %}
- {% endblock %}
|