mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 01:03:11 +00:00
Only show signposting messages when a parent page exists.
This prevents them from appearing on other views that piggyback on list_explore and really shouldn't: search results and page usage.
This commit is contained in:
parent
e1cadf7ef3
commit
71923a428a
1 changed files with 33 additions and 31 deletions
|
|
@ -10,45 +10,47 @@
|
|||
|
||||
{% block post_parent_page_headers %}
|
||||
|
||||
{% if parent_page.is_root %}
|
||||
<tr><td colspan="6"><div class="help-block help-info">
|
||||
{% if perms.wagtailcore.add_site %}
|
||||
{% url 'wagtailsites:index' as wagtailsites_index_url %}
|
||||
<p>
|
||||
{% if parent_page %}
|
||||
{% if parent_page.is_root %}
|
||||
<tr><td colspan="6"><div class="help-block help-info">
|
||||
{% if perms.wagtailcore.add_site %}
|
||||
{% url 'wagtailsites:index' as wagtailsites_index_url %}
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
The root level is where you can add new sites to your Wagtail installation. Pages created here will not be accessible at any URL until they are associated with a site.
|
||||
{% endblocktrans %}
|
||||
{% if wagtailsites_index_url %}
|
||||
<a href="{{ wagtailsites_index_url }}">{% trans "Configure a site now." %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
If you just want to add pages to an existing site, create them as children of the homepage instead.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
The root level is where you can add new sites to your Wagtail installation. Pages created here will not be accessible at any URL until they are associated with a site.
|
||||
Pages created here will not be accessible at any URL. To add pages to an existing site, create them as children of the homepage.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</div></td></tr>
|
||||
{% elif not parent_page.url %}
|
||||
<tr><td colspan="6"><div class="help-block help-warning">
|
||||
{% if perms.wagtailcore.add_site %}
|
||||
{% url 'wagtailsites:index' as wagtailsites_index_url %}
|
||||
{% blocktrans %}
|
||||
There is no site set up for this location. Pages created here will not be accessible at any URL until a site is associated with this location.
|
||||
{% endblocktrans %}
|
||||
{% if wagtailsites_index_url %}
|
||||
<a href="{{ wagtailsites_index_url }}">{% trans "Configure a site now." %}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
If you just want to add pages to an existing site, create them as children of the homepage instead.
|
||||
There is no site record for this location. Pages created here will not be accessible at any URL.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
Pages created here will not be accessible at any URL. To add pages to an existing site, create them as children of the homepage.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</div></td></tr>
|
||||
{% elif not parent_page.url %}
|
||||
<tr><td colspan="6"><div class="help-block help-warning">
|
||||
{% if perms.wagtailcore.add_site %}
|
||||
{% url 'wagtailsites:index' as wagtailsites_index_url %}
|
||||
{% blocktrans %}
|
||||
There is no site set up for this location. Pages created here will not be accessible at any URL until a site is associated with this location.
|
||||
{% endblocktrans %}
|
||||
{% if wagtailsites_index_url %}
|
||||
<a href="{{ wagtailsites_index_url }}">{% trans "Configure a site now." %}</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% blocktrans %}
|
||||
There is no site record for this location. Pages created here will not be accessible at any URL.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</div></td></tr>
|
||||
</div></td></tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include "wagtailadmin/pages/listing/_table_headers_explore.html" %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue