kopia lustrzana https://github.com/wagtail/wagtail
#1446 add pagination to wagtailadmin.views.pages.move_choose_destination
rodzic
df664e0b4e
commit
504759d267
|
@ -13,6 +13,7 @@ Changelog
|
|||
* `send_mail` logic has been moved from `AbstractEmailForm.process_form_submission` into `AbstractEmailForm.send_mail`. Now it's easier to override this logic (Tim Leguijt)
|
||||
* Added `before_create_page`, `before_edit_page`, `before_delete_page` hooks (Karl Hobley)
|
||||
* Updated font sizes and colours to improve legibility of admin menu and buttons (Stein Strindhaug)
|
||||
* Added pagination to "choose destination" view when moving pages (Nick Smith, Žan Anderle)
|
||||
* Fix: Migrations for wagtailcore and project template are now reversible (Benjamin Bach)
|
||||
* Fix: The default image format label text ('Full width', 'Left-aligned', 'Right-aligned') is now localised (Mikalai Radchuk)
|
||||
* Fix: Text on the front-end 'password required' form is now marked for translation (Janneke Janssen)
|
||||
|
|
|
@ -168,6 +168,7 @@ Contributors
|
|||
* Jayden Smith
|
||||
* emg36
|
||||
* Stein Strindhaug
|
||||
* Žan Anderle
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -43,6 +43,7 @@ Minor features
|
|||
* ``send_mail`` logic has been moved from ``AbstractEmailForm.process_form_submission`` into ``AbstractEmailForm.send_mail``. Now it's easier to override this logic (Tim Leguijt)
|
||||
* Added ``before_create_page``, ``before_edit_page``, ``before_delete_page`` hooks (Karl Hobley)
|
||||
* Updated font sizes and colours to improve legibility of admin menu and buttons (Stein Strindhaug)
|
||||
* Added pagination to "choose destination" view when moving pages (Nick Smith, Žan Anderle)
|
||||
|
||||
|
||||
Bug fixes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "wagtailadmin/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
{% block titletag %}{% blocktrans with title=page_to_move.title %}Select a new parent page for {{ title }}{% endblocktrans %}{% endblock %}
|
||||
{% block content %}
|
||||
<header class="nice-padding">
|
||||
|
@ -8,5 +8,7 @@
|
|||
|
||||
<div class="nice-padding">
|
||||
{% include "wagtailadmin/pages/listing/_list_move.html" with pages=child_pages parent_page=viewed_page %}
|
||||
{% url 'wagtailadmin_pages:move_choose_destination' page_to_move.id viewed_page.id as pagination_base_url %}
|
||||
{% paginate child_pages base_url=pagination_base_url %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -714,6 +714,9 @@ def move_choose_destination(request, page_to_move_id, viewed_page_id=None):
|
|||
|
||||
child_pages.append(target)
|
||||
|
||||
# Pagination
|
||||
paginator, child_pages = paginate(request, child_pages, per_page=50)
|
||||
|
||||
return render(request, 'wagtailadmin/pages/move_choose_destination.html', {
|
||||
'page_to_move': page_to_move,
|
||||
'viewed_page': viewed_page,
|
||||
|
|
Ładowanie…
Reference in New Issue