Add blocks for 'request_forms', 'main_content' and 'edit_forms' to make the template easier to extend

This commit is contained in:
Andy Babic 2018-11-27 17:39:44 +00:00
parent 11edf572c5
commit c33e762c2a

View File

@ -76,6 +76,7 @@
{% block content %}
<div class="region" aria-label="{% trans "request form" %}">
{% block request_forms %}
{% if 'GET' in allowed_methods %}
<form id="get-form" class="pull-right">
<fieldset>
@ -148,9 +149,11 @@
{% trans "Filters" %}
</button>
{% endif %}
{% endblock request_forms %}
</div>
<div class="content-main" role="main" aria-label="{% trans "main content" %}">
{% block main_content %}
<div class="page-header">
<h1>{{ name }}</h1>
</div>
@ -176,8 +179,10 @@
</span>{{ content|urlize_quoted_links }}</pre>{% endautoescape %}
</div>
{% endblock %}
</div>
{% block edit_forms %}
{% if display_edit_forms %}
{% if post_form or raw_data_post_form %}
<div {% if post_form %}class="tabbable"{% endif %}>
@ -273,6 +278,7 @@
</div>
{% endif %}
{% endif %}
{% endblock edit_forms %}
{% endblock content %}
</div><!-- /.content -->
</div><!-- /.container -->