diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bf453797c9..02c04f7d9d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -46,6 +46,7 @@ Changelog * Fix: Remove unused header search JavaScript on the redirects import page (LB (Ben) Johnston) * Fix: Ensure non-square avatar images will correctly show throughout the admin (LB (Ben) Johnston) * Fix: Ignore translations in test files and re-include some translations that were accidentally ignored (Stefan Hammer) + * Fix: Show alternative message when no page types are available to be created (Jaspreet Singh) 3.0.1 (xx.xx.xxxx) - IN DEVELOPMENT diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index ddfdcf60e0..2e210cf6bf 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -601,6 +601,7 @@ Contributors * Thiago Costa de Souza * Benedict Faw * Lucie Le Frapper +* Jaspreet Singh Translators =========== diff --git a/docs/releases/4.0.md b/docs/releases/4.0.md index a878ce1885..7a797c13e7 100644 --- a/docs/releases/4.0.md +++ b/docs/releases/4.0.md @@ -60,6 +60,7 @@ When using a queryset to render a list of images, you can now use the ``prefetch * Remove unused header search JavaScript on the redirects import page (LB (Ben) Johnston) * Ensure non-square avatar images will correctly show throughout the admin (LB (Ben) Johnston) * Ignore translations in test files and re-include some translations that were accidentally ignored (Stefan Hammer) + * Show alternative message when no page types are available to be created (Jaspreet Singh) ## Upgrade considerations diff --git a/wagtail/admin/templates/wagtailadmin/pages/add_subpage.html b/wagtail/admin/templates/wagtailadmin/pages/add_subpage.html index 18e360684a..7f48e93a3a 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/add_subpage.html +++ b/wagtail/admin/templates/wagtailadmin/pages/add_subpage.html @@ -9,7 +9,11 @@ {% include "wagtailadmin/shared/header.html" with title=create_str subtitle=parent_page.get_admin_display_title icon="doc-empty-inverse" %}
{% trans "Choose which type of page you'd like to create." %}
+ {% if page_types %} +{% trans "Choose which type of page you'd like to create." %}
+ {% else %} +{% trans "Sorry, you cannot create a page at this location." %}
+ {% endif %} {% if page_types %}