mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Add documentation for register_user_listing_buttons hook
- Has existed since Wagtail ~1.6 but never documented
This commit is contained in:
parent
aeae816b27
commit
1fe9581548
@ -14,6 +14,7 @@ Changelog
|
|||||||
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
||||||
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
||||||
* Clean up duplicate JavaScript for the `escapeHtml` function (Jordan Rob)
|
* Clean up duplicate JavaScript for the `escapeHtml` function (Jordan Rob)
|
||||||
|
* Add documentation for `register_user_listing_buttons` hook (LB (Ben Johnston))
|
||||||
* Fix: Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
|
* Fix: Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
|
||||||
* Fix: Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
|
* Fix: Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
|
||||||
* Fix: Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
|
* Fix: Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
|
||||||
|
@ -379,6 +379,24 @@ Return a QuerySet of `Permission` objects to be shown in the Groups administrati
|
|||||||
])
|
])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
(register_user_listing_buttons)=
|
||||||
|
|
||||||
|
### `register_user_listing_buttons`
|
||||||
|
|
||||||
|
Add buttons to the user list. This example will add a simple button to the listing:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from wagtail.users.widgets import UserListingButton
|
||||||
|
|
||||||
|
@hooks.register("register_user_listing_buttons")
|
||||||
|
def user_listing_external_profile(context, user):
|
||||||
|
yield UserListingButton(
|
||||||
|
"Show profile",
|
||||||
|
f"/goes/to/a/url/{user.pk}",
|
||||||
|
priority=30,
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
(filter_form_submissions_for_user)=
|
(filter_form_submissions_for_user)=
|
||||||
|
|
||||||
### `filter_form_submissions_for_user`
|
### `filter_form_submissions_for_user`
|
||||||
|
@ -24,6 +24,7 @@ depth: 1
|
|||||||
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
||||||
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
||||||
* Clean up duplicate JavaScript for the `escapeHtml` function (Jordan Rob)
|
* Clean up duplicate JavaScript for the `escapeHtml` function (Jordan Rob)
|
||||||
|
* Add documentation for [`register_user_listing_buttons`](register_user_listing_buttons) hook (LB (Ben Johnston))
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user