base.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {% load admin_static %}<!DOCTYPE html>
  2. <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
  3. <head>
  4. <title>{% block title %}{% endblock %}</title>
  5. <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" />
  6. {% block extrastyle %}{% endblock %}
  7. <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% static "admin/css/ie.css" %}{% endblock %}" /><![endif]-->
  8. {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %}
  9. <script type="text/javascript">window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}";</script>
  10. {% block extrahead %}{% endblock %}
  11. {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
  12. </head>
  13. {% load i18n %}
  14. <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
  15. <!-- Container -->
  16. <div id="container">
  17. {% if not is_popup %}
  18. <!-- Header -->
  19. <div id="header">
  20. <div id="branding">
  21. {% block branding %}{% endblock %}
  22. </div>
  23. {% if user.is_active and user.is_staff %}
  24. <div id="user-tools">
  25. {% trans 'Welcome,' %}
  26. <strong>{% filter force_escape %}{% firstof user.get_short_name user.get_username %}{% endfilter %}</strong>.
  27. {% block userlinks %}
  28. {% url 'django-admindocs-docroot' as docsroot %}
  29. {% if docsroot %}
  30. <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
  31. {% endif %}
  32. {% if user.has_usable_password %}
  33. <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
  34. {% endif %}
  35. <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
  36. {% endblock %}
  37. </div>
  38. {% endif %}
  39. {% block nav-global %}{% endblock %}
  40. </div>
  41. <!-- END Header -->
  42. {% block breadcrumbs %}
  43. <div class="breadcrumbs">
  44. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  45. {% if title %} &rsaquo; {{ title }}{% endif %}
  46. </div>
  47. {% endblock %}
  48. {% endif %}
  49. {% block messages %}
  50. {% if messages %}
  51. <ul class="messagelist">{% for message in messages %}
  52. <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
  53. {% endfor %}</ul>
  54. {% endif %}
  55. {% endblock messages %}
  56. <!-- Content -->
  57. <div id="content" class="{% block coltype %}colM{% endblock %}">
  58. {% block pretitle %}{% endblock %}
  59. {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
  60. {% block content %}
  61. {% block object-tools %}{% endblock %}
  62. {{ content }}
  63. {% endblock %}
  64. {% block sidebar %}{% endblock %}
  65. <br class="clear" />
  66. </div>
  67. <!-- END Content -->
  68. {% block footer %}<div id="footer"></div>{% endblock %}
  69. </div>
  70. <!-- END Container -->
  71. </body>
  72. </html>