kopia lustrzana https://github.com/wagtail/wagtail
Extract history icon link for slim header's actions into a template include
rodzic
bc2004cf7b
commit
569552570f
|
@ -18,15 +18,8 @@
|
||||||
{% include "wagtailadmin/shared/side_panel_toggles.html" %}
|
{% include "wagtailadmin/shared/side_panel_toggles.html" %}
|
||||||
{# Page history #}
|
{# Page history #}
|
||||||
{% if parent_page.get_latest_revision %}
|
{% if parent_page.get_latest_revision %}
|
||||||
<a href="{% url 'wagtailadmin_pages:history' parent_page.id %}"
|
{% url 'wagtailadmin_pages:history' parent_page.id as history_url %}
|
||||||
class="{{ nav_icon_button_classes }}"
|
{% include "wagtailadmin/shared/headers/_history_icon_link.html" with history_url=history_url nav_icon_button_classes=nav_icon_button_classes nav_icon_classes=nav_icon_classes only %}
|
||||||
aria-label="{% trans 'History' %}"
|
|
||||||
data-controller="w-tooltip"
|
|
||||||
data-w-tooltip-content-value="{% trans 'History' %}"
|
|
||||||
data-w-tooltip-offset-value="[0, 0]"
|
|
||||||
>
|
|
||||||
{% icon name="history" classname=nav_icon_classes %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "wagtailadmin/shared/page_status_tag_new.html" with page=parent_page %}
|
{% include "wagtailadmin/shared/page_status_tag_new.html" with page=parent_page %}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% load wagtailadmin_tags i18n %}
|
||||||
|
|
||||||
|
<a href="{{ history_url }}"
|
||||||
|
class="{{ nav_icon_button_classes }}"
|
||||||
|
aria-label="{% trans 'History' %}"
|
||||||
|
data-controller="w-tooltip"
|
||||||
|
data-w-tooltip-content-value="{% trans 'History' %}"
|
||||||
|
data-w-tooltip-offset-value="[0, 0]"
|
||||||
|
>
|
||||||
|
{% icon name="history" classname=nav_icon_classes %}
|
||||||
|
</a>
|
|
@ -19,15 +19,8 @@
|
||||||
|
|
||||||
{# Page history #}
|
{# Page history #}
|
||||||
{% if page.get_latest_revision %}
|
{% if page.get_latest_revision %}
|
||||||
<a href="{% url 'wagtailadmin_pages:history' page.id %}"
|
{% url 'wagtailadmin_pages:history' page.id as history_url %}
|
||||||
class="{{ nav_icon_button_classes }}"
|
{% include "wagtailadmin/shared/headers/_history_icon_link.html" with history_url=history_url nav_icon_button_classes=nav_icon_button_classes nav_icon_classes=nav_icon_classes only %}
|
||||||
aria-label="{% trans 'History' %}"
|
|
||||||
data-controller="w-tooltip"
|
|
||||||
data-w-tooltip-content-value="{% trans 'History' %}"
|
|
||||||
data-w-tooltip-offset-value="[0, 0]"
|
|
||||||
>
|
|
||||||
{% icon name="history" classname=nav_icon_classes %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "wagtailadmin/shared/page_status_tag_new.html" with page=page_for_status %}
|
{% include "wagtailadmin/shared/page_status_tag_new.html" with page=page_for_status %}
|
||||||
|
|
|
@ -5,13 +5,5 @@
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
{# Object history #}
|
{# Object history #}
|
||||||
<a href="{{ view.get_history_url }}"
|
{% include "wagtailadmin/shared/headers/_history_icon_link.html" with history_url=history_url nav_icon_button_classes=nav_icon_button_classes nav_icon_classes=nav_icon_classes only %}
|
||||||
class="{{ nav_icon_button_classes }}"
|
|
||||||
aria-label="{% trans 'History' %}"
|
|
||||||
data-controller="w-tooltip"
|
|
||||||
data-w-tooltip-content-value="{% trans 'History' %}"
|
|
||||||
data-w-tooltip-offset-value="[0, 0]"
|
|
||||||
>
|
|
||||||
{% icon name="history" classname=nav_icon_classes %}
|
|
||||||
</a>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Ładowanie…
Reference in New Issue