layout.html 1.4 KB

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