Wykres commitów

12082 Commity (f819d975dc2c5ef25d5c61953da58f33ea8cc65e)

Autor SHA1 Wiadomość Data
Thibaud Colas f819d975dc
Add dedicated release notes section for Windows high contrast mode support (#7618) 2021-10-15 17:51:19 +01:00
Matt Westcott e827ec0246 Generate new source strings for translation 2021-10-15 17:43:55 +01:00
Matt Westcott 538780dd50 Fetch new translations from Transifex 2021-10-15 17:39:26 +01:00
Jacob Topp-Mugglestone 2f8de89a5c Feature/bulk actions move chooser fixes (#7617)
* [feat] Documents, images and users bulk actions now work with custom models as well

* [fix] Bulk move disables invalid parent pages in the page chooser modal

* [refactor] Make the code DRY

Co-authored-by: Shohan <shohanduttaroy99@gmail.com>
2021-10-15 16:51:18 +01:00
Jacob Topp-Mugglestone 412c26201a Add changelog and release notes for bulk actions (#7615)
* Add changelog and release notes for bulk actions
2021-10-15 16:51:18 +01:00
Shohan 0d8ad857bf Customize select all in listing feature (#7606)
* [feat] Add feature to customize behavior of select all objects in listing

* [feat] Select all in listing now works with search terms

* [refactor] Make the code DRY
2021-10-15 16:51:18 +01: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
jacobtoppm 51f71709c6 Remove check preventing a user from bulk assigning themself a role 2021-10-15 16:51:18 +01:00
Shohan 8033078d6c [lint] Fix lint errors (#7608) 2021-10-15 16:51:18 +01:00
Dan Braghis 57b0d2c2d7 Improve image listing checkbox alignment
Co-Authored-By: Thibaud Colas <thibaudcolas@gmail.com>
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
Dan Braghis b74c942c2f Change "toggle activity" to "set active status" 2021-10-15 16:51:18 +01:00
Dan Braghis d19e1b4380 Tidy up based on code review 2021-10-15 16:51:18 +01:00
Dan Braghis 2688bb062c Extract bulk actions styles to own component
_listing.scss still has a couple of references to bulk actions, but they quite nested so best left in there
2021-10-15 16:51:18 +01:00
Dan Braghis ddb44bb92b fup 2021-10-15 16:51:18 +01:00
Dan Braghis 52f7a3a383 Use aria_labelledby on bulk action checkboxes 2021-10-15 16:51:18 +01:00
Dan Braghis 5f3a39285f Hide bulk actions on page chooser 2021-10-15 16:51:18 +01:00
Shohan e0df3f30d7 Update editorial images and add content for bulk actions 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
Shohan abd6c18125 Bulk actions - Refactor action registration (#7426)
* [feat] Bulk action class now accepts a list of models

* [feat] Add list of models to each bulk action

* [refactor] Remove individual listing dispatcher views

* [refactor] Introduce new hook for registering action classes

* [refactor] Add single dispatcher view for all bulk actions, and modify tag used to fetch bulk actions for ui

* [refactor] Transfer bulk action files to a directory

* [feat] Add utility functions to retrieve bulk actions easily

* [refactor] Register actions in wagtail_hooks.py files

* [refactor] Fix linting errors

* [fix] Fix tests due to change in url of bulk actions

* [refactor] Change action registration for users listing

* [fix] Fix code for which tests were failing

* [feat] Raise exception if bulk action class is not derived from BulkAction

* [feat] Make single model in cls.models as default model

* [refactor] Change name of function to get bulk actions for a model

* [feat] Add classmethod to get default model in case of single element models list

* [feat] Add bulk action registry to keep track of bulk actions instead of looping over all of them each time

* [fix] Fix linting issue

* [feat] Initialise bulk action registry once and reuse that instance wherever required

* [refactor] get_bulk_actions_for_model now returns an iterator
2021-10-15 16:51:18 +01:00
Shohan 52ce949ea0 Bulk actions - refactor execute_action (#7418)
* [refactor] Restructure the return value of 'get_actionable_objects'

* [refactor] Change code in move bulk action due to changes in base bulk action class

* [fix] Change tests due to changes in move bulk action

* [refactor] Apply changes to user bulk actions

* [fix] Fix tests due to changes in users bulk actions

* [feat] Remove object_key variable from BulkAction class

* [refactor] Change custom context keys used in all listings to generic ones

* [refactor] Refactor all bulk actions files to use items instead of objects for consistency
2021-10-15 16:51:18 +01:00
Shohan 6deafb7dd8 [fix] Fix bulk action checkboxes not hiding after deselecting all 2021-10-15 16:51:18 +01:00
Shohan 5f261910ae [fix] Fix bulk actions checkbox not working after search results 2021-10-15 16:51:18 +01:00
Shohan 9c5d0a2a26 Bulk actions - action bar UI fixes (#7403)
* [fix] Fix transform transition of action bar

* [refactor] Increase spacing in action bar, consistent with the designs

* [fix] Make button width fixed, with proper notes to accessibility

* [refactor] Decrease padding and border radius, remove borders from buttons, align action bar with titles

* [refactor] Remove border from more button and decrease font weight of button label
2021-10-15 16:51:18 +01:00
Shohan f4e6579f99 Bulk actions - Minor fixes (#7440)
* [refactor] Use django's bulk updates and deletes instead of updating objects one by one
* [refactor] Declare form fields as class variables rather than in __init__ method
* [refactor] Refactor the pages bulk actions to work if called from a management command
* [refactor] Specify implicitly the variables required in execute_action
* [refactor] Return early if no tags are supplied
* [refactor] Add **kwargs to all overriden execute_action method for additional keyword arguments
* [refactor] Remove unnecessary use of class variables
* [feat] execute_action now returns the count of updated objects, to be used in success message
2021-10-15 16:51:18 +01:00
Shohan 95d5097615 Bulk actions - appropriate string for listing (#7428)
* [feat] Add separate strings for different listings

* [refactor] Change string in users listing

* [refactor] Change keys to uppercase for consistency
2021-10-15 16:51:18 +01:00
Shohan e1bf910449 [refactor] Rename label for toggling activity, remove apply_on_applicable checkbox 2021-10-15 16:51:18 +01:00
Shohan 01ede63a55 [refactor] Separate success strings in toggle activity action 2021-10-15 16:51:18 +01:00
Shohan f0a3b48bab [refactor] Explicitly mention required kwargs in execute_action 2021-10-15 16:51:18 +01:00
Shohan 366776ebeb [fix] Fix test due to change in html structure 2021-10-15 16:51:18 +01:00
Shohan 1c985944b9 [feat] No user can mark themselves as inactive 2021-10-15 16:51:18 +01:00
Shohan e1460f8afc [refactor] Refactor bulk actions to use django orm's bulk update and delete methods 2021-10-15 16:51:18 +01:00
Shohan 9051fce7b3 [refactor] Remove unnecessary use of class variables 2021-10-15 16:51:18 +01:00
Shohan 0a7afc17c1 [refactor] Form fields are added as class variables, instead of adding them inside __init__ 2021-10-15 16:51:18 +01:00
Shohan 955f36fd38 [refactor] Import permission string instead of re-creating it 2021-10-15 16:51:18 +01:00
Shohan 7f1771b26a [refactor] Change his/her to their in assign role confirmation template 2021-10-15 16:51:18 +01:00
Shohan 3bac236240 [fix] Fix failing tests
Fixed following
- The list of ids in bulk action view were converted to int before querying. This could have problems when the ids were not meant to be integers,
e.g. like in the case of EmailUser where it is a uuid. Django converts strings to integers when querying wherever applicable, so explicit
conversion was removed.
2021-10-15 16:51:18 +01:00
Shohan 574705def8 [feat] Add tests for users bulk actions 2021-10-15 16:51:18 +01:00
Shohan 43cd3d6f88 [refactor] Move wagtail/user/tests.py to its own tests module 2021-10-15 16:51:18 +01:00
Shohan 310069befb [feat] Add bulk action ui to users listing, and show filter dropdown only for pages 2021-10-15 16:51:18 +01:00
Shohan 6ce2c33817 [feat] Add action dispatcher for users bulk actions 2021-10-15 16:51:18 +01:00
Shohan f55dec7aeb [feat] Add view and template to toggle user activity in bulk 2021-10-15 16:51:18 +01:00
Shohan 51b6d4f637 [feat] Add view and template to assign roles to users in bulk 2021-10-15 16:51:18 +01:00
Shohan 4bc3358d3f [feat] Add bulk delete view and template for users 2021-10-15 16:51:18 +01:00
Shohan 81adbbd571 [feat] get_queryset now filters based on primary key, rather than assuming that the primary key is named 'id' 2021-10-15 16:51:18 +01:00
Shohan d84198c45d [fix] bulk action tests now test for individual li elements instead of searching for the entire ul list
- Tests were failing because the order of the li elemeents were not as predicted. Checking for the li elements instead of the entire ul as a whole fixed that
2021-10-15 16:51:18 +01:00
Shohan 0a1bdc29fd [temp] Print html to check for error 2021-10-15 16:51:18 +01:00
Shohan d402deef08 [refactor] Set delete action as the last action, and remove unneccesary save on document in add tags on documnets bulk action 2021-10-15 16:51:18 +01:00
Shohan f43476a82b [refactor] Reword confirmation strings and button label for adding tags in documents bulk actions 2021-10-15 16:51:18 +01:00
Shohan 81ab3f1ed2 [refactor] Dedent extra indented blocks in documents bulk action confirmation templates 2021-10-15 16:51:18 +01:00