base.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. {% load admin_static %}{% load url from future %}<!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.first_name user.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. <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
  33. <a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
  34. {% endblock %}
  35. </div>
  36. {% endif %}
  37. {% block nav-global %}{% endblock %}
  38. </div>
  39. <!-- END Header -->
  40. {% block breadcrumbs %}
  41. <div class="breadcrumbs">
  42. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  43. {% if title %} &rsaquo; {{ title }}{% endif %}
  44. </div>
  45. {% endblock %}
  46. {% endif %}
  47. {% block messages %}
  48. {% if messages %}
  49. <ul class="messagelist">{% for message in messages %}
  50. <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
  51. {% endfor %}</ul>
  52. {% endif %}
  53. {% endblock messages %}
  54. <!-- Content -->
  55. <div id="content" class="{% block coltype %}colM{% endblock %}">
  56. {% block pretitle %}{% endblock %}
  57. {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
  58. {% block content %}
  59. {% block object-tools %}{% endblock %}
  60. {{ content }}
  61. {% endblock %}
  62. {% block sidebar %}{% endblock %}
  63. <br class="clear" />
  64. </div>
  65. <!-- END Content -->
  66. {% block footer %}<div id="footer"></div>{% endblock %}
  67. </div>
  68. <!-- END Container -->
  69. </body>
  70. </html>