base.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. {% with "jet/vendor/jquery-ui/i18n/datepicker-"|add:LANGUAGE_CODE|add:".js" as url %}
  33. <script src="{% static url %}"></script>
  34. {% endwith %}
  35. {% with "jet/vendor/jquery-ui-timepicker/i18n/jquery.ui.timepicker-"|add:LANGUAGE_CODE|add:".js" as url %}
  36. <script src="{% static url %}"></script>
  37. {% endwith %}
  38. <script src="{% static "jet/vendor/select2/js/select2.full.min.js" %}"></script>
  39. {% with "jet/vendor/select2/js/i18n/"|add:LANGUAGE_CODE|add:".js" as url %}
  40. <script src="{% static url %}"></script>
  41. {% endwith %}
  42. <script type="text/javascript" charset="utf-8">
  43. var jet = jet || {};
  44. jet.jQuery = jQuery.noConflict(true);
  45. </script>
  46. <script src="{% static "jet/js/main.min.js" %}"></script>
  47. <script src="{% static "jet/js/select2.jet.min.js" %}"></script>
  48. </head>
  49. <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
  50. {% block body %}
  51. {% if not is_popup %}
  52. <div id="container" class="container">
  53. {% endif %}
  54. <div class="content">
  55. {% if not is_popup %}
  56. {% block header %}
  57. <div id="header" class="top">
  58. {# <div id="branding">#}
  59. {# {% block branding %}{% endblock %}#}
  60. {# </div>#}
  61. <div class="top-right">
  62. {% block top-right %}{% endblock %}
  63. {% block usertools %}
  64. {% if user.is_active and user.is_staff %}
  65. <ul class="top-user-tools" id="user-tools">
  66. <li class="top-user-tools-welcome-msg">
  67. <span class="top-user-tools-welcome-msg-arrow icon-arrow-down"></span>
  68. {% block welcome-msg %}
  69. {% firstof user.get_short_name user.get_username %}
  70. {% endblock %}
  71. </li>
  72. {% block userlinks %}
  73. {% if user.has_usable_password %}
  74. <li class="top-user-tools-user-link">
  75. <span class="top-user-tools-user-link-icon icon-key"></span> <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a>
  76. </li>
  77. {% endif %}
  78. <li class="top-user-tools-user-link">
  79. <span class="top-user-tools-user-link-icon icon-exit"></span> <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
  80. </li>
  81. {% endblock %}
  82. </ul>
  83. {% endif %}
  84. {% endblock %}
  85. </div>
  86. <div class="top-breadcrumbs">
  87. {% format_breadcrumbs %}
  88. {% block breadcrumbs %}
  89. <div class="breadcrumbs">
  90. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  91. {% if title %} &rsaquo; {{ title }}{% endif %}
  92. </div>
  93. {% endblock %}
  94. {% endformat_breadcrumbs %}
  95. </div>
  96. {% block nav-global %}{% endblock %}
  97. </div>
  98. {% endblock %}
  99. {% endif %}
  100. {% block messages %}
  101. {% if messages %}
  102. <ul class="messagelist">
  103. {% for message in messages %}
  104. <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
  105. {% endfor %}
  106. </ul>
  107. {% endif %}
  108. {% endblock messages %}
  109. <div id="content" class="cf {% block coltype %}colM{% endblock %}">
  110. {% block pretitle %}{% endblock %}
  111. {% if is_popup %}
  112. {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
  113. {% endif %}
  114. <div class="context-sidebar">
  115. {% block sidebar %}{% endblock %}
  116. </div>
  117. {% block content %}
  118. {% block object-tools %}{% endblock %}
  119. {{ content }}
  120. {% endblock %}
  121. </div>
  122. {% block footer %}<div id="footer"></div>{% endblock %}
  123. </div>
  124. {% if not is_popup %}
  125. {% include "admin/sidebar.html" %}
  126. </div>
  127. {% endif %}
  128. {% endblock %}
  129. </body>
  130. </html>{% endblock %}