Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{% load wagtailadmin_tags %}
{% comment %}
JavaScript declarations to be included on the 'create page' and 'edit page' views
{% endcomment %}
<script src="{% versioned_static 'wagtailadmin/js/comments.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/vendor/rangy-core.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/expanding-formset.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/preview-panel.js' %}"></script>
<script src="{% versioned_static 'wagtailadmin/js/privacy-switch.js' %}"></script>
{% hook_output 'insert_editor_js' %}

View File

@@ -0,0 +1,33 @@
{% load wagtailadmin_tags i18n %}
<div
class="footer__container footer__container--hidden"
aria-live="polite"
data-controller="w-messages"
data-action="w-unsaved:add@document->w-messages#add w-unsaved:clear@document->w-messages#clear"
data-w-messages-clear-delay-value="1024"
data-w-messages-clear-param="true"
data-w-messages-hide-class="footer__container--hidden"
>
<div class="footer__save-warning footer__emphasise-span-tags" data-w-messages-target="container"></div>
{% block message_templates %}
{% trans 'Save the page before leaving' as generic_save_page_message %}
<template data-w-messages-target="template" data-type="edits">
<div>
<b>{% blocktrans trimmed %}You have <span>unsaved edits</span>{% endblocktrans %}</b>
<p>{{ generic_save_page_message }}</p>
</div>
</template>
<template data-w-messages-target="template" data-type="comments">
<div>
<b>{% blocktrans trimmed %}You have <span>unsaved comments</span>{% endblocktrans %}</b>
<p>{{ generic_save_page_message }}</p>
</div>
</template>
<template data-w-messages-target="template" data-type="all">
<div>
<b>{% blocktrans trimmed %}You have <span>unsaved edits</span> and <span>comments</span>{% endblocktrans %}</b>
<p>{{ generic_save_page_message }}</p>
</div>
</template>
{% endblock %}
</div>

View File

@@ -0,0 +1,11 @@
{% load wagtailadmin_tags %}
{% if show_menu %}
{% dropdown_button button=default_menu_item toggle_icon="arrow-up" keep_mounted=True %}
{% for item in rendered_menu_items %}
{{ item }}
{% endfor %}
{% enddropdown_button %}
{% elif default_menu_item %}
{{ default_menu_item }}
{% endif %}

View File

@@ -0,0 +1,6 @@
{% load wagtailadmin_tags %}
{% if url %}
<a class="button{% if classname %} {{ classname }}{% endif %}" href="{{ url }}">{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}</a>
{% else %}
<button type="submit" name="{{ name }}" value="{{ label }}" class="button{% if classname %} {{ classname }}{% endif %}">{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}</button>
{% endif %}

View File

@@ -0,0 +1,5 @@
{% load i18n wagtailadmin_tags %}
<button type="submit" class="button action-save {% if is_revision %}warning{% endif %}" disabled>
{% if icon_name %}{% icon name=icon_name %}{% endif %}
{% trans 'Page locked' %}
</button>

View File

@@ -0,0 +1,14 @@
{% load i18n wagtailadmin_tags %}
<button
type="submit"
name="action-publish"
value="action-publish"
class="button button-longrunning {% if is_revision %}warning{% endif %}"
data-controller="w-progress"
data-action="w-progress#activate"
data-w-progress-active-value="{% trans 'Publishing…' %}"
>
{% if icon_name %}{% icon name=icon_name classname="button-longrunning__icon" %}{% endif %}
{% icon name="spinner" %}
<em data-w-progress-target="label">{% if is_revision %}{% trans 'Publish this version' %}{% else %}{{ label }}{% endif %}</em>
</button>

View File

@@ -0,0 +1,14 @@
{% load i18n wagtailadmin_tags %}
<button
type="submit"
class="button action-save button-longrunning {% if is_revision %}warning{% endif %}"
data-controller="w-progress w-kbd"
data-action="w-progress#activate"
data-w-kbd-key-value="mod+s"
data-w-kbd-scope-value="global"
data-w-progress-active-value="{% trans 'Saving…' %}"
>
{% icon name="draft" classname="button-longrunning__icon" %}
{% icon name="spinner" %}
<em data-w-progress-target="label">{% if is_revision %}{% trans 'Replace current draft' %}{% else %}{% trans 'Save draft' %}{% endif %}</em>
</button>

View File

@@ -0,0 +1,4 @@
{% load wagtailadmin_tags %}
<button class="button" data-workflow-action-name="{{ name }}" {% if launch_modal %}data-workflow-action-modal-url="{% url 'wagtailadmin_pages:collect_workflow_action_data' page.id name current_task_state.id %}"{% endif %}>
{% if icon_name %}{% icon name=icon_name %}{% endif %}{{ label }}
</button>

View File

@@ -0,0 +1,42 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% load wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=parent_page.get_admin_display_title %}Create a page in {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Create a page in") subtitle=parent_page.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
{% if page_types %}
<p>{% trans "Choose which type of page you'd like to create." %}</p>
{% else %}
<p>{% trans "Sorry, you cannot create a page at this location." %}</p>
{% endif %}
{% if page_types %}
<ul class="listing">
{% for verbose_name, app_label, model_name, page_description in page_types %}
<li>
<div class="row row-flush">
<div class="col8">
<a href="{% url 'wagtailadmin_pages:add' app_label model_name parent_page.id %}{% if next %}?next={{ next }}{% endif %}">
{% icon name="plus-inverse" classname="default w-mr-1 w-align-middle" %}
{{ verbose_name }}
{% if page_description %}
<div><span class="w-sr-only">.</span><small>{{ page_description }}</small></div>
{% endif %}
</a>
</div>
<small class="col4" style="text-align:end">
<a href="{% url 'wagtailadmin_pages:type_use' app_label model_name %}" class="nolink">{% blocktrans trimmed with page_type=verbose_name %}Pages using {{ page_type }}{% endblocktrans %}</a>
</small>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,47 @@
{% extends 'wagtailadmin/bulk_actions/confirmation/base.html' %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed count counter=items|length %}Delete 1 page {% plural %}Delete {{ counter }} pages{% endblocktrans %}{% endblock %}
{% block header %}
{% include "wagtailadmin/shared/header.html" with title=_("Delete") icon="doc-empty-inverse" %}
{% endblock header %}
{% block items_with_access %}
{% if items %}
<p>{% trans "Are you sure you want to delete these pages?" %}</p>
<ul>
{% for page in items %}
<li>
<a href="{% url 'wagtailadmin_pages:edit' page.item.id %}" target="_blank" rel="noreferrer">{{ page.item.get_admin_display_title }}</a>
{% if page.descendant_count %}
<p>
{% blocktrans trimmed count counter=page.descendant_count %}
This will also delete one more subpage.
{% plural %}
This will also delete {{ counter }} more subpages.
{% endblocktrans %}
</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock items_with_access %}
{% block items_with_no_access %}
{% blocktrans trimmed asvar no_access_msg count counter=items_with_no_access|length %}You don't have permission to delete this page{% plural %}You don't have permission to delete these pages{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=items_with_no_access no_access_msg=no_access_msg %}
{% endblock items_with_no_access %}
{% block form_section %}
{% if items %}
{% trans 'Yes, delete' as action_button_text %}
{% trans "No, don't delete" as no_action_button_text %}
{% include 'wagtailadmin/bulk_actions/confirmation/form.html' with action_button_class="serious" %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/go_back.html' %}
{% endif %}
{% endblock form_section %}

View File

@@ -0,0 +1,63 @@
{% extends 'wagtailadmin/bulk_actions/confirmation/base.html' %}
{% load i18n %}
{% block titletag %}{% blocktrans trimmed count counter=items|length %}Move 1 page{% plural %}Move {{ counter }} pages{% endblocktrans %}
{% endblock %}
{% block header %}
{% include "wagtailadmin/shared/header.html" with title=_("Move") icon="doc-empty-inverse" %}
{% endblock header %}
{% block items_with_access %}
{% if items %}
<p>{% trans "Are you sure you want to move these pages?" %}</p>
<ul>
{% for page in items %}
<li>
<a href="{% url 'wagtailadmin_pages:edit' page.item.id %}" target="_blank" rel="noreferrer">{{ page.item.get_admin_display_title }}</a>
{% if not page.item.is_leaf %}
<p>
{% blocktrans trimmed count counter=page.child_pages %}
This page has one child page
{% plural %}
This page has {{ counter }} child pages
{% endblocktrans %}
</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock items_with_access %}
{% block items_with_no_access %}
{% blocktrans trimmed asvar no_access_msg count counter=items_with_no_access|length %}You don't have permission to move this page{% plural %}You don't have permission to move these pages{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=items_with_no_access no_access_msg=no_access_msg %}
{% blocktrans trimmed asvar no_access_msg with dest_title=destination.title count counter=items_with_no_access|length %}The following page cannot be moved to {{dest_title}} {% plural %}The following pages cannot be moved to {{dest_title}}{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=pages_without_destination_access no_access_msg=no_access_msg %}
{% blocktrans trimmed asvar no_access_msg count counter=pages_with_duplicate_slugs|length %}The following page cannot be moved due to duplicate slug{% plural %}The following pages cannot be moved due to duplicate slugs{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=pages_with_duplicate_slugs no_access_msg=no_access_msg %}
{% trans "There is no valid destination page for these pages" as no_access_msg %}
{% include './list_items_with_no_access.html' with items=pages_without_common_parent_page no_access_msg=no_access_msg %}
{% endblock items_with_no_access %}
{% block form_section %}
{% if items %}
{% trans 'Yes, move these pages' as action_button_text %}
{% trans "No, don't move" as no_action_button_text %}
{% include 'wagtailadmin/bulk_actions/confirmation/form_with_fields.html' %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/go_back.html' %}
{% endif %}
{% endblock form_section %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{{ form.media.js }}
{% endblock %}

View File

@@ -0,0 +1,51 @@
{% extends 'wagtailadmin/bulk_actions/confirmation/base.html' %}
{% load i18n %}
{% block titletag %}{% blocktrans trimmed count counter=items|length %}Publish 1 page {% plural %}Publish {{ counter }} pages{% endblocktrans %}{% endblock %}
{% block header %}
{% include "wagtailadmin/shared/header.html" with title=_("Publish") icon="doc-empty-inverse" %}
{% endblock header %}
{% block items_with_access %}
{% if items %}
<p>{% trans "Are you sure you want to publish these pages?" %}</p>
<ul>
{% for page in items %}
<li>
<a href="{% url 'wagtailadmin_pages:edit' page.item.id %}" target="_blank" rel="noreferrer">{{ page.item.get_admin_display_title }}</a>
{% if page.draft_descendant_count %}
<p>
{% blocktrans trimmed count counter=page.draft_descendant_count %}
This page has one unpublished subpage
{% plural %}
This page has {{ counter }} unpublished subpages
{% endblocktrans %}
</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock items_with_access %}
{% block items_with_no_access %}
{% blocktrans trimmed asvar no_access_msg count counter=items_with_no_access|length %}You don't have permission to publish this page{% plural %}You don't have permission to publish these pages{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=items_with_no_access no_access_msg=no_access_msg %}
{% endblock items_with_no_access %}
{% block form_section %}
{% if items %}
{% trans 'Yes, publish' as action_button_text %}
{% trans "No, don't publish" as no_action_button_text %}
{% if has_draft_descendants %}
{% include 'wagtailadmin/bulk_actions/confirmation/form_with_fields.html' %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/form.html' %}
{% endif %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/go_back.html' %}
{% endif %}
{% endblock form_section %}

View File

@@ -0,0 +1,51 @@
{% extends 'wagtailadmin/bulk_actions/confirmation/base.html' %}
{% load i18n %}
{% block titletag %}{% blocktrans trimmed count counter=items|length %}Unpublish 1 page {% plural %}Unpublish {{ counter }} pages{% endblocktrans %}{% endblock %}
{% block header %}
{% include "wagtailadmin/shared/header.html" with title=_("Unpublish") icon="doc-empty-inverse" %}
{% endblock header %}
{% block items_with_access %}
{% if items %}
<p>{% trans "Are you sure you want to unpublish these pages?" %}</p>
<ul>
{% for page in items %}
<li>
<a href="{% url 'wagtailadmin_pages:edit' page.item.id %}" target="_blank" rel="noreferrer">{{ page.item.get_admin_display_title }}</a>
<p>
{% if page.live_descendant_count %}
{% blocktrans trimmed count counter=page.live_descendant_count %}
This page has one subpage
{% plural %}
This page has {{ counter }} subpages
{% endblocktrans %}
{% endif %}
</p>
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock items_with_access %}
{% block items_with_no_access %}
{% blocktrans trimmed asvar no_access_msg count counter=items_with_no_access|length %}You don't have permission to unpublish this page{% plural %}You don't have permission to unpublish these pages{% endblocktrans %}
{% include './list_items_with_no_access.html' with items=items_with_no_access no_access_msg=no_access_msg %}
{% endblock items_with_no_access %}
{% block form_section %}
{% if items %}
{% trans 'Yes, unpublish' as action_button_text %}
{% trans "No, don't unpublish" as no_action_button_text %}
{% if has_live_descendants %}
{% include 'wagtailadmin/bulk_actions/confirmation/form_with_fields.html' %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/form.html' %}
{% endif %}
{% else %}
{% include 'wagtailadmin/bulk_actions/confirmation/go_back.html' %}
{% endif %}
{% endblock form_section %}

View File

@@ -0,0 +1,10 @@
{% extends 'wagtailadmin/bulk_actions/confirmation/list_items_with_no_access.html' %}
{% load i18n %}
{% block per_item %}
{% if item.can_edit %}
<a href="{% url 'wagtailadmin_pages:edit' item.item.id %}" target="_blank" rel="noreferrer">{{ item.item.get_admin_display_title }}</a>
{% else %}
{{ item.item.get_admin_display_title }}
{% endif %}
{% endblock per_item %}

View File

@@ -0,0 +1,17 @@
{% extends "wagtailadmin/generic/form.html" %}
{% load i18n wagtailadmin_tags %}
{% block bodyclass %}
{# Unset the editor-view body class as this is just a simple form #}
{% endblock %}
{% block main_header %}
{# We only use the h1 from the breadcrumbs and don't need the h2 heading #}
{% endblock %}
{% block main_content %}
{# We don't use the h2 from main_header, so we need extra margin at the top #}
<div class="w-mt-8">
{{ block.super }}
</div>
{% endblock %}

View File

@@ -0,0 +1,24 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=page.get_admin_display_title %}Convert alias {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Convert alias") subtitle=page.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
<p>
{% trans 'Are you sure you want to convert this alias into an ordinary page?' %}
</p>
<p>
{% trans 'This action cannot be undone.' %}
</p>
<form action="{% url 'wagtailadmin_pages:convert_alias' page.id %}" method="POST">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
<input type="submit" value="{% trans 'Yes, convert it' %}" class="button serious">
<a href="{% if next %}{{ next }}{% else %}{% url 'wagtailadmin_explore' page.get_parent.id %}{% endif %}" class="button button-secondary">{% trans "No, leave it as an alias" %}</a>
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,98 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=page.get_admin_display_title %}Delete {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Delete") subtitle=page.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
{% include "wagtailadmin/shared/usage_summary.html" %}
{% if not is_protected %}
<p>
{% trans 'Are you sure you want to delete this page?' %}
{% if descendant_count %}
{% blocktrans trimmed count counter=descendant_count %}
Deleting this page will also delete {{ descendant_count }} child page.
{% plural %}
Deleting this page will also delete {{ descendant_count }} more child pages.
{% endblocktrans %}
{% if translation_count %} {# has translations #}
{% if translation_descendant_count %} {# has translations with descendants #}
{% if translation_count == 1 %}
{% blocktrans trimmed count counter=translation_descendant_count %}
It will also delete 1 translation and its combined {{ translation_descendant_count }} translated child page.
{% plural %}
It will also delete 1 translation and its combined {{ translation_descendant_count }} translated child pages.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed count counter=translation_descendant_count %}
It will also delete {{ translation_count }} translations and their combined {{ translation_descendant_count }} translated child page.
{% plural %}
It will also delete {{ translation_count }} translations and their combined {{ translation_descendant_count }} translated child pages.
{% endblocktrans %}
{% endif %}
{% else %}
{% blocktrans trimmed count counter=translation_count %}
It will also delete {{ translation_count }} translation.
{% plural %}
It will also delete {{ translation_count }} translations.
{% endblocktrans %}
{% endif %}
{% endif %}
{% elif translation_count %} {# no descendants #}
{% if translation_descendant_count %} {# has translations with descendants #}
{% if translation_count == 1 %}
{% blocktrans trimmed count counter=translation_descendant_count %}
Deleting this page will also delete 1 translation and its combined {{ translation_descendant_count }} translated child page.
{% plural %}
Deleting this page will also delete 1 translation and its combined {{ translation_descendant_count }} translated child pages.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed count counter=translation_descendant_count %}
Deleting this page will also delete {{ translation_count }} translations and their combined {{ translation_descendant_count }} translated child page.
{% plural %}
Deleting this page will also delete {{ translation_count }} translations and their combined {{ translation_descendant_count }} translated child pages.
{% endblocktrans %}
{% endif %}
{% else %}
{% blocktrans trimmed count counter=translation_count %}
Deleting this page will also delete {{ translation_count }} translation of this page.
{% plural %}
This will also delete {{ descendant_count }} more child pages.
Deleting this page will also delete {{ translation_count }} translations of this page.
{% endblocktrans %}
{% endif %}
{% endif %}
</p>
<form action="{% url 'wagtailadmin_pages:delete' page.id %}" method="POST">
{% csrf_token %}
{% if confirm_before_delete %}
<p id="id_confirm_site_name-warning" class="status-msg warning">
{% blocktrans trimmed with total_pages=descendant_count|add:1 %}
This action will delete total <b>{{ total_pages }}</b> pages.
{% endblocktrans %}
</p>
<label class="w-label-3" for="id_confirm_site_name">
{% blocktrans trimmed %}
Please type <b>{{ wagtail_site_name }}</b> to confirm.
{% endblocktrans %}
</label>
<input type="text" name="confirm_site_name" class="w-mb-4"
id="id_confirm_site_name" aria-describedby="id_confirm_site_name-warning" required>
{% endif %}
<input type="hidden" name="next" value="{{ next }}">
<input type="submit" value="{% trans 'Yes, delete it' %}" class="button serious">
<a href="{% if next %}{{ next }}{% else %}{% url 'wagtailadmin_explore' page.get_parent.id %}{% endif %}" class="button button-secondary">{% trans "No, don't delete it" %}</a>
</form>
{% endif %}
{% page_permissions page as page_perms %}
{% if page_perms.can_unpublish %}
{% url 'wagtailadmin_pages:unpublish' page.id as unpublish_url %}
<p style="margin-top: 1em">{% blocktrans trimmed %}Alternatively you can <a href="{{ unpublish_url }}">unpublish the page</a>. This removes the page from public view and you can edit or publish it again later.{% endblocktrans %}</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,28 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n %}
{% block titletag %}{% blocktrans trimmed with title=page_to_move.get_admin_display_title %}Move {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Move") subtitle=page_to_move.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
<p>
{% if page_to_move.is_leaf %}
{% blocktrans trimmed with title=destination.get_admin_display_title %}Are you sure you want to move this page into '{{ title }}'?{% endblocktrans %}
{% else %}
{% blocktrans trimmed with title=destination.get_admin_display_title %}Are you sure you want to move this page and all of its children into '{{ title }}'?{% endblocktrans %}
{% endif %}
{% if translations_to_move_count %}
{% blocktrans trimmed count counter=translations_to_move_count %}
This will also move one translation of this page and its child pages
{% plural %}
This will also move {{ translations_to_move_count }} translations of this page and their child pages
{% endblocktrans %}
{% endif %}
</p>
<form action="{% url 'wagtailadmin_pages:move_confirm' page_to_move.id destination.id %}" method="POST">
{% csrf_token %}
<input type="submit" value="{% trans 'Yes, move this page' %}" class="button">
</form>
</div>
{% endblock %}

View File

@@ -0,0 +1,46 @@
{% extends "wagtailadmin/generic/confirm_unpublish.html" %}
{% load i18n wagtailadmin_tags %}
{% block confirmation_text %}
<p>
{% trans "Are you sure you want to unpublish this page?" %}
{% if translation_count %}
{% blocktrans trimmed with translation_count=translation_count count counter=translation_count %}
This will also unpublish one translation of the page.
{% plural %}
This will also unpublish all {{ translation_count }} translations of the page.
{% endblocktrans %}
{% endif %}
</p>
{% endblock %}
{% block form_content %}
<input type="hidden" name="next" value="{{ next_url }}">
{% if live_descendant_count > 0 or translation_descendant_count > 0 %}
{% fragment as text %}
{% if translation_descendant_count %}
{% if translation_descendant_count == 1 %}
{% blocktrans trimmed count counter=live_descendant_count %}
This page has one subpage and its translations have a combined one translated child page. Unpublish these too
{% plural %}
This page has {{ live_descendant_count }} child pages and its translations have a combined one translated child page. Unpublish these too
{% endblocktrans %}
{% else %}
{% blocktrans trimmed count counter=live_descendant_count %}
This page has one child page and its translations have a combined {{ translation_descendant_count }} translated child pages. Unpublish these too
{% plural %}
This page has {{ live_descendant_count }} child pages and its translations have a combined {{ translation_descendant_count }} translated child pages. Unpublish these too
{% endblocktrans %}
{% endif %}
{% else %}
{% blocktrans trimmed count counter=live_descendant_count %}
This page has one subpage. Unpublish this too
{% plural %}
This page has {{ live_descendant_count }} subpages. Unpublish these too
{% endblocktrans %}
{% endif %}
{% endfragment %}
{% include "wagtailadmin/shared/forms/single_checkbox.html" with name="include_descendants" label_classname="w-label-3 w-mb-4" text=text %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% load i18n %}
{% include "wagtailadmin/shared/header.html" with title=_("Publish page") icon="clipboard-list" %}
<div class="nice-padding">
<p>
{% if needs_changes %}
{% blocktrans trimmed %}
This page was marked as needing changes at <strong>{{ task }}</strong> in <strong>{{ workflow }}</strong>.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
This page is currently at <strong>{{ task }}</strong> in <strong>{{ workflow }}</strong>.
{% endblocktrans %}
{% endif %}
</p>
<p>{% trans 'Publishing this page will cancel the current workflow.' %}</p>
<p>{% trans 'Would you still like to publish this page?' %}</p>
<button type="submit" class="button" data-confirm-cancellation>{% trans 'Publish' %}</button>
<button type="submit" class="button no" data-cancel-dialog>{% trans 'Cancel' %}</button>
</div>

View File

@@ -0,0 +1,44 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=page.specific_deferred.get_admin_display_title %}Copy {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Copy") subtitle=page.specific_deferred.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
<form action="{% url 'wagtailadmin_pages:copy' page.id %}" method="POST" novalidate>
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<ul class="fields">
<li>{% formattedfield form.new_title %}</li>
<li>{% formattedfield form.new_slug %}</li>
<li>{% formattedfield form.new_parent_page %}</li>
{% if form.copy_subpages %}
<li>{% formattedfield form.copy_subpages %}</li>
{% endif %}
{% if form.publish_copies %}
<li>{% formattedfield form.publish_copies %}</li>
{% endif %}
{% if form.alias %}
<li>{% formattedfield form.alias %}</li>
{% endif %}
</ul>
<input type="submit" value="{% trans 'Copy this page' %}" class="button">
</form>
</div>
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{{ form.media.js }}
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ form.media.css }}
{% endblock %}

View File

@@ -0,0 +1,71 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load wagtailadmin_tags %}
{% load i18n %}
{% block bodyclass %}editor-view{% endblock %}
{% block content %}
{% get_comments_enabled as comments_enabled %}
{% include 'wagtailadmin/shared/headers/page_create_header.html' with title=header_title %}
<form
id="page-edit-form"
action="{% url 'wagtailadmin_pages:add' content_type.app_label content_type.model parent_page.id %}"
method="POST"
novalidate
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
data-edit-form
data-controller="w-init w-unsaved"
data-action="w-unsaved#submit beforeunload@window->w-unsaved#confirm change->w-unsaved#check keyup->w-unsaved#check"
data-w-init-event-value="{% if comments_enabled %}w-comments:init{% endif %}"
data-w-unsaved-confirmation-value="{{ _("This page has unsaved changes.") }}"
data-w-unsaved-force-value="{% if has_unsaved_changes %}true{% else %}false{% endif %}"
data-w-unsaved-watch-value="edits{% if comments_enabled %} comments{% endif %}"
>
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
{% if parent_page.is_root %}
{# The user is allowed to set a different locale for pages created at the root #}
{# If they've done this, make sure their chosen locale is passed in the form #}
<input type="hidden" name="locale" value="{{ locale.language_code }}">
{% endif %}
{{ edit_handler.render_form_content }}
<footer class="footer w-grid md:w-grid-flow-col">
<nav class="actions actions--primary footer__container" aria-label="{% trans 'Actions' %}">
{{ action_menu.render_html }}
{% block extra_footer_actions %}
{% endblock %}
</nav>
{% include "wagtailadmin/pages/_unsaved_changes_warning.html" %}
</footer>
</form>
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ media.css }}
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{% comment %}
Additional js from widgets media. Allows for custom widgets in admin panel.
{% endcomment %}
{{ media.js }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% endblock %}

View File

@@ -0,0 +1,74 @@
{% extends "wagtailadmin/generic/base.html" %}
{% load wagtailadmin_tags %}
{% load i18n %}
{% load l10n %}
{% block bodyclass %}editor-view {% if page.live %}page-is-live{% endif %} {% if page_locked %}content-locked{% endif %}{% endblock %}
{% block content %}
{% get_comments_enabled as comments_enabled %}
{% page_permissions page as page_perms %}
{% include 'wagtailadmin/shared/headers/page_edit_header.html' with title=header_title %}
{% block form %}
<form
id="page-edit-form"
action="{% url 'wagtailadmin_pages:edit' page.id %}"
method="POST"
novalidate
{% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
data-edit-form
data-controller="w-init w-unsaved"
data-action="w-unsaved#submit beforeunload@window->w-unsaved#confirm change->w-unsaved#check keyup->w-unsaved#check"
data-w-init-event-value="{% if comments_enabled %}w-comments:init{% endif %}"
data-w-unsaved-confirmation-value="{{ _("This page has unsaved changes.") }}"
data-w-unsaved-force-value="{% if has_unsaved_changes %}true{% else %}false{% endif %}"
data-w-unsaved-watch-value="edits{% if comments_enabled %} comments{% endif %}"
>
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
{{ edit_handler.render_form_content }}
{% if is_revision %}
<input type="hidden" name="revision" value="{{ revision.id|unlocalize }}" />
{% endif %}
<footer class="footer w-grid md:w-grid-flow-col">
<nav class="actions actions--primary footer__container" aria-label="{% trans 'Actions' %}">
{{ action_menu.render_html }}
{% block extra_footer_actions %}
{% endblock %}
</nav>
{% include "wagtailadmin/pages/_unsaved_changes_warning.html" %}
</footer>
</form>
{% endblock %}
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ media.css }}
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{% comment %}
Additional js from widgets media. Allows for custom widgets in admin panel.
{% endcomment %}
{{ media.js }}
<script>
// Set wagtailConfig.ACTIVE_CONTENT_LOCALE if this is a translated page
// This value may be used by JS widgets on the form
{% if locale %}
window.wagtailConfig = window.wagtailConfig || {};
window.wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code|escapejs }}';
{% endif %}
</script>
{% include "wagtailadmin/shared/_workflow_init.html" %}
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends "wagtailadmin/pages/edit.html" %}
{% load i18n %}
{% block form %}
<div class="nice-padding" style="padding-top: 20px;">
<p>{% trans "This page is an alias of another page." %}</p>
<p>
<a class="button button-secondary" href="{% url 'wagtailadmin_pages:edit' page.alias_of_id %}">{% trans "Edit original page" %}</a>
{% url 'wagtailadmin_pages:edit' page.id as this_url %}
<a class="button button-secondary" href="{% url 'wagtailadmin_pages:convert_alias' page.id %}?next={{ this_url|urlencode }}">{% trans "Convert this alias into an ordinary page" %}</a>
</p>
</div>
{% endblock %}

View File

@@ -0,0 +1,8 @@
{% extends "wagtailadmin/pages/index.html" %}
{% load wagtailadmin_tags %}
{% block bodyclass %}page-explorer {% if ordering == 'ord' %}w-overflow-visible{% endif %}{% endblock %}
{% block header %}
{% page_permissions parent_page as parent_page_perms %}
{% include 'wagtailadmin/pages/page_listing_header.html' with title=header_title search_url=index_results_url page_perms=parent_page_perms %}
{% endblock %}

View File

@@ -0,0 +1 @@
{% extends 'wagtailadmin/generic/listing.html' %}

View File

@@ -0,0 +1,36 @@
{% extends "wagtailadmin/generic/index.html" %}
{% load wagtailadmin_tags i18n %}
{% block header %}
{% include 'wagtailadmin/shared/headers/slim_header.html' with title=header_title icon_name=header_icon search_url=index_results_url buttons=header_buttons %}
{% endblock %}
{% block listing %}
<div id="listing-results">
{% comment %}
This div will be replaced on AJAX refreshes.
Do not add page furniture here unless you intend it to disappear on AJAX refresh
{% endcomment %}
{% include 'wagtailadmin/pages/index_results.html' %}
</div>
{% endblock %}
{% block bulk_actions %}
{% include 'wagtailadmin/bulk_actions/footer.html' with select_all_obj_text=_("Select all pages in listing") app_label='wagtailcore' model_name='page' objects=page_obj %}
{% endblock %}
{% block extra_js %}
{{ block.super }}
<script src="{% versioned_static 'wagtailadmin/js/privacy-switch.js' %}"></script>
{% comment %}
The first column will display checkboxes only if ordering is not being carried out, in which case
that column will have the drag and drop buttons to enable ordering
{% endcomment %}
{% if not show_ordering_column %}
<script>
window.wagtailConfig.BULK_ACTION_ITEM_TYPE = 'PAGE';
</script>
<script defer src="{% versioned_static 'wagtailadmin/js/bulk-actions.js' %}"></script>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,71 @@
{% load wagtailadmin_tags i18n %}
{% if view.active_filters %}
{% include "wagtailadmin/shared/active_filters.html" with active_filters=view.active_filters %}
{% endif %}
{% if render_filters_fragment %}
<template data-controller="w-teleport" data-w-teleport-target-value="#filters-drilldown" data-w-teleport-reset-value="true">
{% include "wagtailadmin/shared/headers/_filters.html" with filters=filters %}
</template>
{% endif %}
<form id="page-reorder-form">
{% csrf_token %}
{% if parent_page %}
{% if parent_page.is_root %}
<div class="nice-padding">
<div class="help-block help-info">
{% icon name='help' %}
{% if perms.wagtailcore.add_site %}
{% url 'wagtailsites:index' as wagtailsites_index_url %}
<p>
{% blocktrans trimmed %}
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 trimmed %}
If you just want to add pages to an existing site, create them as children of the homepage instead.
{% endblocktrans %}
</p>
{% else %}
{% blocktrans trimmed %}
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>
</div>
{# get_url_parts will return None is the page has no site #}
{% elif not parent_page.get_url_parts %}
<div class="nice-padding">
<div class="help-block help-warning">
{% icon name='warning' %}
{% if perms.wagtailcore.add_site %}
{% url 'wagtailsites:index' as wagtailsites_index_url %}
{% blocktrans trimmed %}
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 trimmed %}
There is no site record for this location. Pages created here will not be accessible at any URL.
{% endblocktrans %}
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
{% component table %}
{% if is_paginated %}
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj linkurl=index_url %}
{% endif %}
</form>

View File

@@ -0,0 +1,4 @@
{% load wagtailadmin_tags %}
{% dropdown attrs=self.attrs toggle_icon=icon_name|default:"arrow-down" toggle_label=label toggle_aria_label=title toggle_classname=toggle_classname %}
{% include "wagtailadmin/pages/listing/_dropdown_items.html" with buttons=buttons only %}
{% enddropdown %}

View File

@@ -0,0 +1,10 @@
{% load wagtailadmin_tags %}
{% for button in buttons %}
<a href="{{ button.url }}" {{ button.base_attrs_string }}>
{% if button.icon_name %}
{% icon name=button.icon_name %}
{% endif %}
{{ button.label }}
</a>
{% endfor %}

View File

@@ -0,0 +1,16 @@
{% load i18n %}
{% load wagtailadmin_tags %}
{% comment %}
Expects a variable 'page', a page object.
Tests whether that page is locked for editing, and if so, outputs a 'locked' icon.
{% endcomment %}
{% if page.locked %}
<span
class="indicator locked-indicator {% if page.locked_by_id == request.user.pk %}indicator--is-inverse{% endif %}"
title="{% if page.locked_by_id == request.user.pk %}{% trans 'This page is locked, by you, to further editing' %}{% else %}{% trans 'This page is locked to further editing' %}{% endif %}"
>
{% icon name="lock" classname="initial" %}
</span>
{% endif %}

View File

@@ -0,0 +1,21 @@
{% load i18n wagtailadmin_tags %}
{% comment %}
Navigation controls for the page listing in 'explore' mode
{% endcomment %}
<td class="{% if page.is_navigable %}children{% else %}no-children{% endif %}">
{% if page.is_navigable %}
<a
href="{% url 'wagtailadmin_explore' page.id %}"
title="{% blocktrans trimmed with title=page.get_admin_display_title %}Explore child pages of '{{ title }}'{% endblocktrans %}"
aria-label="{% blocktrans trimmed with title=page.get_admin_display_title %}Explore child pages of '{{ title }}'{% endblocktrans %}"
>{% icon name="arrow-right" classname="default" %}</a>
{% elif page_perms.can_add_subpage %}
<a
href="{% url 'wagtailadmin_pages:add_subpage' page.id %}"
title="{% blocktrans trimmed with title=page.get_admin_display_title %}Add a child page to '{{ title }}'{% endblocktrans %}"
aria-label="{% blocktrans trimmed with title=page.get_admin_display_title %}Add a child page to '{{ title }}'{% endblocktrans %}"
>{% icon name="plus-inverse" classname="default" %}</a>
{% endif %}
</td>

View File

@@ -0,0 +1,18 @@
{% load i18n wagtailadmin_tags %}
<td class="ord">
<button
class="w-orderable__item__handle button button-small text-replace button--icon"
type="button"
aria-live="polite"
data-w-orderable-target="handle"
data-action="keydown.up->w-orderable#up:prevent keydown.down->w-orderable#down:prevent keydown.enter->w-orderable#apply"
>
{% icon name="grip" classname="default" %}
<span class="w-sr-only">
{% trans 'Drag' %}
<span>
{% blocktranslate trimmed with index=row.index|add:1 total=table.row_count %}Item {{ index }} of {{ total }}{% endblocktranslate %}
</span>
</span>
</button>
</td>

View File

@@ -0,0 +1,12 @@
{% load i18n wagtailadmin_tags %}
<th class="ord{% if is_ascending %} ord--active{% endif %}">
{% if is_ascending %}
<a href="{{ table.base_url }}{% querystring p=None ordering=None %}" title="{% trans 'Disable ordering of child pages' %}">
{% icon name="order" %}{% trans 'Sort' %}
</a>
{% else %}
<a href="{{ table.base_url }}{% querystring p=None ordering=column.sort_key %}" title="{% trans 'Enable ordering of child pages' %}">
{% icon name="order" %}{% trans 'Sort' %}
</a>
{% endif %}
</th>

View File

@@ -0,0 +1,10 @@
{% load wagtailadmin_tags i18n %}
{% trans "Actions" as title %}
<nav aria-label="{{ title }}">
{% dropdown toggle_icon="dots-horizontal" toggle_aria_label=title toggle_classname="w-p-0 w-w-8 w-h-slim-header hover:w-scale-110 w-transition w-outline-offset-inside w-relative w-z-30" toggle_tooltip_offset="[0, -2]" %}
{% block content %}
{% include "wagtailadmin/pages/listing/_dropdown_items.html" with buttons=buttons only %}
{% endblock %}
{% enddropdown %}
</nav>

View File

@@ -0,0 +1,3 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% include "wagtailadmin/shared/page_status_tag.html" with page=instance %}
</td>

View File

@@ -0,0 +1,9 @@
{% load l10n wagtailadmin_tags %}
<td {% if column.classname %}class="{{ column.classname }}"{% endif %} data-listing-page-title>
{% include "wagtailadmin/pages/listing/_page_title_explore.html" with page=instance show_locale_labels=show_locale_labels actions_next_url=actions_next_url %}
{% if parent_page %}
<div>
<a href="{% url 'wagtailadmin_explore' parent_page.id %}">{% icon name="arrow-right" classname="default" %}{{ parent_page.get_admin_display_title }}</a>
</div>
{% endif %}
</td>

View File

@@ -0,0 +1,36 @@
{% extends "wagtailadmin/tables/column_header.html" %}
{% load wagtailadmin_tags i18n %}
{% block after_label %}
{% if result_scope == "whole_tree" %}
{% if items_count %}
{% blocktranslate trimmed %}
{{ start_index }}-{{ end_index }} of {{ items_count }} across entire site.
{% endblocktranslate %}
{% else %}
{% blocktranslate trimmed %}
No results across entire site.
{% endblocktranslate %}
{% endif %}
<a href="{{ table.base_url }}{% querystring p=None search_all=None %}">
{% blocktranslate trimmed with title=parent_page.get_admin_display_title %}Search in '<span class="w-title-ellipsis">{{ title }}</span>'{% endblocktranslate %}
</a>
{% elif result_scope == "parent" %}
{% if items_count %}
{% blocktranslate trimmed with title=parent_page.get_admin_display_title %}
{{ start_index }}-{{ end_index }} of {{ items_count }} in '<span class="w-title-ellipsis">{{ title }}</span>'.
{% endblocktranslate %}
{% else %}
{% blocktranslate trimmed with title=parent_page.get_admin_display_title %}
No results in '<span class="w-title-ellipsis">{{ title }}</span>'.
{% endblocktranslate %}
{% endif %}
<a href="{{ table.base_url }}{% querystring p=None search_all=1 %}">
{% translate "Search the whole site" %}
</a>
{% else %}
{% blocktranslate trimmed %}
{{ start_index }}-{{ end_index }} of {{ items_count }}
{% endblocktranslate %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,44 @@
{% load i18n l10n wagtailadmin_tags %}
{# The title field for a page in the page listing, when in 'explore' mode #}
<div class="title-wrapper">
{% if page.is_site_root %}
{% if perms.wagtailcore.add_site or perms.wagtailcore.change_site or perms.wagtailcore.delete_site %}
<a href="{% url 'wagtailsites:index' %}" title="{% trans 'Sites menu' %}">{% icon name="site" classname="initial" %}</a>
{% endif %}
{% endif %}
{% comment %}
Instead of adding the "page_{pk}_title" id to the td element
in _page_title_cell.html, add it to an element that only contains the
page title (and not other things e.g. the buttons or other indicators),
so that other elements can refer to title for screen reader purposes
without also reading out the buttons and indicators.
{% endcomment %}
{% fragment as page_title %}
<span id="page_{{ page.pk|unlocalize|admin_urlquote }}_title">
{% if not page.is_site_root and not page.is_leaf %}{% icon name="folder" classname="initial" %}{% endif %}
{{ page.get_admin_display_title }}
</span>
{% endfragment %}
{% if page_perms.can_edit %}
<a href="{% url 'wagtailadmin_pages:edit' page.id %}" title="{% trans 'Edit this page' %}">
{{ page_title }}
</a>
{% else %}
{{ page_title }}
{% endif %}
{% if show_locale_labels %}
{% status page.locale.get_display_name classname="w-status--label" %}
{% endif %}
{% include "wagtailadmin/pages/listing/_privacy_indicator.html" with page=page %}
{% include "wagtailadmin/pages/listing/_locked_indicator.html" with page=page %}
</div>
<ul class="actions">
{% page_listing_buttons page request.user next_url=actions_next_url %}
</ul>

View File

@@ -0,0 +1,29 @@
{% load i18n wagtailadmin_tags %}
{% comment %}
Pagination for page listings. Used by the `{% paginate %}` template tag.
{% endcomment %}
<nav class="pagination" aria-label="{% trans 'Pagination' %}">
<p>{% blocktrans trimmed with page_number=page.number num_pages=paginator.num_pages %}
Page {{ page_number }} of {{ num_pages }}.
{% endblocktrans %}</p>
<ul>
<li class="prev">
{% if page.has_previous %}
<a data-page="{{ page.previous_page_number }}" href="{{ base_url }}{% pagination_querystring page.previous_page_number page_key=page_key %}" class="{{ classname }}">
{% icon name="arrow-left" classname="default" %}
{% trans "Previous" %}
</a>
{% endif %}
</li>
<li class="next">
{% if page.has_next %}
<a data-page="{{ page.next_page_number }}" href="{{ base_url }}{% pagination_querystring page.next_page_number page_key=page_key %}" class="{{ classname }}">
{% trans "Next" %}
{% icon name="arrow-right" classname="default" %}
</a>
{% endif %}
</li>
</ul>
</nav>

View File

@@ -0,0 +1,5 @@
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
{% if value %}
<a href="{% url 'wagtailadmin_explore' value.id %}">{{ value.specific_deferred.get_admin_display_title }}</a>
{% endif %}
</td>

View File

@@ -0,0 +1,17 @@
{% load i18n %}
{% load wagtailadmin_tags %}
{% comment %}
Expects a variable 'page', a page object.
Tests whether that page is protected from public view, and if so, outputs a 'protected' icon.
{% endcomment %}
{% test_page_is_public page as is_public %}
{% if not is_public %}
<span
class="indicator privacy-indicator"
title="{% trans "This page is protected from public view" %}"
>
{% icon name="no-view" classname="initial" %}
</span>
{% endif %}

View File

@@ -0,0 +1,29 @@
{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans trimmed with title=page_to_move.specific_deferred.get_admin_display_title %}Move {{ title }}{% endblocktrans %}{% endblock %}
{% block content %}
{% include "wagtailadmin/shared/header.html" with title=_("Move") subtitle=page_to_move.specific_deferred.get_admin_display_title icon="doc-empty-inverse" %}
<div class="nice-padding">
<form action="{% url 'wagtailadmin_pages:move' page_to_move.id %}" method="POST" novalidate>
{% csrf_token %}
<ul class="fields">
<li>{% formattedfield move_form.new_parent_page %}</li>
</ul>
<input type="submit" value="{% trans 'Confirm' %}" class="button">
</form>
</div>
{% endblock %}
{% block extra_js %}
{{ block.super }}
{% include "wagtailadmin/pages/_editor_js.html" %}
{{ move_form.media.js }}
{% endblock %}
{% block extra_css %}
{{ block.super }}
{{ move_form.media.css }}
{% endblock %}

View File

@@ -0,0 +1,27 @@
{% extends 'wagtailadmin/shared/headers/slim_header.html' %}
{% load wagtailadmin_tags i18n %}
{% block breadcrumbs %}
{# breadcrumbs #}
{% page_breadcrumbs parent_page 'wagtailadmin_explore' url_root_name='wagtailadmin_explore_root' %}
{% endblock %}
{% block actions %}
{% page_permissions parent_page as parent_page_perms %}
{% if parent_page_perms.can_add_subpage %}
{% trans 'Add child page' as add_child_page_str %}
{# Keep this in sync with the styles of HeaderButton. #}
<a href="{% url "wagtailadmin_pages:add_subpage" parent_page.id %}" class="w-header-button button" data-controller="w-tooltip" data-w-tooltip-content-value="{{ add_child_page_str }}" aria-label="{{ add_child_page_str }}">{% icon name="plus" %}</a>
{% endif %}
{# Page actions dropdown #}
{% page_header_buttons parent_page user=request.user view_name="index" %}
{% endblock %}
{% block toggles %}
{{ block.super }}
{% include "wagtailadmin/shared/page_status_tag_new.html" with page=parent_page %}
{% endblock %}
{% block side_panels %}
{% include "wagtailadmin/shared/side_panels.html" with in_explorer=True %}
{% endblock side_panels %}

View File

@@ -0,0 +1,20 @@
{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags i18n %}
{% block titletag %}{% trans 'Search' %}{% endblock %}
{% block extra_js %}
{{ block.super }}
<script>
window.wagtailConfig.BULK_ACTION_ITEM_TYPE = 'PAGE';
</script>
<script defer src="{% versioned_static 'wagtailadmin/js/bulk-actions.js' %}"></script>
{% endblock %}
{% block content %}
{% url 'wagtailadmin_pages:search_results' as search_results_url %}
{% include "wagtailadmin/shared/header.html" with title=_("Search") search_url="wagtailadmin_pages:search" icon="search" search_results_url=search_results_url search_target="#page-results" %}
<div id="page-results">
{% include "wagtailadmin/pages/search_results.html" %}
</div>
{% trans "Select all pages in listing" as select_all_text %}
{% include 'wagtailadmin/bulk_actions/footer.html' with app_label='wagtailcore' model_name='page' objects=page_obj select_all_obj_text=select_all_text %}
{% endblock %}

View File

@@ -0,0 +1,49 @@
{% load i18n wagtailadmin_tags %}
<div class="nice-padding">
{% if pages %}
<h2 role="alert">
{% blocktrans trimmed count counter=all_pages.count %}
There is one matching page
{% plural %}
There are {{ counter }} matching pages
{% endblocktrans %}
</h2>
{% search_other %}
{% if object_list.supports_facet %}
<nav class="listing-filter" aria-labelledby="page-types-title">
<h3 id="page-types-title" class="filter-title">{% trans "Page types" %}</h3>
<ul class="filter-options">
{% if not selected_content_type %}
<li class="w-bg-border-furniture">{% trans "All" %} ({{ all_pages.count }})</li>
{% else %}
<li><a href="{% url 'wagtailadmin_pages:search' %}?q={{ query_string|urlencode }}">{% trans "All" %} ({{ all_pages.count }})</a></li>
{% endif %}
{% for content_type, count in content_types %}
{% if content_type == selected_content_type %}
<li class="w-bg-border-furniture">{{ content_type.model_class.get_verbose_name }} ({{ count }})</li>
{% else %}
<li><a href="{% url 'wagtailadmin_pages:search' %}?q={{ query_string|urlencode }}&amp;content_type={{ content_type.app_label }}.{{ content_type.model|lower }}">{{ content_type.model_class.get_verbose_name }} ({{ count }})</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% component table %}
{% if is_paginated %}
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj linkurl=index_url %}
{% endif %}
{% else %}
{% if query_string %}
<h2 role="alert">{% blocktrans trimmed %}Sorry, no pages match <em>{{ query_string }}</em>{% endblocktrans %}</h2>
{% search_other %}
{% else %}
<p>{% trans 'Enter a search term above' %}</p>
{% endif %}
{% endif %}
</div>

View File

@@ -0,0 +1,6 @@
{% extends "wagtailadmin/generic/listing_results.html" %}
{% load i18n %}
{% block no_results_message %}
<p>{% trans 'No pages use' %} <em>"{{ page_class.get_verbose_name }}"</em>.</p>
{% endblock %}