base.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. {% load i18n admin_static jet_tags %}
  2. {% block html %}<!DOCTYPE html>
  3. {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}{% format_current_language LANGUAGE_CODE as LANGUAGE_CODE %}
  4. {% get_current_theme as THEME %}
  5. <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
  6. <head>
  7. <title>{% block title %}{% endblock %}</title>
  8. <meta name="copyright" content="geex-arts.com">
  9. <link href="{% static "jet/vendor/select2/css/select2.min.css" %}" rel="stylesheet" />
  10. <link href="{% static "jet/vendor/jquery-ui/jquery-ui.min.css" %}" rel="stylesheet" />
  11. <link href="{% static "jet/vendor/jquery-ui-timepicker/jquery.ui.timepicker.css" %}" rel="stylesheet" />
  12. <link href="{% static "jet/css/icons/style.css" %}" rel="stylesheet" />
  13. <link href="{% static "jet/css/themes/"|add:THEME|add:"/base.css" %}" rel="stylesheet" />
  14. <link href="{% static "jet/css/themes/"|add:THEME|add:"/select2.theme.css" %}" rel="stylesheet" />
  15. <link href="{% static "jet/css/themes/"|add:THEME|add:"/jquery-ui.theme.css" %}" rel="stylesheet" />
  16. {% block extrastyle %}{% endblock %}
  17. <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% static "admin/css/ie.css" %}{% endblock %}" /><![endif]-->
  18. {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %}
  19. <script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script>
  20. <script type="text/javascript">window.__admin_utc_offset__ = "{% filter escapejs %}{% now "Z" %}{% endfilter %}";</script>
  21. <script type="text/javascript" charset="utf-8">
  22. var DATE_FORMAT = "{% get_date_format %}";
  23. var TIME_FORMAT = "{% get_time_format %}";
  24. var DATETIME_FORMAT = "{% get_datetime_format %}";
  25. </script>
  26. {% block extrahead %}{% endblock %}
  27. {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
  28. <script type="text/javascript" src="{% url 'jet:jsi18n' %}"></script>
  29. <script src="{% static "jet/vendor/jquery/jquery-1.11.3.min.js" %}"></script>
  30. <script src="{% static "jet/vendor/jquery-ui/jquery-ui.min.js" %}"></script>
  31. <script src="{% static "jet/vendor/jquery-ui-timepicker/jquery.ui.timepicker.js" %}"></script>
  32. <script src="{% static "jet/vendor/select2/js/select2.full.min.js" %}"></script>
  33. {% if LANGUAGE_CODE|slice:":2" != 'en' %}
  34. {% with "jet/vendor/jquery-ui/i18n/datepicker-"|add:LANGUAGE_CODE|add:".js" as url %}
  35. <script src="{% static url %}"></script>
  36. {% endwith %}
  37. {% with "jet/vendor/jquery-ui-timepicker/i18n/jquery.ui.timepicker-"|add:LANGUAGE_CODE|add:".js" as url %}
  38. <script src="{% static url %}"></script>
  39. {% endwith %}
  40. {% with "jet/vendor/select2/js/i18n/"|add:LANGUAGE_CODE|add:".js" as url %}
  41. <script src="{% static url %}"></script>
  42. {% endwith %}
  43. {% endif %}
  44. <script type="text/javascript" charset="utf-8">
  45. var jet = jet || {};
  46. jet.jQuery = jQuery.noConflict(true);
  47. </script>
  48. <script src="{% static "jet/js/main.min.js" %}"></script>
  49. <script src="{% static "jet/js/select2.jet.min.js" %}"></script>
  50. </head>
  51. <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
  52. {% block body %}
  53. {% if not is_popup %}
  54. <div id="container" class="container">
  55. {% endif %}
  56. <div class="content">
  57. {% if not is_popup %}
  58. {% block header %}
  59. <div id="header" class="top">
  60. {# <div id="branding">#}
  61. {# {% block branding %}{% endblock %}#}
  62. {# </div>#}
  63. <div class="top-right">
  64. {% block top-right %}{% endblock %}
  65. {% block usertools %}
  66. {% if user.is_active and user.is_staff %}
  67. <ul class="top-user-tools" id="user-tools">
  68. <li class="top-user-tools-welcome-msg">
  69. <span class="top-user-tools-welcome-msg-arrow icon-arrow-down"></span>
  70. {% block welcome-msg %}
  71. {% firstof user.get_short_name user.get_username %}
  72. {% endblock %}
  73. </li>
  74. {% block userlinks %}
  75. {% if user.has_usable_password %}
  76. <li class="top-user-tools-user-link">
  77. <span class="top-user-tools-user-link-icon icon-key"></span> <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a>
  78. </li>
  79. {% endif %}
  80. <li class="top-user-tools-user-link">
  81. <span class="top-user-tools-user-link-icon icon-exit"></span> <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
  82. </li>
  83. {% endblock %}
  84. </ul>
  85. {% endif %}
  86. {% endblock %}
  87. </div>
  88. <div class="top-breadcrumbs">
  89. {% format_breadcrumbs %}
  90. {% block breadcrumbs %}
  91. <div class="breadcrumbs">
  92. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  93. {% if title %} &rsaquo; {{ title }}{% endif %}
  94. </div>
  95. {% endblock %}
  96. {% endformat_breadcrumbs %}
  97. </div>
  98. {% block nav-global %}{% endblock %}
  99. </div>
  100. {% endblock %}
  101. {% endif %}
  102. {% block messages %}
  103. {% if messages %}
  104. <ul class="messagelist">
  105. {% for message in messages %}
  106. <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
  107. {% endfor %}
  108. </ul>
  109. {% endif %}
  110. {% endblock messages %}
  111. <div id="content" class="cf {% block coltype %}colM{% endblock %}">
  112. {% block pretitle %}{% endblock %}
  113. {% if is_popup %}
  114. {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
  115. {% endif %}
  116. <div class="context-sidebar">
  117. {% block sidebar %}{% endblock %}
  118. </div>
  119. {% block content %}
  120. {% block object-tools %}{% endblock %}
  121. {{ content }}
  122. {% endblock %}
  123. </div>
  124. {% block footer %}<div id="footer"></div>{% endblock %}
  125. </div>
  126. {% if not is_popup %}
  127. {% include "admin/sidebar.html" %}
  128. </div>
  129. {% endif %}
  130. {% endblock %}
  131. </body>
  132. </html>{% endblock %}