kopia lustrzana https://github.com/wagtail/wagtail
Improve the snippet UI by offering 'Don't delete' actions to the edit form
rodzic
2a1d5b6065
commit
1079b7f021
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<form action="{{ submit_url }}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
|
||||
<a href="{% if next %}{{ next }}{% else %}{% url 'wagtailsnippets:list' model_opts.app_label model_opts.model_name %}{% endif %}" class="button button-secondary">{% trans "No, don't delete" %}</a>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -21,6 +21,16 @@
|
|||
<h2><a class="snippet-choice" href="{% url 'wagtailsnippets:chosen' model_opts.app_label model_opts.model_name snippet.pk|admin_urlquote %}">{{ snippet }}</a></h2>
|
||||
{% else %}
|
||||
<h2><a href="{% url 'wagtailsnippets:edit' model_opts.app_label model_opts.model_name snippet.pk|admin_urlquote %}">{{ snippet }}</a></h2>
|
||||
<ul class="actions">
|
||||
<li>
|
||||
<a href="{% url 'wagtailsnippets:edit' model_opts.app_label model_opts.model_name snippet.pk|admin_urlquote %}" class="button button-secondary button-small">Edit</a>
|
||||
</li>
|
||||
{% if can_delete_snippets %}
|
||||
<li>
|
||||
<a href="{% url 'wagtailsnippets:delete' model_opts.app_label model_opts.model_name snippet.pk|admin_urlquote %}" class="button button-secondary button-small">Delete</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Ładowanie…
Reference in New Issue