wagtail 6.3.1__py3-none-any.whl → 6.4rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/actions/publish_revision.py +4 -5
  3. wagtail/admin/auth.py +0 -2
  4. wagtail/admin/checks.py +1 -1
  5. wagtail/admin/filters.py +3 -1
  6. wagtail/admin/forms/account.py +21 -11
  7. wagtail/admin/forms/collections.py +2 -9
  8. wagtail/admin/forms/formsets.py +32 -0
  9. wagtail/admin/forms/pages.py +5 -1
  10. wagtail/admin/forms/workflows.py +2 -13
  11. wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
  12. wagtail/admin/locale/ar/LC_MESSAGES/django.po +68 -1
  13. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
  14. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +5 -1
  15. wagtail/admin/locale/en/LC_MESSAGES/django.po +312 -356
  16. wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +21 -16
  17. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
  18. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +5 -5
  19. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  20. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +29 -0
  21. wagtail/admin/menu.py +0 -13
  22. wagtail/admin/panels/base.py +2 -2
  23. wagtail/admin/panels/group.py +4 -1
  24. wagtail/admin/panels/inline_panel.py +5 -2
  25. wagtail/admin/panels/model_utils.py +36 -0
  26. wagtail/admin/panels/page_utils.py +2 -40
  27. wagtail/admin/panels/signal_handlers.py +0 -2
  28. wagtail/admin/static/wagtailadmin/css/core.css +1 -1
  29. wagtail/admin/static/wagtailadmin/css/panels/draftail.css +1 -1
  30. wagtail/admin/static/wagtailadmin/css/panels/streamfield.css +1 -1
  31. wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
  32. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  33. wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +1 -8
  34. wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
  35. wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
  36. wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
  37. wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
  38. wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
  39. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  40. wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
  41. wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +1 -1
  42. wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
  43. wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +7 -0
  44. wagtail/admin/templates/wagtailadmin/404.html +4 -0
  45. wagtail/admin/templates/wagtailadmin/chooser/browse.html +2 -1
  46. wagtail/admin/templates/wagtailadmin/chooser/tables/parent_page_cell.html +1 -1
  47. wagtail/admin/templates/wagtailadmin/collections/_privacy_switch.html +8 -1
  48. wagtail/admin/templates/wagtailadmin/generic/confirm_delete.html +15 -9
  49. wagtail/admin/templates/wagtailadmin/generic/confirm_unpublish.html +21 -25
  50. wagtail/admin/templates/wagtailadmin/generic/form.html +1 -1
  51. wagtail/admin/templates/wagtailadmin/generic/preview_error.html +3 -0
  52. wagtail/admin/templates/wagtailadmin/generic/revisions/compare.html +63 -76
  53. wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -2
  54. wagtail/admin/templates/wagtailadmin/pages/edit.html +1 -5
  55. wagtail/admin/templates/wagtailadmin/panels/inline_panel_child.html +1 -0
  56. wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_form.html +1 -1
  57. wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_formset.html +6 -22
  58. wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +2 -2
  59. wagtail/admin/templates/wagtailadmin/shared/header.html +2 -2
  60. wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +32 -39
  61. wagtail/admin/templates/wagtailadmin/shared/revisions/confirm_unschedule.html +13 -17
  62. wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/privacy.html +15 -3
  63. wagtail/admin/templates/wagtailadmin/shared/side_panels/preview.html +1 -1
  64. wagtail/admin/templates/wagtailadmin/skeleton.html +4 -2
  65. wagtail/admin/templates/wagtailadmin/workflows/create.html +1 -1
  66. wagtail/admin/templates/wagtailadmin/workflows/edit.html +1 -1
  67. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_form.html +1 -1
  68. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_pages_formset.html +6 -23
  69. wagtail/admin/templatetags/wagtailadmin_tags.py +12 -0
  70. wagtail/admin/templatetags/wagtailuserbar.py +2 -3
  71. wagtail/admin/tests/pages/test_create_page.py +110 -1
  72. wagtail/admin/tests/pages/test_edit_page.py +3 -2
  73. wagtail/admin/tests/pages/test_explorer_view.py +18 -0
  74. wagtail/admin/tests/pages/test_page_usage.py +24 -20
  75. wagtail/admin/tests/pages/test_preview.py +69 -1
  76. wagtail/admin/tests/pages/test_revisions.py +40 -6
  77. wagtail/admin/tests/test_account_management.py +39 -1
  78. wagtail/admin/tests/test_audit_log.py +4 -2
  79. wagtail/admin/tests/test_block_preview.py +224 -0
  80. wagtail/admin/tests/test_edit_handlers.py +23 -6
  81. wagtail/admin/tests/test_page_chooser.py +50 -3
  82. wagtail/admin/tests/test_privacy.py +49 -26
  83. wagtail/admin/tests/test_site_summary.py +15 -10
  84. wagtail/admin/tests/test_templatetags.py +19 -0
  85. wagtail/admin/tests/test_userbar.py +82 -1
  86. wagtail/admin/tests/test_views_generic.py +27 -12
  87. wagtail/admin/tests/test_workflows.py +69 -0
  88. wagtail/admin/tests/tests.py +23 -4
  89. wagtail/admin/tests/ui/test_sidebar.py +1 -1
  90. wagtail/admin/tests/viewsets/test_model_viewset.py +15 -13
  91. wagtail/admin/ui/side_panels.py +7 -4
  92. wagtail/admin/urls/__init__.py +6 -0
  93. wagtail/admin/urls/pages.py +1 -1
  94. wagtail/admin/userbar.py +21 -1
  95. wagtail/admin/views/account.py +5 -0
  96. wagtail/admin/views/chooser.py +5 -1
  97. wagtail/admin/views/collections.py +0 -2
  98. wagtail/admin/views/generic/base.py +20 -10
  99. wagtail/admin/views/generic/history.py +0 -1
  100. wagtail/admin/views/generic/models.py +79 -21
  101. wagtail/admin/views/generic/preview.py +50 -1
  102. wagtail/admin/views/mixins.py +4 -2
  103. wagtail/admin/views/pages/bulk_actions/delete.py +11 -23
  104. wagtail/admin/views/pages/bulk_actions/page_bulk_action.py +17 -0
  105. wagtail/admin/views/pages/bulk_actions/publish.py +11 -31
  106. wagtail/admin/views/pages/bulk_actions/unpublish.py +11 -31
  107. wagtail/admin/views/pages/create.py +1 -0
  108. wagtail/admin/views/pages/edit.py +38 -30
  109. wagtail/admin/views/pages/revisions.py +43 -114
  110. wagtail/admin/views/pages/utils.py +0 -1
  111. wagtail/admin/views/tags.py +6 -2
  112. wagtail/admin/views/workflows.py +8 -6
  113. wagtail/admin/viewsets/model.py +0 -4
  114. wagtail/admin/viewsets/pages.py +0 -1
  115. wagtail/admin/widgets/tags.py +1 -0
  116. wagtail/api/v2/tests/test_documents.py +4 -2
  117. wagtail/api/v2/tests/test_images.py +4 -2
  118. wagtail/api/v2/tests/test_pages.py +8 -4
  119. wagtail/blocks/base.py +59 -1
  120. wagtail/blocks/field_block.py +6 -0
  121. wagtail/blocks/list_block.py +4 -0
  122. wagtail/blocks/static_block.py +3 -0
  123. wagtail/blocks/stream_block.py +5 -1
  124. wagtail/blocks/struct_block.py +6 -0
  125. wagtail/compat.py +16 -0
  126. wagtail/contrib/forms/forms.py +27 -7
  127. wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +2 -2
  128. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.mo +0 -0
  129. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +4 -4
  130. wagtail/contrib/forms/tests/test_models.py +7 -5
  131. wagtail/contrib/forms/tests/test_views.py +75 -0
  132. wagtail/contrib/frontend_cache/backends/cloudfront.py +1 -1
  133. wagtail/contrib/frontend_cache/tasks.py +83 -0
  134. wagtail/contrib/frontend_cache/tests.py +48 -33
  135. wagtail/contrib/frontend_cache/utils.py +2 -70
  136. wagtail/contrib/redirects/base_formats.py +2 -2
  137. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
  138. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +3 -0
  139. wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +24 -37
  140. wagtail/contrib/redirects/templates/wagtailredirects/add.html +1 -24
  141. wagtail/contrib/redirects/templates/wagtailredirects/confirm_delete.html +3 -13
  142. wagtail/contrib/redirects/tests/test_redirects.py +122 -110
  143. wagtail/contrib/redirects/tests/test_signal_handlers.py +75 -69
  144. wagtail/contrib/redirects/urls.py +2 -2
  145. wagtail/contrib/redirects/views.py +35 -73
  146. wagtail/contrib/search_promotions/admin_urls.py +10 -3
  147. wagtail/contrib/search_promotions/forms.py +55 -26
  148. wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +44 -54
  149. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/add.html +21 -31
  150. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/confirm_delete.html +3 -12
  151. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/edit.html +11 -34
  152. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotion_form.html +1 -0
  153. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js +2 -1
  154. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/index.html +0 -1
  155. wagtail/contrib/search_promotions/tests.py +814 -13
  156. wagtail/contrib/search_promotions/views/__init__.py +1 -0
  157. wagtail/contrib/search_promotions/views/reports.py +56 -0
  158. wagtail/contrib/search_promotions/views/settings.py +258 -0
  159. wagtail/contrib/search_promotions/wagtail_hooks.py +12 -1
  160. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.mo +0 -0
  161. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +6 -1
  162. wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +3 -3
  163. wagtail/contrib/settings/templates/wagtailsettings/edit.html +1 -5
  164. wagtail/contrib/settings/tests/generic/test_admin.py +2 -5
  165. wagtail/contrib/settings/tests/generic/test_register.py +1 -1
  166. wagtail/contrib/settings/tests/site_specific/test_admin.py +2 -5
  167. wagtail/contrib/settings/tests/site_specific/test_register.py +1 -1
  168. wagtail/contrib/settings/views.py +9 -23
  169. wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
  170. wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
  171. wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
  172. wagtail/contrib/table_block/tests.py +4 -1
  173. wagtail/contrib/typed_table_block/blocks.py +3 -0
  174. wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
  175. wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
  176. wagtail/contrib/typed_table_block/tests.py +33 -0
  177. wagtail/documents/locale/en/LC_MESSAGES/django.po +26 -26
  178. wagtail/documents/migrations/0011_add_choose_permissions.py +1 -0
  179. wagtail/documents/models.py +1 -0
  180. wagtail/documents/signal_handlers.py +6 -2
  181. wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
  182. wagtail/documents/templates/wagtaildocs/documents/edit.html +1 -3
  183. wagtail/documents/templates/wagtaildocs/multiple/add.html +7 -1
  184. wagtail/documents/tests/test_admin_views.py +74 -33
  185. wagtail/documents/tests/test_views.py +21 -12
  186. wagtail/documents/views/chooser.py +1 -0
  187. wagtail/documents/views/documents.py +1 -2
  188. wagtail/documents/views/multiple.py +0 -1
  189. wagtail/documents/views/serve.py +9 -2
  190. wagtail/documents/wagtail_hooks.py +6 -1
  191. wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
  192. wagtail/embeds/oembed_providers.py +0 -64
  193. wagtail/fields.py +3 -0
  194. wagtail/images/apps.py +2 -1
  195. wagtail/images/blocks.py +14 -2
  196. wagtail/images/forms.py +40 -3
  197. wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
  198. wagtail/images/locale/ar/LC_MESSAGES/django.po +4 -0
  199. wagtail/images/locale/en/LC_MESSAGES/django.po +49 -49
  200. wagtail/images/migrations/0023_add_choose_permissions.py +1 -0
  201. wagtail/images/rich_text/contentstate.py +1 -0
  202. wagtail/images/rich_text/editor_html.py +1 -0
  203. wagtail/images/signal_handlers.py +17 -10
  204. wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
  205. wagtail/images/static/wagtailimages/js/image-block.js +1 -1
  206. wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
  207. wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
  208. wagtail/images/static/wagtailimages/js/image-url-generator.js +1 -1
  209. wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-image.js +1 -1
  210. wagtail/images/tasks.py +18 -0
  211. wagtail/images/templates/wagtailimages/images/edit.html +1 -3
  212. wagtail/images/templates/wagtailimages/images/url_generator.html +1 -1
  213. wagtail/images/templates/wagtailimages/multiple/add.html +7 -2
  214. wagtail/images/templates/wagtailimages/widgets/image_chooser.html +1 -1
  215. wagtail/images/tests/test_admin_views.py +53 -29
  216. wagtail/images/tests/test_blocks.py +34 -2
  217. wagtail/images/tests/test_models.py +12 -10
  218. wagtail/images/tests/tests.py +10 -0
  219. wagtail/images/views/chooser.py +1 -0
  220. wagtail/images/views/images.py +1 -3
  221. wagtail/images/views/multiple.py +0 -1
  222. wagtail/images/views/serve.py +18 -2
  223. wagtail/images/widgets.py +3 -0
  224. wagtail/locale/en/LC_MESSAGES/django.po +228 -216
  225. wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
  226. wagtail/management/commands/publish_scheduled.py +1 -1
  227. wagtail/migrations/0087_alter_grouppagepermission_unique_together_and_more.py +16 -8
  228. wagtail/models/__init__.py +300 -119
  229. wagtail/models/i18n.py +2 -2
  230. wagtail/models/panels.py +37 -0
  231. wagtail/models/sites.py +7 -6
  232. wagtail/permission_policies/pages.py +2 -2
  233. wagtail/project_template/project_name/settings/base.py +4 -0
  234. wagtail/project_template/requirements.txt +1 -1
  235. wagtail/query.py +145 -0
  236. wagtail/search/backends/database/mysql/mysql.py +25 -17
  237. wagtail/search/backends/database/postgres/postgres.py +44 -83
  238. wagtail/search/backends/database/sqlite/sqlite.py +25 -17
  239. wagtail/search/backends/elasticsearch7.py +4 -0
  240. wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
  241. wagtail/search/query.py +8 -2
  242. wagtail/search/signal_handlers.py +6 -9
  243. wagtail/search/tasks.py +10 -0
  244. wagtail/search/tests/test_elasticsearch7_backend.py +21 -0
  245. wagtail/search/tests/test_index_functions.py +10 -6
  246. wagtail/search/tests/test_postgres_backend.py +0 -14
  247. wagtail/signal_handlers.py +5 -20
  248. wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
  249. wagtail/snippets/locale/en/LC_MESSAGES/django.po +3 -13
  250. wagtail/snippets/locale/sv/LC_MESSAGES/django.mo +0 -0
  251. wagtail/snippets/locale/sv/LC_MESSAGES/django.po +4 -3
  252. wagtail/snippets/tests/test_preview.py +5 -0
  253. wagtail/snippets/tests/test_snippets.py +100 -45
  254. wagtail/snippets/tests/test_usage.py +29 -24
  255. wagtail/snippets/tests/test_viewset.py +1 -1
  256. wagtail/snippets/views/snippets.py +0 -12
  257. wagtail/tasks.py +41 -0
  258. wagtail/templates/wagtailcore/shared/block_preview.html +29 -0
  259. wagtail/test/earlypage/__init__.py +0 -0
  260. wagtail/test/earlypage/migrations/0001_initial.py +37 -0
  261. wagtail/test/earlypage/migrations/__init__.py +0 -0
  262. wagtail/test/earlypage/models.py +14 -0
  263. wagtail/test/settings.py +3 -0
  264. wagtail/test/testapp/fixtures/test.json +7 -0
  265. wagtail/test/testapp/fixtures/test_specific.json +6 -3
  266. wagtail/test/testapp/models.py +58 -44
  267. wagtail/test/testapp/templates/tests/custom_block_preview.html +16 -0
  268. wagtail/test/testapp/templates/tests/static_block_preview.html +5 -0
  269. wagtail/test/testapp/wagtail_hooks.py +9 -0
  270. wagtail/tests/test_blocks.py +189 -2
  271. wagtail/tests/test_hooks.py +166 -1
  272. wagtail/tests/test_management_commands.py +54 -13
  273. wagtail/tests/test_page_allowed_http_methods.py +32 -0
  274. wagtail/tests/test_page_model.py +68 -0
  275. wagtail/tests/test_page_privacy.py +10 -0
  276. wagtail/tests/test_page_queryset.py +79 -0
  277. wagtail/tests/test_reference_index.py +84 -75
  278. wagtail/tests/test_streamfield.py +30 -0
  279. wagtail/tests/test_utils.py +61 -0
  280. wagtail/users/forms.py +2 -9
  281. wagtail/users/locale/en/LC_MESSAGES/django.po +17 -17
  282. wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
  283. wagtail/users/locale/nl/LC_MESSAGES/django.po +4 -3
  284. wagtail/users/templates/wagtailusers/groups/create.html +0 -5
  285. wagtail/users/templates/wagtailusers/groups/includes/page_permissions_form.html +1 -1
  286. wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.html +6 -6
  287. wagtail/users/tests/test_admin_views.py +96 -4
  288. wagtail/users/tests/test_utils.py +76 -0
  289. wagtail/users/utils.py +43 -11
  290. wagtail/utils/setup.py +2 -2
  291. wagtail/utils/templates.py +26 -0
  292. wagtail/utils/widgets.py +1 -0
  293. wagtail/views.py +9 -1
  294. wagtail/wagtail_hooks.py +67 -29
  295. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/METADATA +2 -2
  296. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/RECORD +300 -287
  297. wagtail/admin/static/wagtailadmin/js/expanding-formset.js +0 -1
  298. wagtail/admin/static/wagtailadmin/js/vendor/rangy-core.js +0 -1
  299. wagtail/admin/static/wagtailadmin/js/vendor/uuidv4.min.js +0 -1
  300. wagtail/contrib/search_promotions/views.py +0 -323
  301. wagtail/images/static/wagtailimages/js/vendor/canvas-to-blob.min.js +0 -1
  302. wagtail/users/static/wagtailusers/js/group-form.js +0 -1
  303. wagtail/users/templates/wagtailusers/groups/includes/group_form_js.html +0 -3
  304. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/LICENSE +0 -0
  305. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/WHEEL +0 -0
  306. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/entry_points.txt +0 -0
  307. {wagtail-6.3.1.dist-info → wagtail-6.4rc1.dist-info}/top_level.txt +0 -0
@@ -58,3 +58,10 @@ object-assign
58
58
  * This source code is licensed under the MIT license found in the
59
59
  * LICENSE file in the root directory of this source tree.
60
60
  */
61
+
62
+ /**!
63
+ * Sortable 1.15.3
64
+ * @author RubaXa <trash@rubaxa.org>
65
+ * @author owenm <owen23355@gmail.com>
66
+ * @license MIT
67
+ */
@@ -2,6 +2,10 @@
2
2
  {% load wagtailadmin_tags wagtailcore_tags i18n %}
3
3
  {% block titletag %}{% trans "Error 404: Page not found" %}{% endblock %}
4
4
 
5
+ {# Avoid loading all of Wagtail’s icons sprite and JavaScript as they're unused here. #}
6
+ {% block icons_sprite %}{% endblock %}
7
+ {% block js %}{% endblock %}
8
+
5
9
  {% block furniture %}
6
10
  <main class="page404__bg">
7
11
  <div class="w-w-full w-h-full w-max-w-6xl w-mx-auto w-flex w-items-center w-justify-center">
@@ -5,7 +5,8 @@
5
5
  {% trans "Choose a page" as choose_str %}
6
6
  {% endif %}
7
7
 
8
- {% include "wagtailadmin/shared/header.html" with title=choose_str subtitle=page_type_names|join:", " search_url="wagtailadmin_choose_page_search" query_parameters="page_type="|add:page_type_string icon="doc-empty-inverse" search_disable_async=True %}
8
+ {% querystring as search_query_params %}
9
+ {% include "wagtailadmin/shared/header.html" with title=choose_str subtitle=page_type_names|join:", " search_url="wagtailadmin_choose_page_search" query_parameters=search_query_params icon="doc-empty-inverse" search_disable_async=True %}
9
10
 
10
11
  <div class="nice-padding">
11
12
  {% include 'wagtailadmin/chooser/_link_types.html' with current='internal' %}
@@ -1,7 +1,7 @@
1
1
  {% load wagtailadmin_tags %}
2
2
  <td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
3
3
  {% if value %}
4
- <a href="{% url 'wagtailadmin_choose_page_child' value.id %}" class="navigate-parent">{{ value.get_admin_display_title }}</a>
4
+ <a href="{% url 'wagtailadmin_choose_page_child' value.id %}{% querystring p=None q=None %}" class="navigate-parent">{{ value.get_admin_display_title }}</a>
5
5
  {% if show_locale_labels %}{% status value.locale.get_display_name classname="w-status--label" %}{% endif %}
6
6
  {% endif %}
7
7
  </td>
@@ -7,7 +7,14 @@
7
7
  {% dialog icon_name='view' id='set-privacy' data_url=privacy_url title=_("Change privacy") message_status='info' message_heading=_("Privacy settings determine who is able to view documents in this collection.") %}
8
8
  {% enddialog %}
9
9
 
10
- <div class="privacy-indicator {% if is_public %}public{% else %}private{% endif %}">
10
+ <div
11
+ class="privacy-indicator {% if is_public %}public{% else %}private{% endif %}"
12
+ data-controller="w-zone"
13
+ data-action="w-privacy:changed@document->w-zone#switch"
14
+ data-w-zone-active-class="public"
15
+ data-w-zone-inactive-class="private"
16
+ data-w-zone-switch-key-value="isPublic"
17
+ >
11
18
  {% trans "Privacy" %}
12
19
  <button type="button" data-a11y-dialog-show="set-privacy" class="button button-small button-secondary">
13
20
  {# labels are shown/hidden in CSS according to the 'private' / 'public' class on view-permission-indicator #}
@@ -2,15 +2,21 @@
2
2
  {% load i18n %}
3
3
 
4
4
  {% block main_content %}
5
- {% if usage_url %}
6
- {% include "wagtailadmin/shared/usage_summary.html" %}
7
- {% endif %}
5
+ {% block usage_summary %}
6
+ {% if usage_url %}
7
+ {% include "wagtailadmin/shared/usage_summary.html" %}
8
+ {% endif %}
9
+ {% endblock %}
8
10
  {% if not is_protected %}
9
- <p>{{ view.confirmation_message }}</p>
10
- <form action="{{ view.get_delete_url }}" method="POST">
11
- {% csrf_token %}
12
- <input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
13
- <a href="{{ view.get_success_url }}" class="button button-secondary">{% trans "No, don't delete" %}</a>
14
- </form>
11
+ {% block confirmation_message %}
12
+ <p>{{ view.confirmation_message }}</p>
13
+ {% endblock %}
14
+ {% block form %}
15
+ <form action="{{ view.get_delete_url }}" method="POST">
16
+ {% csrf_token %}
17
+ <button type="submit" class="button serious">{% trans 'Yes, delete' %}</button>
18
+ <a href="{{ view.get_success_url }}" class="button button-secondary">{% trans "No, don't delete" %}</a>
19
+ </form>
20
+ {% endblock %}
15
21
  {% endif %}
16
22
  {% endblock %}
@@ -1,31 +1,27 @@
1
- {% extends "wagtailadmin/base.html" %}
1
+ {% extends "wagtailadmin/generic/base.html" %}
2
2
  {% load i18n wagtailadmin_tags %}
3
- {% block titletag %}{% blocktrans trimmed with title=object_display_title %}Unpublish {{ title }}{% endblocktrans %}{% endblock %}
4
- {% block content %}
5
- {% include "wagtailadmin/shared/header.html" with title=_("Unpublish") subtitle=object_display_title icon=header_icon %}
6
3
 
7
- <div class="nice-padding">
8
- {% if usage_url %}
9
- {% include "wagtailadmin/shared/usage_summary.html" %}
10
- {% endif %}
11
- {% block confirmation_text %}
12
- <p>
13
- {% blocktrans trimmed with model_name=model_opts.verbose_name %}
14
- Are you sure you want to unpublish this {{ model_name }}?
15
- {% endblocktrans %}
16
- </p>
17
- {% endblock %}
4
+ {% block main_content %}
5
+ {% if usage_url %}
6
+ {% include "wagtailadmin/shared/usage_summary.html" %}
7
+ {% endif %}
8
+ {% block confirmation_text %}
9
+ <p>
10
+ {% blocktrans trimmed with model_name=model_opts.verbose_name %}
11
+ Are you sure you want to unpublish this {{ model_name }}?
12
+ {% endblocktrans %}
13
+ </p>
14
+ {% endblock %}
18
15
 
19
- <form action="{{ unpublish_url }}" method="POST">
20
- {% csrf_token %}
16
+ <form action="{{ unpublish_url }}" method="POST">
17
+ {% csrf_token %}
21
18
 
22
- {% block form_content %}
23
- {% endblock %}
19
+ {% block form_content %}
20
+ {% endblock %}
24
21
 
25
- <div>
26
- <button class="button" type="submit">{% trans 'Yes, unpublish it' %}</button>
27
- <a href="{{ next_url }}" class="button button-secondary">{% trans "No, don't unpublish" %}</a>
28
- </div>
29
- </form>
30
- </div>
22
+ <div>
23
+ <button class="button" type="submit">{% trans 'Yes, unpublish it' %}</button>
24
+ <a href="{{ next_url }}" class="button button-secondary">{% trans "No, don't unpublish" %}</a>
25
+ </div>
26
+ </form>
31
27
  {% endblock %}
@@ -7,7 +7,7 @@
7
7
  <div class="nice-padding w-mt-8">
8
8
  <h2 class="w-relative w-h1" id="header-title">
9
9
  {% icon classname="w-absolute w-top-1 -w-left-11 w-max-w-[1em] w-max-h-[1em]" name=header_icon %}
10
- {{ page_subtitle }}
10
+ {{ page_subtitle|default:page_title }}
11
11
  </h2>
12
12
  </div>
13
13
  {% else %}
@@ -21,3 +21,6 @@
21
21
  {# Avoid loading all of Wagtail’s JavaScript for a fully static page. #}
22
22
  {% block js %}
23
23
  {% endblock %}
24
+
25
+ {# Avoid loading Wagtail’s icons sprite. #}
26
+ {% block icons_sprite %}{% endblock %}
@@ -1,84 +1,71 @@
1
- {% extends "wagtailadmin/base.html" %}
1
+ {% extends "wagtailadmin/generic/base.html" %}
2
2
  {% load i18n wagtailadmin_tags %}
3
3
 
4
- {% block titletag %}{% blocktrans trimmed with title=page_subtitle %}Comparing {{ title }}{% endblocktrans %}{% endblock %}
4
+ {% block main_content %}
5
+ <table class="listing w-mt-8">
6
+ <col width="15%" />
7
+ <col />
5
8
 
6
- {% block content %}
7
- {% include "wagtailadmin/shared/header.html" with title=_("Comparing") subtitle=page_subtitle icon=header_icon %}
9
+ <thead>
10
+ <tr>
11
+ <th>{% trans "Fields" %}</th>
12
+ <th>{% trans "Changes" %}</th>
13
+ </tr>
14
+ </thead>
8
15
 
9
- <div class="nice-padding">
10
-
11
- <p>
12
- <a href="{{ history_url }}" class="button button-small">{{ history_label|capfirst }}</a>
13
- <a href="{{ edit_url }}" class="button button-small button-secondary">{{ edit_label|capfirst }}</a>
14
- </p>
15
-
16
-
17
- <table class="listing">
18
- <col width="15%" />
19
- <col />
16
+ <tbody>
17
+ {% for comp in comparison %}
18
+ <tr>
19
+ <td class="title" valign="top">
20
+ <div class="title-wrapper">{{ comp.field_label }}:</div>
21
+ </td>
22
+ <td class="comparison{% if not comp.is_field %} no-padding{% endif %}">
23
+ {% if comp.is_field %}
24
+ {{ comp.htmldiff }}
25
+ {% elif comp.is_child_relation %}
26
+ {% for child_comp in comp.get_child_comparisons %}
27
+ <div class="comparison__child-object {% if child_comp.is_addition %}addition{% elif child_comp.is_deletion %}deletion{% endif %}">
28
+ {% with child_comp.get_position_change as move %}
29
+ {% if move %}
30
+ <div class="help-block help-info">
31
+ {% icon name='help' %}
32
+ <p>
33
+ {% if move > 0 %}
34
+ {% blocktrans trimmed count counter=move %}
35
+ Moved down 1 place.
36
+ {% plural %}
37
+ Moved down {{ counter }} places.
38
+ {% endblocktrans %}
39
+ {% elif move < 0 %}
40
+ {% blocktrans trimmed count counter=move|abs %}
41
+ Moved up 1 place.
42
+ {% plural %}
43
+ Moved up {{ counter }} places.
44
+ {% endblocktrans %}
45
+ {% endif %}
46
+ </p>
47
+ </div>
48
+ {% endif %}
49
+ {% endwith %}
20
50
 
21
- <thead>
51
+ <dl class="comparison__list">
52
+ {% for field_comp in child_comp.get_field_comparisons %}
53
+ <dt>{{ field_comp.field_label }}</dt>
54
+ <dd>{{ field_comp.htmldiff }}</dd>
55
+ {% endfor %}
56
+ </dl>
57
+ </div>
58
+ {% endfor %}
59
+ {% endif %}
60
+ </td>
61
+ </tr>
62
+ {% empty %}
22
63
  <tr>
23
- <th>{% trans "Fields" %}</th>
24
- <th>{% trans "Changes" %}</th>
64
+ <td colspan="2" class="no-results-message">
65
+ <p>{% trans "There are no differences between these two versions" %}</p>
66
+ </td>
25
67
  </tr>
26
- </thead>
27
-
28
- <tbody>
29
- {% for comp in comparison %}
30
- <tr>
31
- <td class="title" valign="top">
32
- <div class="title-wrapper">{{ comp.field_label }}:</div>
33
- </td>
34
- <td class="comparison{% if not comp.is_field %} no-padding{% endif %}">
35
- {% if comp.is_field %}
36
- {{ comp.htmldiff }}
37
- {% elif comp.is_child_relation %}
38
- {% for child_comp in comp.get_child_comparisons %}
39
- <div class="comparison__child-object {% if child_comp.is_addition %}addition{% elif child_comp.is_deletion %}deletion{% endif %}">
40
- {% with child_comp.get_position_change as move %}
41
- {% if move %}
42
- <div class="help-block help-info">
43
- {% icon name='help' %}
44
- <p>
45
- {% if move > 0 %}
46
- {% blocktrans trimmed count counter=move %}
47
- Moved down 1 place.
48
- {% plural %}
49
- Moved down {{ counter }} places.
50
- {% endblocktrans %}
51
- {% elif move < 0 %}
52
- {% blocktrans trimmed count counter=move|abs %}
53
- Moved up 1 place.
54
- {% plural %}
55
- Moved up {{ counter }} places.
56
- {% endblocktrans %}
57
- {% endif %}
58
- </p>
59
- </div>
60
- {% endif %}
61
- {% endwith %}
62
-
63
- <dl class="comparison__list">
64
- {% for field_comp in child_comp.get_field_comparisons %}
65
- <dt>{{ field_comp.field_label }}</dt>
66
- <dd>{{ field_comp.htmldiff }}</dd>
67
- {% endfor %}
68
- </dl>
69
- </div>
70
- {% endfor %}
71
- {% endif %}
72
- </td>
73
- </tr>
74
- {% empty %}
75
- <tr>
76
- <td colspan="2" class="no-results-message">
77
- <p>{% trans "There are no differences between these two versions" %}</p>
78
- </td>
79
- </tr>
80
- {% endfor %}
81
- </tbody>
82
- </table>
83
- </div>
68
+ {% endfor %}
69
+ </tbody>
70
+ </table>
84
71
  {% endblock %}
@@ -5,7 +5,5 @@
5
5
  {% endcomment %}
6
6
 
7
7
  <script src="{% versioned_static 'wagtailadmin/js/comments.js' %}"></script>
8
- <script src="{% versioned_static 'wagtailadmin/js/vendor/rangy-core.js' %}"></script>
9
- <script src="{% versioned_static 'wagtailadmin/js/expanding-formset.js' %}"></script>
10
8
  <script src="{% versioned_static 'wagtailadmin/js/privacy-switch.js' %}"></script>
11
9
  {% hook_output 'insert_editor_js' %}
@@ -14,7 +14,7 @@
14
14
 
15
15
  <form
16
16
  id="page-edit-form"
17
- action="{% url 'wagtailadmin_pages:edit' page.id %}"
17
+ action="{{ action_url }}"
18
18
  method="POST"
19
19
  novalidate
20
20
  {% if form.is_multipart %}enctype="multipart/form-data"{% endif %}
@@ -31,10 +31,6 @@
31
31
  <input type="hidden" name="next" value="{{ next }}">
32
32
  {{ edit_handler.render_form_content }}
33
33
 
34
- {% if is_revision %}
35
- <input type="hidden" name="revision" value="{{ revision.id|unlocalize }}" />
36
- {% endif %}
37
-
38
34
  {% block footer %}
39
35
  {{ block.super }}
40
36
  {# Reuse the footer container, but redefine the actions content down below to use component classes #}
@@ -7,6 +7,7 @@
7
7
  {% if can_order %}
8
8
  <button type="button" class="button button--icon text-replace white" data-inline-panel-child-move-up title="{% trans 'Move up' %}">{% icon name="arrow-up" %}</button>
9
9
  <button type="button" class="button button--icon text-replace white" data-inline-panel-child-move-down title="{% trans 'Move down' %}">{% icon name="arrow-down" %}</button>
10
+ <button type="button" class="button button--icon text-replace white" data-inline-panel-child-drag title="{% trans 'Drag' %}">{% icon name="grip" %}</button>
10
11
  {% endif %}
11
12
  <button type="button" class="button button--icon text-replace white" id="{{ child.form.DELETE.id_for_label }}-button" title="{% trans 'Delete' %}">{% icon name="bin" %}</button>
12
13
  {% endfragment %}
@@ -13,5 +13,5 @@
13
13
  {% endfor %}
14
14
 
15
15
  <td>
16
- <button class="button button-small no" type="button" id="{{ form.DELETE.id_for_label }}-button">{% trans "Delete" %}</button>
16
+ <button class="button button-small no" type="button" id="{{ form.DELETE.id_for_label }}-button" data-action="w-formset#delete">{% trans "Delete" %}</button>
17
17
  </td>
@@ -2,7 +2,7 @@
2
2
 
3
3
  {% fragment as icon %}{% block icon %}{% endblock %}{% endfragment %}
4
4
  {% fragment as heading %}{% block title %}{% endblock %}{% endfragment %}
5
- {% panel id=heading|slugify heading=heading icon=icon %}
5
+ {% panel id=heading|slugify heading=heading icon=icon attrs=formset.attrs %}
6
6
 
7
7
  {{ formset.management_form }}
8
8
 
@@ -28,9 +28,9 @@
28
28
  {% endfor %}
29
29
  </tr>
30
30
  </thead>
31
- <tbody id="id_{{ formset.prefix }}-FORMS">
31
+ <tbody id="id_{{ formset.prefix }}-FORMS" data-w-formset-target="forms">
32
32
  {% for form in formset.forms %}
33
- <tr id="inline_child_{{ form.prefix }}"{% if form.DELETE.value %} style="display: none;"{% endif %}>
33
+ <tr id="inline_child_{{ form.prefix }}"{% if form.DELETE.value %} hidden data-w-formset-target="deleted"{% else %} data-w-formset-target="child"{% endif %}>
34
34
  {% if form.non_field_errors %}
35
35
  <p class="error-message">
36
36
  {% for error in form.non_field_errors %}
@@ -44,30 +44,14 @@
44
44
  </tbody>
45
45
  </table>
46
46
 
47
- <template id="id_{{ formset.prefix }}-EMPTY_FORM_TEMPLATE">
48
- <tr id="inline_child_{{ formset.empty_form.prefix }}">
47
+ <template id="id_{{ formset.prefix }}-EMPTY_FORM_TEMPLATE" data-w-formset-target="template">
48
+ <tr id="inline_child_{{ formset.empty_form.prefix }}" data-w-formset-target="child">
49
49
  {% include "wagtailadmin/permissions/includes/collection_member_permissions_form.html" with form=formset.empty_form only %}
50
50
  </tr>
51
51
  </template>
52
52
 
53
53
  <p class="add">
54
- <button class="button bicolor button--icon" id="id_{{ formset.prefix }}-ADD" value="Add" type="button">{% icon name="plus" wrapped=1 %}{% block add_button_label %}{% endblock %}</button>
54
+ <button class="button bicolor button--icon" id="id_{{ formset.prefix }}-ADD" value="Add" type="button" data-action="w-formset#add">{% icon name="plus" wrapped=1 %}{% block add_button_label %}{% endblock %}</button>
55
55
  </p>
56
56
 
57
- <script>
58
- $(function() {
59
- buildExpandingFormset('id_{{ formset.prefix }}', {
60
- onInit: function(index) {
61
- var deleteInputId = 'id_{{ formset.prefix }}-' + index + '-DELETE';
62
- var childId = 'inline_child_{{ formset.prefix }}-' + index;
63
- $('#' + deleteInputId + '-button').on('click', function() {
64
- /* set 'deleted' form field to true */
65
- $('#' + deleteInputId).val('1');
66
- $('#' + childId).fadeOut();
67
- });
68
- }
69
- });
70
- });
71
- </script>
72
-
73
57
  {% endpanel%}
@@ -23,8 +23,8 @@
23
23
  </label>
24
24
  {% endif %}
25
25
 
26
- {# It’s possible to customise the fields’ layout based on widget type. #}
27
- {# Customising fields based on the field type is only supported for backwards compatibility. #}
26
+ {# It’s possible to customize the fields’ layout based on widget type. #}
27
+ {# Customizing fields based on the field type is only supported for backwards compatibility. #}
28
28
  <div class="w-field {{ field_classname }}{% if has_errors %} w-field--error{% endif %}{% if show_add_comment_button %} w-field--commentable{% endif %}" data-field{% if contentpath %} data-contentpath="{{ contentpath }}"{% endif %}>
29
29
 
30
30
  {# Always associate a wrapping div with the field, so JS error rendering knows where to put error messages. #}
@@ -11,7 +11,7 @@
11
11
  - `search_results_url` - URL to be used for async requests to search results, if not provided, the form's action URL will be used
12
12
  - `search_target` - A selector string to be used as the target for the search results to be swapped into. Defaults to '#listing-results'
13
13
  - `search_disable_async` - If True, the default header async search functionality will not be used
14
- - `query_parameters` - a query string (without the '?') to be placed after the search URL
14
+ - `query_parameters` - a query string (with or without the '?') to be placed after the search URL
15
15
  - `icon` - name of an icon to place against the title
16
16
  - `merged` - if true, add the classname 'w-header--merged'
17
17
  - `action_url` - if present, display an 'action' button. This is the URL to be used as the link URL for the button
@@ -42,7 +42,7 @@
42
42
  {% if search_url %}
43
43
  <form
44
44
  class="col search-form"
45
- action="{% url search_url %}{% if query_parameters %}?{{ query_parameters }}{% endif %}"
45
+ action="{% url search_url %}{% if query_parameters %}{% if query_parameters.0 != '?' %}?{% endif %}{{ query_parameters }}{% endif %}"
46
46
  method="get"
47
47
  novalidate
48
48
  role="search"
@@ -10,45 +10,38 @@
10
10
  {% comment %} Unable to use pageurl template tag here due to issues in unit tests where request is not yet available - see #10157 {% endcomment %}
11
11
  {% if page.live and page.url is not None %}
12
12
  {% test_page_is_public page as is_public %}
13
-
14
- <a href="{{ page.url }}" target="_blank" rel="noreferrer"
15
- class="
16
- page-status-tag
17
- u-text-uppercase
18
- w-inline-flex
19
- w-items-center
20
- w-justify-center
21
- w-whitespace-nowrap
22
- w-px-1
23
- w-ml-3
24
- w-text-11
25
- w-rounded-sm
26
- w-bg-transparent
27
- w-text-text-meta
28
- w-border
29
- w-border-border-furniture
30
- w-no-underline
31
- w-font-semibold
32
- hover:w-border-surface-menus
33
- hover:w-text-text-label
34
- w-transition
35
- more-contrast:w-border
36
- more-contrast:w-border-border-interactive-more-contrast
37
- hover:more-contrast:w-border-border-interactive-more-contrast-hover"
38
- aria-label="{% if is_public %}{% trans 'Visible to all. Visit the live page' %}{% else %}{% trans 'Private. Visit the live page' %}{% endif %}"
39
- data-controller="w-tooltip"
40
- data-w-tooltip-content-value="{% if is_public %}{% trans 'Visible to all' %}{% else %}{% trans 'Private' %}{% endif %}"
41
- data-w-tooltip-offset-value="[0, 13]"
13
+ {% trans 'Live' as live_label %}
14
+ {% comment %} Two copies of the tag, visibility is toggled by the privacy switch JS {% endcomment %}
15
+ <a
16
+ href="{{ page.url }}"
17
+ target="_blank"
18
+ rel="noreferrer"
19
+ class="{% classnames 'page-status-tag' is_public|yesno:',w-hidden' %}"
20
+ aria-label="{% trans 'Visible to all. Visit the live page' %}"
21
+ data-controller="w-tooltip w-zone"
22
+ data-action="w-privacy:changed@document->w-zone#switch"
23
+ data-w-tooltip-content-value="{% trans 'Visible to all' %}"
24
+ data-w-tooltip-offset-value="[0, 13]"
25
+ data-w-zone-inactive-class="w-hidden"
26
+ data-w-zone-switch-key-value="isPublic"
42
27
  >
43
-
44
- {% with icon_classes='privacy-indicator-icon w-w-4 w-h-4 w-mr-1' %}
45
- {% if is_public %}
46
- {% icon name="view" classname=icon_classes %}
47
- {% else %}
48
- {% icon name="no-view" classname=icon_classes %}
49
- {% endif %}
50
- {% endwith %}
51
-
52
- {% trans 'Live' %}
28
+ {% icon classname='w-w-4 w-h-4 w-mr-1' name="view" %}
29
+ {{ live_label }}
30
+ </a>
31
+ <a
32
+ href="{{ page.url }}"
33
+ target="_blank"
34
+ rel="noreferrer"
35
+ class="{% classnames 'page-status-tag' is_public|yesno:'w-hidden,' %}"
36
+ aria-label="{% trans 'Private. Visit the live page' %}"
37
+ data-controller="w-tooltip w-zone"
38
+ data-action="w-privacy:changed@document->w-zone#switch"
39
+ data-w-tooltip-content-value="{% trans 'Private' %}"
40
+ data-w-tooltip-offset-value="[0, 13]"
41
+ data-w-zone-inactive-class="w-hidden"
42
+ data-w-zone-switch-key-value="!isPublic"
43
+ >
44
+ {% icon classname='w-w-4 w-h-4 w-mr-1' name="no-view" %}
45
+ {{ live_label }}
53
46
  </a>
54
47
  {% endif %}
@@ -1,20 +1,16 @@
1
- {% extends "wagtailadmin/base.html" %}
1
+ {% extends "wagtailadmin/generic/base.html" %}
2
2
  {% load i18n %}
3
- {% block titletag %}{% blocktrans trimmed with title=object_display_title %}Unschedule Revision {{ revision.id }} for {{ title }}{% endblocktrans %}{% endblock %}
4
- {% block content %}
5
- {% include "wagtailadmin/shared/header.html" with title=_("Unschedule") subtitle=subtitle icon=header_icon %}
6
3
 
7
- <div class="nice-padding">
8
- <p>{% trans "Are you sure you want to unschedule this revision?" %}</p>
9
- <form action="{{ revisions_unschedule_url }}" method="POST">
10
- {% csrf_token %}
11
- <input type="hidden" name="next" value="{{ next }}">
12
- <ul class="fields">
13
- <li>
14
- <input type="submit" value="{% trans 'Yes, unschedule' %}" class="button">
15
- <a href="{{ next_url }}" class="button button-secondary">{% trans "No, don't unschedule" %}</a>
16
- </li>
17
- </ul>
18
- </form>
19
- </div>
4
+ {% block main_content %}
5
+ <p>{% trans "Are you sure you want to unschedule this revision?" %}</p>
6
+ <form action="{{ revisions_unschedule_url }}" method="POST">
7
+ {% csrf_token %}
8
+ <input type="hidden" name="next" value="{{ next }}">
9
+ <ul class="fields">
10
+ <li>
11
+ <input type="submit" value="{% trans 'Yes, unschedule' %}" class="button">
12
+ <a href="{{ next_url }}" class="button button-secondary">{% trans "No, don't unschedule" %}</a>
13
+ </li>
14
+ </ul>
15
+ </form>
20
16
  {% endblock %}
@@ -2,10 +2,16 @@
2
2
  {% load i18n wagtailadmin_tags %}
3
3
 
4
4
  {% block content %}
5
- {% test_page_is_public page as is_public %}
5
+ {% if page.id %}{% test_page_is_public page as is_public %}{% else %}{% test_page_is_public parent_page as is_public %}{% endif %}
6
6
 
7
7
  {# The swap between public and private text is done using JS inside of privacy-switch.js when the response from the modal comes back #}
8
- <div class="{% if not is_public %}w-hidden{% endif %}" data-privacy-sidebar-public>
8
+ <div
9
+ class="{% if not is_public %}w-hidden{% endif %}"
10
+ data-controller="w-zone"
11
+ data-action="w-privacy:changed@document->w-zone#switch"
12
+ data-w-zone-inactive-class="w-hidden"
13
+ data-w-zone-switch-key-value="isPublic"
14
+ >
9
15
  {% trans 'Page visibility: ' as screen_reader_title_prefix %}
10
16
  {% trans 'Visible to all' as title %}
11
17
  {% trans 'Once live anyone can view' as help_text %}
@@ -13,7 +19,13 @@
13
19
  {{ block.super }}
14
20
  {% endwith %}
15
21
  </div>
16
- <div class="{% if is_public %}w-hidden{% endif %}" data-privacy-sidebar-private>
22
+ <div
23
+ class="!w-my-0 {% if is_public %}w-hidden{% endif %}"
24
+ data-controller="w-zone"
25
+ data-action="w-privacy:changed@document->w-zone#switch"
26
+ data-w-zone-inactive-class="w-hidden"
27
+ data-w-zone-switch-key-value="!isPublic"
28
+ >
17
29
  {% trans 'Private' as title %}
18
30
  {% trans 'Not visible to the public' as help_text %}
19
31
  {% with icon_name='no-view' %}
@@ -33,7 +33,7 @@
33
33
  {% endblock %}
34
34
 
35
35
  {% block new_tab_button %}
36
- <a href="{{ preview_url }}?mode={{ object.default_preview_mode|urlencode }}" target="_blank" rel="noreferrer" class="w-preview__size-button" data-w-preview-target="newTab" data-action="w-preview#openPreviewInNewTab" aria-label="{% trans 'Preview in new tab' %}">{% icon name="link-external" %}</a>
36
+ <a href="{{ preview_url }}?mode={{ object.default_preview_mode|urlencode }}" target="_blank" rel="noreferrer" class="w-preview__size-button" data-w-preview-target="newTab" data-action="w-preview#openPreviewInNewTab:prevent" aria-label="{% trans 'Preview in new tab' %}">{% icon name="link-external" %}</a>
37
37
  {% endblock %}
38
38
  </div>
39
39
 
@@ -17,9 +17,11 @@
17
17
  {% sidebar_collapsed as sidebar_collapsed %}
18
18
  {% fragment as bodyclass %}{% block bodyclass %}{% endblock %}{% endfragment %}
19
19
  <body id="wagtail" class="{% classnames bodyclass sidebar_collapsed|yesno:"sidebar-collapsed," messages|yesno:"has-messages," %}" data-controller="w-init" data-w-init-ready-class="ready">
20
- <div data-sprite></div>
20
+ {% block icons_sprite %}
21
+ <div data-sprite></div>
21
22
 
22
- <script src="{% versioned_static 'wagtailadmin/js/icons.js' %}" data-icon-url="{% icon_sprite_url %}"></script>
23
+ <script src="{% versioned_static 'wagtailadmin/js/icons.js' %}" data-icon-url="{% icon_sprite_url %}"></script>
24
+ {% endblock %}
23
25
 
24
26
  <noscript class="capabilitymessage">
25
27
  {% blocktrans trimmed %}