kopia lustrzana https://github.com/wagtail/wagtail
Split breadcrumb template into chooser/explorer versions instead of 'choosing' flag
rodzic
ff44666c36
commit
44508fd7bb
|
|
@ -1,7 +1,7 @@
|
|||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
<h2>{% trans "Explorer" %}</h2>
|
||||
{% include "wagtailadmin/shared/breadcrumb.html" with page=parent_page choosing=1 %}
|
||||
{% include "wagtailadmin/shared/chooser_breadcrumb.html" with page=parent_page %}
|
||||
|
||||
{% if pages %}
|
||||
{% include "wagtailadmin/pages/listing/_list_choose.html" with allow_navigation=1 orderable=0 pages=pages parent_page=parent_page %}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
{% load i18n wagtailadmin_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
{% for page in page.get_ancestors %}
|
||||
{% if page.is_root %}
|
||||
<li class="home"><a href="{% if choosing %}{% url 'wagtailadmin_choose_page_child' page.id %}{% querystring p=None %}{% else %}{% url 'wagtailadmin_explore_root' %}{% endif %}" class="{% if choosing %}navigate-pages{% endif %} icon icon-home text-replace">{% trans 'Home' %}</a></li>
|
||||
<li class="home"><a href="{% url 'wagtailadmin_explore_root' %}" class="icon icon-home text-replace">{% trans 'Home' %}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% if choosing %}{% url 'wagtailadmin_choose_page_child' page.id %}{% querystring p=None %}{% else %}{% url 'wagtailadmin_explore' page.id %}{% endif %}" {% if choosing %}class="navigate-pages"{% endif %}>{{ page.get_admin_display_title }}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_explore' page.id %}">{{ page.get_admin_display_title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if include_self %}
|
||||
<li><a href="{% if choosing %}{% url 'wagtailadmin_choose_page_child' page.id %}{% querystring p=None %}{% else %}{% url 'wagtailadmin_explore' page.id %}{% endif %}" {% if choosing %}class="navigate-pages"{% endif %}>{{ page.get_admin_display_title }}</a></li>
|
||||
<li><a href="{% url 'wagtailadmin_explore' page.id %}">{{ page.get_admin_display_title }}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
{% for page in page.get_ancestors %}
|
||||
{% if page.is_root %}
|
||||
<li class="home"><a href="{% url 'wagtailadmin_choose_page_child' page.id %}{% querystring p=None %}" class="navigate-pages icon icon-home text-replace">{% trans 'Home' %}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{% url 'wagtailadmin_choose_page_child' page.id %}{% querystring p=None %}" class="navigate-pages">{{ page.get_admin_display_title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Ładowanie…
Reference in New Issue