mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-14 02:03:11 +00:00
move navigation field for choose/explore/move into separate includes
This commit is contained in:
parent
455a40e80c
commit
ff85146426
4 changed files with 44 additions and 19 deletions
|
|
@ -92,25 +92,13 @@
|
|||
<span class="status-tag {% if page.status_string != "draft" %}primary{% endif %}">{{ page.status_string }}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="{% if allow_navigation %}{% if choosing %}{% if page.can_descend %} children{% endif%}{% elif moving %}{% if page.can_descend %} children{% endif%}{% elif allow_navigation and page.is_navigable %} children{% else %}no-children{% endif %}{% endif %}">
|
||||
{% if allow_navigation %}
|
||||
{% if moving %}
|
||||
{% if page.can_descend %}
|
||||
<a href="{% url 'wagtailadmin_pages_move_choose_destination' page_to_move.id page.id %}" class="icon text-replace icon-arrow-right navigate-pages" title="{% blocktrans with title=page.title %}Explorer subpages of '{{ title }}'{% endblocktrans %}">{% trans 'Explore' %}</a>
|
||||
{% endif %}
|
||||
{% elif choosing %}
|
||||
{% if page.can_descend %}
|
||||
<a href="{% url 'wagtailadmin_choose_page_child' page.id %}?{{ querystring }}" class="icon text-replace icon-arrow-right navigate-pages" title="{% blocktrans with title=page.title %}Explorer subpages of '{{ title }}'{% endblocktrans %}">{% trans 'Explore' %}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if page.is_navigable %}
|
||||
<a href="{% url 'wagtailadmin_explore' page.id %}" class="icon text-replace icon-arrow-right" title="{% blocktrans with title=page.title %}Explore child pages of '{{ title }}'{% endblocktrans %}">{% trans "Explore" %}</a>
|
||||
{% elif page_perms.can_add_subpage %}
|
||||
<a href="{% url 'wagtailadmin_pages_add_subpage' page.id %}" class="icon text-replace icon-plus-inverse" title="{% blocktrans with title=page.title %}Add a child page to '{{ title }}'{% endblocktrans %}">{% trans 'Add subpage' %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if moving %}
|
||||
{% include "wagtailadmin/pages/listing/_navigation_move.html" %}
|
||||
{% elif choosing %}
|
||||
{% include "wagtailadmin/pages/listing/_navigation_choose.html" %}
|
||||
{% else %}
|
||||
{% include "wagtailadmin/pages/listing/_navigation_explore.html" %}
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% comment %}
|
||||
Navigation controls for the page listing in 'choose' mode
|
||||
{% endcomment %}
|
||||
|
||||
<td class="{% if allow_navigation and page.can_descend %}children{% endif %}">
|
||||
{% if allow_navigation and page.can_descend %}
|
||||
<a href="{% url 'wagtailadmin_choose_page_child' page.id %}?{{ querystring }}" class="icon text-replace icon-arrow-right navigate-pages" title="{% blocktrans with title=page.title %}Explore subpages of '{{ title }}'{% endblocktrans %}">{% trans 'Explore' %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% comment %}
|
||||
Navigation controls for the page listing in 'explore' mode
|
||||
{% endcomment %}
|
||||
|
||||
<td class="{% if allow_navigation %}{% if page.is_navigable %}children{% else %}no-children{% endif %}{% endif %}">
|
||||
{% if allow_navigation %}
|
||||
{% if page.is_navigable %}
|
||||
<a href="{% url 'wagtailadmin_explore' page.id %}" class="icon text-replace icon-arrow-right" title="{% blocktrans with title=page.title %}Explore child pages of '{{ title }}'{% endblocktrans %}">{% trans "Explore" %}</a>
|
||||
{% elif page_perms.can_add_subpage %}
|
||||
<a href="{% url 'wagtailadmin_pages_add_subpage' page.id %}" class="icon text-replace icon-plus-inverse" title="{% blocktrans with title=page.title %}Add a child page to '{{ title }}'{% endblocktrans %}">{% trans 'Add subpage' %}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% comment %}
|
||||
Navigation controls for the page listing in 'move' mode
|
||||
{% endcomment %}
|
||||
|
||||
<td class="{% if allow_navigation and page.can_descend %}children{% endif %}">
|
||||
{% if allow_navigation and page.can_descend %}
|
||||
<a href="{% url 'wagtailadmin_pages_move_choose_destination' page_to_move.id page.id %}" class="icon text-replace icon-arrow-right navigate-pages" title="{% blocktrans with title=page.title %}Explore subpages of '{{ title }}'{% endblocktrans %}">{% trans 'Explore' %}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
Loading…
Reference in a new issue