Wykres commitów

17231 Commity (cf1c0683e8853bdf7992c2fe2451c80cda80ab11)

Autor SHA1 Wiadomość Data
Sage Abdullah cf1c0683e8
Reinstate register_user_listing_buttons hook support 2024-04-09 08:54:48 +07:00
Sage Abdullah bb12877f79
Use tables component in users index view
This also allows us to reuse the "..." more button for each listing item
instead of the inline buttons.
2024-04-09 08:54:48 +07:00
Sage Abdullah 08eda4df29
Render breadcrumbs in UserViewSet views 2024-04-09 08:54:48 +07:00
Sage Abdullah 6a1884e8d3
Wrap users views in UserViewSet
This changes the edit view URL to follow the established pattern
for ModelViewSet (to prevent clashing when using custom primary keys)
2024-04-09 08:54:48 +07:00
Matt Westcott fd08d209be
Fix timezone handling in timesince_last_update
Ref: https://github.com/wagtail/wagtail/pull/11815/files#r1556095493

test_group_edit was failing when run after 3pm UTC, due to the output being rendered as "Just now" instead of an explicit time. This was due to a previously unsurfaced logic error in the timesince_last_update tag: if the timestamp was passed as a timezone-aware datetime in UTC, it was failing to translate this to local time and thus it compared as a different date, even if it was only from a moment ago. Consequently, it was following the "X days ago" path that was only supposed to be used for timestamps before today.

With this fixed, the special-case for "Just now" can be removed since it won't come into play for timestamps of yesterday and earlier. (Well, technically it could in the first minute after midnight, but that really doesn't warrant a special case...)
2024-04-09 08:39:45 +07:00
Matt Westcott d3da555a31 Release note for #11815 2024-04-08 16:06:32 +01:00
Sage Abdullah 16c1cb15f7 Enable history view for groups 2024-04-08 15:50:59 +01:00
Sage Abdullah 83db1c9421 Add user to select_related when fetching last updated info in generic EditView
Reduce 1 query when displaying the last updated info in the status side panel
2024-04-08 15:50:59 +01:00
Sage Abdullah b98eaa37fd Do not get usage count in StatusSidePanel if usage url is not provided 2024-04-08 15:50:59 +01:00
Sage Abdullah 7e5869079e Move 'View users in this group' link to a slim header button 2024-04-08 15:50:59 +01:00
Sage Abdullah 7f62fb7e0b Make groups create/edit templates extend the generic ones
This allows us to reuse the "media" context variable and automatically
get the editor-view class on the body element so that the breadcrumbs
are made smaller
2024-04-08 15:50:59 +01:00
Sage Abdullah 2beeb15cb2 Extract common functionality in groups Create/Edit views into PermissionPanelFormsMixin 2024-04-08 15:50:59 +01:00
Sage Abdullah 8a4458d6fc Render breadcrumbs in GroupViewSet views 2024-04-08 15:50:59 +01:00
Matt Westcott 3ad88007db Release note for #11805 2024-04-08 14:13:24 +01:00
Sage Abdullah 42d3ae732a Enable breadcrumbs for collections create and edit views 2024-04-08 14:12:03 +01:00
Sage Abdullah 858e258bb7 Implement universal listings UI for collections listing view 2024-04-08 14:12:03 +01:00
LB Johnston c61a446b2f Add changelog for #11740
Closes #10167
2024-04-07 21:05:28 +10:00
Neeraj P Yetheendran a5f426b3f5 Adopt w-kbd Stimulus attributes for save & preview sidebar 2024-04-07 21:05:28 +10:00
Neeraj P Yetheendran 568611fe35 Remove non-Stimulus usage of Mousetrap
- No longer need page-editor.js (move the window. global to core.js instead)
2024-04-07 21:05:28 +10:00
Neeraj P Yetheendran 63f7e336db Create new Stimulus KeyboardController (w-kbd) 2024-04-07 21:05:28 +10:00
Neeraj P Yetheendran b0697ac0c4 Install npm mousetrap, types & update other packages 2024-04-07 21:05:28 +10:00
divdeploy 91cd6cffc2 chore: fix some comments
Signed-off-by: divdeploy <chenguangxue@outlook.com>
2024-04-07 15:59:37 +10:00
Matt Westcott 57d23ad38d Update history view test to use new timestamp filter names
As per 2b6d08f7bc
2024-04-05 17:52:02 +01:00
Matt Westcott ac8bdce9fb Release note for #11783 2024-04-05 17:37:28 +01:00
Sage Abdullah 0006976267 Implement universal listings UI for form submissions listing view 2024-04-05 17:36:41 +01:00
Sage Abdullah 1fbe6a64f5 Move header_more_buttons for export buttons to SpreadsheetExportMixin
Also remove the unnecessary call to get_header_more_buttons in WagtailAdminTemplateMixin, as the buttons are already constructed as part of get_header_buttons()
2024-04-05 17:36:41 +01:00
Sage Abdullah af80198c7d Rename SubmissionsListView.ordering to default_ordering for consistency with BaseListingView 2024-04-05 17:36:41 +01:00
Sage Abdullah 9d7cc96847 Reimplement submission date filter in SubmissionsListView with django-filter 2024-04-05 17:36:41 +01:00
Sage Abdullah 2b6d08f7bc Rename DateRangePickerWidget.suffixes to use 'from' and 'to' instead of 'after' and 'before'
The DateFromToRangeFilter (which the widget is usually used for) is inclusive, so the date specified as 'before' will still be included

Rename these to use 'from' and 'to' instead, which do not imply the exclusivity.

It also aligns better with the placeholder labels.
2024-04-05 17:36:41 +01:00
Sage Abdullah 00066cd4dd Make SubmissionsListView extend BaseListingView 2024-04-05 17:36:41 +01:00
Sage Abdullah 5a67cfecfd Remove unnecessary SubmissionsListView.get_paginate_by override
This was already moved to SpreadsheetExportMixin in a2487fe
2024-04-05 17:36:41 +01:00
Sage Abdullah 1bd6a0cb0c Remove unnecessary self.model check in FormPagesListView.get_breadcrumbs_items
The view already sets model = Page, so this check will always be skipped
2024-04-05 17:36:41 +01:00
Matt Westcott b504ed0281 Release note for #11764 2024-04-05 15:24:56 +01:00
Sage Abdullah c93e5a8cd4 Hide action and user filters in HistoryView if there are no choices 2024-04-05 15:14:57 +01:00
Sage Abdullah 465f4757f1 Use latest revision's object str instead of loading it as object in generic HistoryView
We only need the latest revision to display the latest string representation in the header
2024-04-05 15:14:57 +01:00
Sage Abdullah c2e2c4be6c Add page to select_related in page HistoryView
Prevent duplicate queries as some log formatters use log_entry.page.specific_class
2024-04-05 15:14:57 +01:00
Sage Abdullah 2e9553c47c Defer specific queries when generating page breadcrumbs
We don't really use any specific fields for the rest of the function
2024-04-05 15:14:57 +01:00
Sage Abdullah 03000b1171 Specify width for User and Date columns in HistoryView
Ensure the layout doesn't get shifted when filtering
2024-04-05 15:14:57 +01:00
Sage Abdullah 35987c6f35 Extract GenericPageBreadcrumbsMixin for combining generic views with page views 2024-04-05 15:14:57 +01:00
Sage Abdullah 2173a42345 Change page history's commenting action filter to be a tri-state filter
This allows users to also show commenting actions *only*. In addition,
this also fixes an issue where the active filter mechanism thinks that
the hide_commenting_action filter is active with the value False when
the filter is left unchecked.
2024-04-05 15:14:57 +01:00
Sage Abdullah a2ce4bca46 Completely reuse generic HistoryView template for page HistoryView 2024-04-05 15:14:57 +01:00
Sage Abdullah d461ed08bf Make index_url_name and edit_url_name in generic HistoryView optional
Also update the generic UsageView's get_edit_url method signature to
match the HistoryView and the generic IndexView by taking an "instance"
parameter, just to be consistent even though we technically only use
self.object for these views.
2024-04-05 15:14:57 +01:00
Sage Abdullah 9cc0539c4c Show deleted user id in generic HistoryView 2024-04-05 15:14:57 +01:00
Sage Abdullah 63157742c9 Use PermissionCheckedMixin in place of user_passes_test in pages HistoryView 2024-04-05 15:14:57 +01:00
Sage Abdullah b3659c23ab Make PageHistoryView a subclass of generic HistoryView 2024-04-05 15:14:57 +01:00
Sage Abdullah 0576bbec87 Add test for number of queries to load the page history view 2024-04-05 15:14:57 +01:00
Sage Abdullah 67d7f55d26 Render log entry's comment in the generic HistoryView if available 2024-04-05 15:14:57 +01:00
Sage Abdullah 59b0af2431 Define log entry status in the ActionColumn class 2024-04-05 15:14:57 +01:00
Sage Abdullah f9ccc5df67 Define HistoryView actions in the Column class 2024-04-05 15:14:57 +01:00
Sage Abdullah fa926ccef1 Reimplement snippets HistoryView actions in the generic view
Use the same logic as pages, but move most of it to the Column code in Python.

Also change the actions to use a dropdown to follow the universal listing styles
2024-04-05 15:14:57 +01:00