layout.html 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. {% extends "admin/layout.html" %}
  2. {% load i18n %}
  3. {% load l10n %}
  4. {% load url from future %}
  5. {% from "admin/macros.html" import page_title, draw_message %}
  6. {% import "_forms.html" as form_theme with context %}
  7. {% block title %}{% if admin.actions[0].id != action.id and action.name -%}
  8. {% if target %}{{ page_title(parent=action.name, title=target) }}{% else %}{{ page_title(title=action.name) }}{% endif %}
  9. {%- else -%}
  10. {{ page_title(title=admin.name) }}
  11. {%- endif %}{% endblock %}
  12. {% block content %}
  13. <div class="page-header{% if admin.actions|length > 1 %} tabs-header{% endif %}">
  14. <h1>{{ admin.name }}{% if admin.help %} <small>{{ admin.help }}</small>{% endif %}</h1>
  15. {% if admin.actions|length > 1 %}<ul class="nav nav-tabs">{% for item in admin.actions %}
  16. <li{% if action.id == item.id %} class="active"{% endif %}><a href="{{ item.route|url() }}"{% if action.id != item.id and item.help %} class="tooltip-bottom" title="{{ item.help }}"{% endif %}>{{ item.name }}</a></li>{% endfor %}
  17. </ul>{% endif %}
  18. </div>
  19. {% if admin.actions[0].id != action.id -%}
  20. <h2>{% if target %}{{ target }} <small>{{ action.name }}</small>{% else %}{{ action.name }}{% if action.help %} <small>{{ action.help }}</small>{% endif %}{% endif %}</h2>
  21. {% endif %}
  22. {% for message in messages_log %}
  23. {{ draw_message(message, 'alert-form') }}
  24. {% endfor %}
  25. {% if message %}
  26. {{ draw_message(message, 'alert-form') }}
  27. {% endif %}
  28. {% block page_help %}{% endblock %}
  29. {% block action_body %}
  30. {% endblock %}
  31. {% endblock %}