Wykres commitów

116 Commity (stable/2.16.x)

Autor SHA1 Wiadomość Data
Thibaud Colas 71be900e25 Update MenuItem API documentation 2022-01-21 10:24:02 +00:00
Tidiane Dia 11e1ff03df Add register_page_header_buttons hook documentation 2022-01-07 16:23:17 +00:00
LB (Ben Johnston) c9aa26e887
Documentation - remove all jQuery usage (#7658) 2021-12-07 15:37:33 +00:00
Shohan 4624d2d540 Fix typos and remove unwanted code from bulk actions (#7613)
* [refactor] Fix typos and documentation

* [refactor] Remove unused attribute object_key

* [refactor] Remove filters from page explorer

* [refactor] Remove unused code of page filters
2021-10-15 16:51:18 +01:00
Dan Braghis 247bfe883f Further tidy up following code review
Co-Authored-By: Thibaud Colas <thibaudcolas@gmail.com>
2021-10-15 16:51:18 +01:00
Shohan 24f987db49 Add bulk actions documentation
Co-Authored-By: Thibaud Colas <thibaudcolas@gmail.com>
2021-10-15 16:51:18 +01:00
LB Johnston f453092d0c update hooks documentation to use mark_safe as no variables are used 2021-10-06 20:57:32 +10:00
Daniel 381b11f54f Include custom permissions hook documentation 2021-10-01 06:52:43 +10:00
JaneLiu 92381698d0 Add code example for `before_delete_page` hook 2021-09-30 21:15:33 +10:00
Matt Westcott 3b972775fc Deprecate passing callables as log messages 2021-09-27 19:54:25 +01:00
Matt Westcott e777517950 Update docs on action menu items to cover new API 2021-08-24 15:42:04 +01:00
Matt Westcott 1ad6f3518c Update docs to cover use of components in homepage panels / summary items 2021-08-24 15:42:04 +01:00
Matt Westcott 4e2685f47d Add an 'Extending Wagtail' section to the docs 2021-08-03 16:07:18 +01:00
Storm Heg 3ee060ffd7
Add keyboard and screen reader support to Wagtail user bar (#6994). Fix #6108
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-06-26 20:53:44 +01:00
Karl Hobley 8e25960972
Telepath set up for new sidebar
* Add ability to register multiple hooks with register_temporarily

It's not possible to add multiple items in a ``with`` block in multiple
lines. So to register multiple hooks, you either need to put them all on
one line or add many nested ``with`` blocks.

This commit adds the ability to pass in a list of hooks into one call.
This works around the syntax error, but there's still no way to
represent this in a way that flake8 is happy with so I've added
``#noqa`` in a few places.

* Telepath set up for new sidebar

* unindent hooks.register_temporarily with blocks

Co-authored-by: Matt Westcott <matt@west.co.tt>

* Update wagtail/core/telepath.py

Co-authored-by: Matt Westcott <matt@west.co.tt>

Co-authored-by: Matt Westcott <matt@west.co.tt>
2021-05-14 16:16:55 +01:00
Karl Hobley ab8608a74f Docs for customising account settings 2021-04-20 18:43:22 +01:00
Jaap Roes 8d0eff1717
Fix typo in hooks reference example (#6926) 2021-03-16 17:14:52 +00:00
Thibaud Colas 8b07ad4cea
Add support for SVG icons to SearchArea subclasses and register_admin_search_area (#6493) 2021-03-09 11:33:06 +00:00
Thibaud Colas 5257ef6c84
Update register_admin_menu_item documentation to match SVG icons setup (#6892) 2021-03-09 12:04:09 +01:00
Matt Westcott 9886cb0476 add missing : to after_create_page example 2021-01-27 09:21:42 +00:00
LB 7737497239 fix JS code example in hooks docs
- when returning format_html `{` (brace) characters must be escaped
- https://docs.python.org/3/library/string.html#format-string-syntax
2021-01-15 13:18:15 +00:00
Matt Westcott 9fab50e87a remove trailing whitespace 2020-10-19 18:11:12 +01:00
Jean Zombie b5cfca31eb Add example of updating a page within after_create_page (#6373)
This update intends to add the answer I got on my slack support request (https://wagtailcms.slack.com/archives/C81FGJR2S/p1599209092087000).
2020-10-19 18:01:49 +01:00
Karl Hobley 7f7f9b4de1 Make snippets action menu hookable 2020-10-14 14:41:22 +01:00
Karl Hobley c170c50c78 Add view for converting aliases into regular pages 2020-10-08 10:24:58 +01:00
Karl Hobley 39d931d77d Javascript => JavaScript 2020-10-03 14:43:03 +01:00
Matt Westcott a1f882b7c9 Convert remaining gettext .format strings to old-style string formatting
As per #5548 / #6238. Fixes #6343
2020-08-21 13:26:00 +01:00
Matt Westcott 8542f5fe9c Fix underline lengths to prevent Sphinx warnings 2020-08-07 17:23:42 +01:00
Karl Hobley 9ad14ea439
Add hooks for snippet listing buttons 2020-08-07 15:47:27 +01:00
Karl Hobley 9b02147d3e Add hooks.register_temporarily for testing hooks
There's currently a number of places where we test hooks by registering
hook functions from test methods. These are never cleaned up so that
hook remains registered in future tests. This can cause issues with
tests not working consistently when you run a subset of the tests.

This adds a `register_temporarily` function to the hooks module. This
function can be used either as a decorator or a context manager. It'll
always remove the hook after the decorated function or with block exits,
even if it exits through an exception.
2020-08-07 15:47:04 +01:00
Karl Hobley 4bf28b502c Fix docs for `construct_page_listing_buttons` 2020-07-31 11:14:48 +01:00
Karl Hobley f3f932d2e5
Add before_{create,edit,delete}_snippet hooks 2020-07-30 08:08:40 +01:00
Matt Westcott 6f85bca664 Use % formatting for new workflow / audit log translation strings
See #5548 - Transifex recognises % formatting, and will guard against translators introducing errors by attempting to translate the embedded variable names.
2020-07-24 16:59:33 +01:00
Matt Westcott c8a8689cee Document icon_name and classname for register_page_action_menu_item 2020-07-24 16:59:33 +01:00
Dan Braghis f69287f6f4 Add documentation 2020-07-24 16:59:33 +01:00
Matt Westcott 9917d7d2e9 Additional documentation for next_url 2020-07-15 11:53:39 +10:00
Storm Heg 4076b9ef5e Replace calls to django.conf.urls.url with django.urls.path or django.urls.re_path 2020-07-06 13:15:37 +01:00
Jean Zombie 9baf6ce62a Update hooks.rst (#6160 / #6161)
This proposed update is in regard to Issue #6160
2020-06-25 14:54:16 +01:00
Kalob Taulien f757324039 Add Snippet hooks (after_edit_snippet, after_create_snippet and after_delete_snippet) 2020-05-14 20:47:36 +10:00
Jonatas Baldin a7f58821a7 Add publish & unpublish page hooks
* Add `before_unpublish_page` and `before_unpublish_page` hooks
* Add `before_publish_page` and `before_publish_page` hooks
* Resolves #4590
2020-05-03 14:18:13 +10:00
Ascani Carlo 5f3c12682f Redirect to previous url when deleting/copying/unpublish a page
* modify register_page_listing_buttons & register_page_listing_more_buttons to handle next_url kwarg
* resolves #3010
2020-04-26 18:24:13 +10:00
Mohamed Feddad bb2e460c0b Replace deprecated ugettext, ungettext with gettext and ngettext. (#5907) 2020-04-02 17:15:26 +01:00
Matt Westcott 3f86de27e0 Document AdminOnlyMenuItem in hooks documentation 2020-03-19 17:57:52 +00:00
jacobtm 7421590dc7 Document reports submenu hooks 2020-01-02 09:47:52 +00:00
Matt Westcott 34b3f0c0fc Recommend signals rather than hooks for model-level customisations
As per #5620 - signals are often overlooked as a way of customising model-level behaviour. We should recommend them over admin hooks where possible, as they aren't reliant on users taking one particular path through the admin - for example, an 'add document' signal will be triggered regardless of whether a document is created through the single uploader, multiple uploader, chooser model or a scripted task, whereas a hook would not catch all of these cases.
2019-10-15 13:52:32 +01:00
Matt Westcott 3557c954c0 Clarify that menu item order attribute is ignored in construct_page_action_menu 2019-10-11 12:17:52 +01:00
Matt Westcott 6de06b6d04 Update construct_page_action_menu example
Now avoids redefining the whole list, and reflects the fact that the first (rather than last) item is picked as the default.
2019-10-11 12:11:09 +01:00
Rahmi Pruitt fe2f8644fa Allow default item in action menu to be overridden with construct_page_action_menu hook
Fixes #5438
2019-10-11 12:11:08 +01:00
Matt Westcott 76d72a36c3 Documentation tweaks for WAGTAILDOCS_SERVE_METHOD
As suggested by @chosak - https://github.com/wagtail/wagtail/pull/5296#discussion_r324252497 , https://github.com/wagtail/wagtail/pull/5296#discussion_r324257167
2019-09-21 18:53:48 +01:00
Michael van Tellingen 9cd2fc2c82 Add a `construct_page_listing_buttons` hook
This hook mimics the functiolity provided by `construct_page_action_menu`
in that it constructs the final list of buttons to be shown in the wagtail
admin interface.  This means that within this function button's can be
removed, added or re-ordered.

See #4925
2019-07-21 17:40:26 +10:00