Check preview mode before displaying the button

pull/6395/head
Dino Perovic 2020-09-03 12:12:41 +02:00 zatwierdzone przez Matt Westcott
rodzic 69919d1687
commit 1267468c4c
4 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -24,6 +24,7 @@ Changelog
* Fix: Avoid use of `icon` class name on userbar icon to prevent clashes with front-end styles (Karran Besen)
* Fix: Prevent focused button labels from displaying as white on white (Karran Bessen)
* Fix: Avoid showing preview button on moderation dashboard for page types with preview disabled (Dino Perovic)
2.10.1 (26.08.2020)

Wyświetl plik

@ -476,6 +476,7 @@ Contributors
* Robbie Mackay
* Vyacheslav Matyukhin
* Vince Salvino
* Dino Perovic
Translators
===========

Wyświetl plik

@ -15,3 +15,4 @@ Bug fixes
* Avoid use of ``icon`` class name on userbar icon to prevent clashes with front-end styles (Karran Besen)
* Prevent focused button labels from displaying as white on white (Karran Bessen)
* Avoid showing preview button on moderation dashboard for page types with preview disabled (Dino Perovic)

Wyświetl plik

@ -42,9 +42,11 @@
<a href="{% url 'wagtailadmin_pages:edit' revision.page.id %}" class="button button-small button-secondary">{% trans 'Edit' %}</a>
</li>
{% endif %}
<li>
<a href="{% url 'wagtailadmin_pages:workflow_preview' revision.page.id task_state.task.id %}" class="button button-small button-secondary">{% trans 'Preview' %}</a>
</li>
{% if revision.page.is_previewable %}
<li>
<a href="{% url 'wagtailadmin_pages:workflow_preview' revision.page.id task_state.task.id %}" class="button button-small button-secondary">{% trans 'Preview' %}</a>
</li>
{% endif %}
</ul>
{% endif %}
</td>