diff --git a/docs/reference/hooks.rst b/docs/reference/hooks.rst index ca449a610..5e1f5c58d 100644 --- a/docs/reference/hooks.rst +++ b/docs/reference/hooks.rst @@ -224,6 +224,22 @@ Hooks for building new areas of the admin interface (alongside pages, images, do As ``construct_main_menu``, but modifies the 'Settings' sub-menu rather than the top-level menu. +.. _register_reports_menu_item: + +``register_reports_menu_item`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + As ``register_admin_menu_item``, but registers menu items into the 'Reports' sub-menu rather than the top-level menu. + + +.. _construct_reports_menu: + +``construct_reports_menu`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + As ``construct_main_menu``, but modifies the 'Reports' sub-menu rather than the top-level menu. + + .. _register_admin_search_area: ``register_admin_search_area`` diff --git a/docs/reference/pages/model_reference.rst b/docs/reference/pages/model_reference.rst index efc18fc30..3533ae209 100644 --- a/docs/reference/pages/model_reference.rst +++ b/docs/reference/pages/model_reference.rst @@ -115,7 +115,7 @@ Database fields The user who has currently locked the page. Only this user can edit the page. - If this is ``None`` when ``locked`` is ``False``, nobody can edit the page. + If this is ``None`` when ``locked`` is ``True``, nobody can edit the page. .. attribute:: locked_at diff --git a/wagtail/admin/templates/wagtailadmin/home/locked_pages.html b/wagtail/admin/templates/wagtailadmin/home/locked_pages.html index 5e649d1cf..9f579cd21 100644 --- a/wagtail/admin/templates/wagtailadmin/home/locked_pages.html +++ b/wagtail/admin/templates/wagtailadmin/home/locked_pages.html @@ -3,7 +3,9 @@
|
{% page_permissions page as perms %}
- Locked - {% if page.locked_by %}by {% if page.locked_by_id == request.user.pk %}you{% else %}{{ page.locked_by }}{% endif %}{% endif %} - {% if page.locked_at %}at {{ page.locked_at|date:"d M Y H:i" }}{% endif %} + {% if page.locked_at %} + {% with page.locked_at|date:"d M Y H:i" as locking_date %} + {% if page.locked_by %} + {% if page.locked_by_id == request.user.pk %} + {% blocktrans %} + Locked by you at {{ locking_date }} + {% endblocktrans %} + {% else %} + {% blocktrans with locked_by=page.locked_by %} + Locked by {{ locked_by }} at {{ locking_date }} + {% endblocktrans %} + {% endif %} + {% else %} + {% blocktrans %} + Locked at {{ locking_date }} + {% endblocktrans %} + {% endif %} + {% endwith %} + {% else %} + {% trans 'Locked' %} + {% endif %} {% if perms.can_unlock %} |