mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Added a title to 'add child page', added translations
This commit is contained in:
parent
da3d3c8585
commit
ca19cd4a8a
@ -69,13 +69,14 @@ def page_listing_buttons(page, page_perms, is_parent=False):
|
||||
yield PageListingButton(_('Draft'), reverse('wagtailadmin_pages:view_draft', args=[page.id]),
|
||||
attrs={'title': _('Preview draft'), 'target': '_blank'}, priority=20)
|
||||
if page.live and page.url:
|
||||
yield PageListingButton(_('Live'), page.url, attrs={'target': "_blank", 'title': 'View live'}, priority=30)
|
||||
yield PageListingButton(_('Live'), page.url, attrs={'target': "_blank", 'title': _('View live')}, priority=30)
|
||||
if page_perms.can_add_subpage():
|
||||
if is_parent:
|
||||
yield Button(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),
|
||||
classes={'button', 'button-small', 'bicolor', 'icon', 'white', 'icon-plus'}, priority=40)
|
||||
attrs={'title': _("Add a child page to '{0}' ".format(page.title))}, classes={'button', 'button-small', 'bicolor', 'icon', 'white', 'icon-plus'}, priority=40)
|
||||
else:
|
||||
yield PageListingButton(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]), priority=40)
|
||||
yield PageListingButton(_('Add child page'), reverse('wagtailadmin_pages:add_subpage', args=[page.id]),
|
||||
attrs={'title': _("Add a child page to '{0}' ".format(page.title))}, priority=40)
|
||||
|
||||
yield ButtonWithDropdownFromHook(
|
||||
_('More'),
|
||||
@ -83,22 +84,22 @@ def page_listing_buttons(page, page_perms, is_parent=False):
|
||||
page=page,
|
||||
page_perms=page_perms,
|
||||
is_parent=is_parent,
|
||||
attrs={'target': '_blank', 'title': 'View more options'}, priority=50)
|
||||
attrs={'target': '_blank', 'title': _('View more options')}, priority=50)
|
||||
|
||||
|
||||
@hooks.register('register_page_listing_more_buttons')
|
||||
def page_listing_more_buttons(page, page_perms, is_parent=False):
|
||||
if page_perms.can_move():
|
||||
yield Button(_('Move'), reverse('wagtailadmin_pages:move', args=[page.id]),
|
||||
attrs={"title": 'Move this page'}, priority=10)
|
||||
attrs={"title": _('Move this page')}, priority=10)
|
||||
if not page.is_root():
|
||||
yield Button(_('Copy'), reverse('wagtailadmin_pages:copy', args=[page.id]),
|
||||
attrs={'title': 'Copy this page'}, priority=20)
|
||||
attrs={'title': _('Copy this page')}, priority=20)
|
||||
if page_perms.can_delete():
|
||||
yield Button(_('Delete'), reverse('wagtailadmin_pages:delete', args=[page.id]),
|
||||
attrs={'title': 'Delete this page'}, priority=30)
|
||||
attrs={'title': _('Delete this page')}, priority=30)
|
||||
if page_perms.can_unpublish():
|
||||
yield Button(_('Unpublish'), reverse('wagtailadmin_pages:unpublish', args=[page.id]),
|
||||
attrs={'title': 'Unpublish this page'}, priority=40)
|
||||
attrs={'title': _('Unpublish this page')}, priority=40)
|
||||
yield Button(_('Revisions'), reverse('wagtailadmin_pages:revisions_index', args=[page.id]),
|
||||
attrs={'title': _("View this page's revision history")}, priority=50)
|
||||
|
Loading…
Reference in New Issue
Block a user