{% extends 'layouts/base.html' %} {% import 'macros/form_macros.html' as f %} {% set deletion_endpoint = 'templates.delete_template_request' %} {% set endpoints = [ ('templates.template_info', 'Template Information'), ('templates.template_content', 'Template Content'), (deletion_endpoint, 'Delete Template') ] %} {% macro navigation(items) %} {% endmacro %} {# Show data for template #} {% macro template_info(template) %}
Template Name{{ template.name }}
Template URL{{ template.url }}
{% endmacro %} {% block content %}
Back to all templates

{{ template.name }}
View and manage {{ template.name }}.

{{ navigation(endpoints) }}
{# Show deletion tab if it's clicked on #} {% if request.endpoint == deletion_endpoint %}

This action is permanent
Deleting a template is not a reversible change. Any apps associated with this template will be removed, and cannot be recovered.

Delete this template
{% elif form %} {# Not currently used #} {{ f.render_form(form) }} {% elif apps %} {# Show application list #}
Apps
{%- for n, l in apps %}
{{ n }}
{%- endfor %}
{% else %} {# Show template info listed above #} {{ template_info(template) }} {% endif %}
{% endblock %}