mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Simplify page_types_usage.html template
This report doesn't extend PageReportView or base_page_report.html, there's no reason for it to follow the structure of base_page_report.html (having no_results block, the extra wrapper div, etc.). Simplify this template to follow other non-page reports, so we can unify them to use a separate results template in the next commit.
This commit is contained in:
parent
f526702762
commit
3a2a362c6d
@ -2,17 +2,9 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block results %}
|
||||
{% with object_list as page_types %}
|
||||
<div id="page-results">
|
||||
{% if page_types %}
|
||||
{% block listing %}
|
||||
{% include "wagtailadmin/reports/listing/_list_page_types_usage.html" %}
|
||||
{% endblock listing %}
|
||||
{% else %}
|
||||
{% block no_results %}
|
||||
<p>{% trans "No page types found." %}</p>
|
||||
{% endblock no_results %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endblock results %}
|
||||
{% if object_list %}
|
||||
{% include "wagtailadmin/reports/listing/_list_page_types_usage.html" with page_types=object_list %}
|
||||
{% else %}
|
||||
<p>{% trans "No page types found." %}</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user