From 1079b7f0212f3ddedfe350a20aa929c6a9c7072b Mon Sep 17 00:00:00 2001 From: kevinhowbrook Date: Tue, 19 Mar 2019 15:00:11 +0000 Subject: [PATCH] Improve the snippet UI by offering 'Don't delete' actions to the edit form --- CHANGELOG.txt | 1 + docs/releases/2.5.rst | 1 + .../wagtailsnippets/snippets/confirm_delete.html | 1 + .../templates/wagtailsnippets/snippets/list.html | 10 ++++++++++ 4 files changed, 13 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b808ffc76..43bd445f1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,7 @@ Changelog * Add support for more rich text formats, disabled by default: `blockquote`, `superscript`, `subscript`, `strikethrough`, `code` (Md Arifin Ibne Matin) * Added `max_count_per_parent` option on page models to limit the number of pages of a given type that can be created under one parent page (Wesley van Lee) * `StreamField` field blocks now accept a `validators` argument (Tom Usher) + * Added edit / delete buttons to snippet index and "don't delete" option to confirmation screen, for consistency with pages (Kevin Howbrook) * Fix: Set `SERVER_PORT` to 443 in `Page.dummy_request()` for HTTPS sites (Sergey Fedoseev) * Fix: Include port number in `Host` header of `Page.dummy_request()` (Sergey Fedoseev) * Fix: Validation error messages in `InlinePanel` no longer count towards `max_num` when disabling the 'add' button (Todd Dembrey, Thibaud Colas) diff --git a/docs/releases/2.5.rst b/docs/releases/2.5.rst index 4880581f1..82525bdb6 100644 --- a/docs/releases/2.5.rst +++ b/docs/releases/2.5.rst @@ -32,6 +32,7 @@ Other features * Add support for more rich text formats, disabled by default: ``blockquote``, ``superscript``, ``subscript``, ``strikethrough``, ``code`` (Md Arifin Ibne Matin) * Added ``max_count_per_parent`` option on page models to limit the number of pages of a given type that can be created under one parent page (Wesley van Lee) * ``StreamField`` field blocks now accept a ``validators`` argument (Tom Usher) + * Added edit / delete buttons to snippet index and "don't delete" option to confirmation screen, for consistency with pages (Kevin Howbrook) Bug fixes diff --git a/wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html b/wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html index 84a633f0c..e7f445560 100644 --- a/wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html +++ b/wagtail/snippets/templates/wagtailsnippets/snippets/confirm_delete.html @@ -35,6 +35,7 @@
{% csrf_token %} + {% trans "No, don't delete" %}
diff --git a/wagtail/snippets/templates/wagtailsnippets/snippets/list.html b/wagtail/snippets/templates/wagtailsnippets/snippets/list.html index 6e51a0dc2..551ecf685 100644 --- a/wagtail/snippets/templates/wagtailsnippets/snippets/list.html +++ b/wagtail/snippets/templates/wagtailsnippets/snippets/list.html @@ -21,6 +21,16 @@

{{ snippet }}

{% else %}

{{ snippet }}

+ {% endif %}