/django/contrib/admin/templates/mako/admin/base.html

https://code.google.com/p/mango-py/ · HTML · 110 lines · 81 code · 21 blank · 8 comment · 0 complexity · 6a049a531041a629fd71812013afa1d4 MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="${LANGUAGE_CODE}" xml:lang="${LANGUAGE_CODE}"
  3. % if LANGUAGE_BIDI:
  4. dir="rtl"
  5. % endif
  6. >
  7. <%namespace name="admin" module="django.contrib.admin.templatetags.adminmedia" />
  8. <%!
  9. import django.core.urlresolvers as resolvers
  10. %>
  11. <head>
  12. <%def name="block_title()">Undefined</%def>
  13. <title>${self.block_title()}</title>
  14. <%def name="block_stylesheet()">${admin_media_prefix()}css/base.css</%def>
  15. <%def name="block_stylesheet_rtl()">${admin_media_prefix()}css/rtl.css</%def>
  16. <link rel="stylesheet" type="text/css" href="${self.block_stylesheet()}" />
  17. <link rel="stylesheet" type="text/css" href="${next.block_stylesheet()}" />
  18. <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% load adminmedia %}{% admin_media_prefix %}css/ie.css{% endblock %}" /><![endif]-->
  19. % if LANGUAGE_BIDI:
  20. <link rel="stylesheet" type="text/css" href="${self.block_stylesheet_rtl()}<%def name="block_stylesheet_rtl()">${admin_media_prefix()}css/rtl.css</%def>" />
  21. % endif
  22. <script type="text/javascript">window.__admin_media_prefix__ = "${ escapejs( admin_media_prefix() ) }";</script>
  23. <!-- STYLES -->
  24. ${self.block_extrastyle()}<%def name="block_extrastyle()"></%def>
  25. ${self.block_extrahead()}<%def name="block_extrahead()"></%def>
  26. ${self.block_blockbots()}<%def name="block_blockbots()"><meta name="bang" content="pop"/><meta name="robots" content="NONE,NOARCHIVE" /></%def>
  27. </head>
  28. <body class="
  29. % if is_popup:
  30. popup
  31. % endif
  32. ${self.block_bodyclass()}<%def name="block_bodyclass()"></%def>">
  33. <!-- Container -->
  34. <div id="container">
  35. % if not is_popup:
  36. <!-- Header -->
  37. <div id="header">
  38. <div id="branding">
  39. ${self.block_branding()}<%def name="block_branding()"></%def>
  40. </div>
  41. % if user.is_active and user.is_staff:
  42. <div id="user-tools">${ trans('Welcome,') } <strong>
  43. % if user.first_name:
  44. ${ force_escape(user.first_name)}
  45. % else:
  46. ${ force_escape(user.username)}
  47. % endif
  48. </strong>. ${self.block_userlinks()}<%def name="block_userlinks()"><% docsroot = url(django_admindocs_docroot) %>
  49. % if docsroot:
  50. <a href="${docsroot}">${trans('Documentation')}</a> /
  51. % endif
  52. <a href="${ (root_path+'password_change/') if not resolvers.reverse('admin:password_change') else resolvers.reverse('admin:password_change') }">${trans('Change password')}</a> / <a href="${ (root_path+'logout/') if not resolvers.reverse('admin:logout') else resolvers.reverse('admin:logout') }">${trans('Log out')}</a></%def></div>
  53. % endif
  54. ${self.block_nav_global()}<%def name="block_nav_global()"></%def>
  55. </div>
  56. <!-- END Header -->
  57. ${self.block_breadcrumbs()}<%def name="block_breadcrumbs()"><div class="breadcrumbs"><a href="/">${trans('Home')}</a>
  58. % if title:
  59. &rsaquo; ${title}
  60. % endif
  61. </div></%def>
  62. % endif
  63. % if messages:
  64. <ul class="messagelist">
  65. % for message in messages:
  66. <li>${message}</li>
  67. % endfor
  68. </ul>
  69. % endif
  70. <!-- Content -->
  71. <div id="content" class="${self.block_coltype()}<%def name="block_coltype()">colM</%def>">
  72. ${self.block_pretitle()}<%def name="block_pretitle()"></%def>
  73. ${self.block_content_title()}<%def name="block_content_title()">
  74. % if title:
  75. <h1>${title}</h1>
  76. % endif
  77. </%def>
  78. <%def name="block_content()">
  79. <%def name="block_object_tools()"></%def>${block_object_tools()}
  80. </%def>${self.block_content()}
  81. <%def name="block_sidebar()"></%def>${self.block_sidebar()}
  82. <br class="clear" />
  83. </div>
  84. <!-- END Content -->
  85. ${self.block_footer()}<%def name="block_footer()"><div id="footer"></div></%def>
  86. </div>
  87. <!-- END Container -->
  88. </body>
  89. </html>