mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Use main listing template in chooser
This commit is contained in:
parent
aa4edc67d3
commit
8ed3b79706
@ -1,29 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% url "wagtailsnippets:choose" content_type.app_label content_type.model as linkurl %}
|
||||
|
||||
<table class="listing" id="snippet-chooser-list" data-url="{{ linkurl }}">
|
||||
<col />
|
||||
<col />
|
||||
<col width="16%" />
|
||||
<thead>
|
||||
<tr class="table-headers">
|
||||
<th>{% trans "Title" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for snippet in items %}
|
||||
<tr>
|
||||
<td class="title">
|
||||
{% if choosing %}
|
||||
<h2><a class="snippet-choice" href="{% url 'wagtailsnippets:chosen' content_type.app_label content_type.model snippet.id %}">{{ snippet }}</a></h2>
|
||||
{% else %}
|
||||
<h2><a href="{% url 'wagtailsnippets:edit' content_type.app_label content_type.model snippet.id %}">{{ snippet }}</a></h2>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=items is_ajax=1 %}
|
@ -1,6 +1,8 @@
|
||||
{% load i18n %}
|
||||
{% if items %}
|
||||
{% include "wagtailsnippets/chooser/list.html" with choosing=1 %}
|
||||
{% include "wagtailsnippets/snippets/list.html" with choosing=1 %}
|
||||
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=items is_ajax=1 %}
|
||||
{% else %}
|
||||
{% url 'wagtailsnippets:add' content_type.app_label content_type.model as wagtailsnippets_create_snippet_url %}
|
||||
<p>{% blocktrans %}You haven't created any {{ snippet_type_name }} snippets. Why not <a href="{{ wagtailsnippets_create_snippet_url }}" target="_blank">create one now{% endblocktrans %}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user