def page_custom_listing_buttons(page, page_perms, is_parent=False): yield wagtailadmin_widgets.ButtonWithDropdownFromHook( 'More Actions', hook_name='my_button_dropdown_hook', page=page, page_perms=page_perms, is_parent=is_parent, priority=50)
def page_custom_listing_buttons(page, page_perms, is_parent=False): yield wagtailadmin_widgets.ButtonWithDropdownFromHook( 'One more more button', hook_name='register_page_listing_one_more_more_buttons', page=page, page_perms=page_perms, is_parent=is_parent, attrs={'target': '_blank'}, priority=50)
def page_custom_listing_buttons( page, page_perms, is_parent=False, next_url=None ): yield wagtailadmin_widgets.ButtonWithDropdownFromHook( "One more more button", hook_name="register_page_listing_one_more_more_buttons", page=page, page_perms=page_perms, is_parent=is_parent, next_url=next_url, attrs={"target": "_blank", "rel": "noreferrer"}, priority=50, )
def page_translations_menu(page, page_perms, is_parent=False): if not hasattr(page, 'language'): return if hasattr(page, 'canonical_page') and page.canonical_page: return yield widgets.ButtonWithDropdownFromHook( 'Translate into', hook_name='wagtailtrans_dropdown_hook', page=page, page_perms=page_perms, is_parent=is_parent, priority=10)
def edit_in_language_button(page, page_perms, is_parent=False): """Add ``Edit in`` button to the page explorer. When hiding all other translation except the canonical language, which is done via ``WAGTAILTRANS_HIDE_TRANSLATION_TREES`` this will add an button to allow the user to select a other language to edit, which provides a more clear interface to work in. """ if not hasattr(page, 'language'): return yield widgets.ButtonWithDropdownFromHook( _("Edit in"), hook_name='wagtailtrans_dropdown_edit_hook', page=page, page_perms=page_perms, is_parent=is_parent, priority=10)