Open preview in new window (#6395)

Make this preview button match the other Preview/Draft/Live buttons in admin UI
pull/6422/head
Cynthia Kiser 2020-09-21 20:31:57 -07:00 zatwierdzone przez Matt Westcott
rodzic 48a8af71e5
commit b817e869bf
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -21,6 +21,7 @@ Changelog
* Slug generation no longer removes stopwords (Andy Chosak, Scott Cranfill)
* Add check to disallow StreamField block names that do not match Python variable syntax (François Poulain)
* The `BASE_URL` setting is now converted to a str, if it isn't already, when constructing API URLs (thenewguy)
* Preview from 'pages awaiting moderation' now opens in a new window (Cynthia Kiser)
* Fix: Make page-level actions accessible to keyboard users in page listing tables (Jesse Menn)
* Fix: `WAGTAILFRONTENDCACHE_LANGUAGES` was being interpreted incorrectly. It now accepts a list of strings, as documented (Karl Hobley)
* Fix: Update oEmbed endpoints to use https where available (Matt Westcott)

Wyświetl plik

@ -30,6 +30,7 @@ Other features
* Slug generation no longer removes stopwords (Andy Chosak, Scott Cranfill)
* Add check to disallow StreamField block names that do not match Python variable syntax (François Poulain)
* The ``BASE_URL`` setting is now converted to a str, if it isn't already, when constructing API URLs (thenewguy)
* Preview from 'pages awaiting moderation' now opens in a new window (Cynthia Kiser)
Bug fixes

Wyświetl plik

@ -44,7 +44,7 @@
{% endif %}
{% 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>
<a href="{% url 'wagtailadmin_pages:workflow_preview' revision.page.id task_state.task.id %}" class="button button-small button-secondary" target="_blank" rel="noopener noreferrer">{% trans 'Preview' %}</a>
</li>
{% endif %}
</ul>