diff --git a/server/core/templates/wagtailadmin/pages/listing/_button_with_dropdown.html b/server/core/templates/wagtailadmin/pages/listing/_button_with_dropdown.html new file mode 100644 index 00000000..8cfabee7 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_button_with_dropdown.html @@ -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 %} diff --git a/server/core/templates/wagtailadmin/pages/listing/_dropdown_items.html b/server/core/templates/wagtailadmin/pages/listing/_dropdown_items.html new file mode 100644 index 00000000..8312b5b5 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_dropdown_items.html @@ -0,0 +1,10 @@ +{% load wagtailadmin_tags %} + +{% for button in buttons %} + + {% if button.icon_name %} + {% icon name=button.icon_name %} + {% endif %} + {{ button.label }} + +{% endfor %} diff --git a/server/core/templates/wagtailadmin/pages/listing/_locked_indicator.html b/server/core/templates/wagtailadmin/pages/listing/_locked_indicator.html new file mode 100644 index 00000000..7b39645b --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_locked_indicator.html @@ -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 %} + + {% icon name="lock" classname="initial" %} + +{% endif %} diff --git a/server/core/templates/wagtailadmin/pages/listing/_navigation_explore.html b/server/core/templates/wagtailadmin/pages/listing/_navigation_explore.html new file mode 100644 index 00000000..dd6499b1 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_navigation_explore.html @@ -0,0 +1,21 @@ +{% load i18n wagtailadmin_tags %} + +{% comment %} +Navigation controls for the page listing in 'explore' mode +{% endcomment %} + + + {% if page.is_navigable %} + {% icon name="arrow-right" classname="default" %} + {% elif page_perms.can_add_subpage %} + {% icon name="plus-inverse" classname="default" %} + {% endif %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_ordering_cell.html b/server/core/templates/wagtailadmin/pages/listing/_ordering_cell.html new file mode 100644 index 00000000..4b467d1c --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_ordering_cell.html @@ -0,0 +1,10 @@ +{% load i18n wagtailadmin_tags %} + +
+ {% icon name="grip" classname="default" %} + + {% trans 'Drag' %} + Item {{ row.index|add:1 }} of {{ table.row_count }} + +
+ diff --git a/server/core/templates/wagtailadmin/pages/listing/_ordering_header.html b/server/core/templates/wagtailadmin/pages/listing/_ordering_header.html new file mode 100644 index 00000000..47a34249 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_ordering_header.html @@ -0,0 +1,12 @@ +{% load i18n wagtailadmin_tags %} + + {% if is_ascending %} + + {% icon name="order" %}{% trans 'Sort' %} + + {% else %} + + {% icon name="order" %}{% trans 'Sort' %} + + {% endif %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_page_header_buttons.html b/server/core/templates/wagtailadmin/pages/listing/_page_header_buttons.html new file mode 100644 index 00000000..101a0f32 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_page_header_buttons.html @@ -0,0 +1,10 @@ +{% load wagtailadmin_tags i18n %} + +{% trans "Actions" as title %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_page_status_cell.html b/server/core/templates/wagtailadmin/pages/listing/_page_status_cell.html new file mode 100644 index 00000000..0140ace6 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_page_status_cell.html @@ -0,0 +1,3 @@ + + {% include "wagtailadmin/shared/page_status_tag.html" with page=instance %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_page_title_cell.html b/server/core/templates/wagtailadmin/pages/listing/_page_title_cell.html new file mode 100644 index 00000000..6503627e --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_page_title_cell.html @@ -0,0 +1,9 @@ +{% load l10n %} + + {% 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 %} +
+ {{ parent_page.get_admin_display_title }} +
+ {% endif %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_page_title_column_header.html b/server/core/templates/wagtailadmin/pages/listing/_page_title_column_header.html new file mode 100644 index 00000000..fd1c0db0 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_page_title_column_header.html @@ -0,0 +1,30 @@ +{% extends "wagtailadmin/tables/column_header.html" %} +{% load wagtailadmin_tags i18n %} + +{% block after_label %} + {% if page_obj %} + {% with start_index=page_obj.start_index end_index=page_obj.end_index result_count=page_obj.paginator.count %} + {% if is_searching %} + {% if is_searching_whole_tree %} + {% blocktranslate trimmed %} + {{ start_index }}-{{ end_index }} of {{ result_count }} across entire site. + {% endblocktranslate %} + + {% blocktranslate trimmed with title=parent_page.get_admin_display_title %}Search within '{{ title }}'{% endblocktranslate %} + + {% else %} + {% blocktranslate trimmed with title=parent_page.get_admin_display_title %} + {{ start_index }}-{{ end_index }} of {{ result_count }} within '{{ title }}'. + {% endblocktranslate %} + + {% translate "Search the whole site" %} + + {% endif %} + {% else %} + {% blocktranslate trimmed %} + {{ start_index }}-{{ end_index }} of {{ result_count }} + {% endblocktranslate %} + {% endif %} + {% endwith %} + {% endif %} +{% endblock %} diff --git a/server/core/templates/wagtailadmin/pages/listing/_page_title_explore.html b/server/core/templates/wagtailadmin/pages/listing/_page_title_explore.html new file mode 100644 index 00000000..ca16cd16 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_page_title_explore.html @@ -0,0 +1,32 @@ +{% load i18n wagtailadmin_tags %} + +{# The title field for a page in the page listing, when in 'explore' mode #} + +
+ {% if page.is_site_root %} + {% if perms.wagtailcore.add_site or perms.wagtailcore.change_site or perms.wagtailcore.delete_site %} + {% icon name="site" classname="initial" %} + {% endif %} + {% endif %} + + {% if page_perms.can_edit %} + + {% if not page.is_site_root and not page.is_leaf %}{% icon name="folder" classname="initial" %}{% endif %} + {{ page.get_admin_display_title }} + + {% else %} + {% if not page.is_site_root and not page.is_leaf %}{% icon name="folder" classname="initial" %}{% endif %} + {{ page.get_admin_display_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 %} +
+ + diff --git a/server/core/templates/wagtailadmin/pages/listing/_pagination.html b/server/core/templates/wagtailadmin/pages/listing/_pagination.html new file mode 100644 index 00000000..31eb260c --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_pagination.html @@ -0,0 +1,29 @@ +{% load i18n wagtailadmin_tags %} + +{% comment %} +Pagination for page listings. Used by the `{% paginate %}` template tag. +{% endcomment %} + + diff --git a/server/core/templates/wagtailadmin/pages/listing/_parent_page_cell.html b/server/core/templates/wagtailadmin/pages/listing/_parent_page_cell.html new file mode 100644 index 00000000..bb0f455d --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_parent_page_cell.html @@ -0,0 +1,5 @@ + + {% if value %} + {{ value.specific_deferred.get_admin_display_title }} + {% endif %} + diff --git a/server/core/templates/wagtailadmin/pages/listing/_privacy_indicator.html b/server/core/templates/wagtailadmin/pages/listing/_privacy_indicator.html new file mode 100644 index 00000000..d6ee39f7 --- /dev/null +++ b/server/core/templates/wagtailadmin/pages/listing/_privacy_indicator.html @@ -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 %} + + {% icon name="no-view" classname="initial" %} + +{% endif %}