0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
Commit Graph

10223 Commits

Author SHA1 Message Date
Dan Braghis
f69287f6f4 Add documentation 2020-07-24 16:59:33 +01:00
Dan Braghis
9bbbc1c66e Add management command to create log entries from revisions 2020-07-24 16:59:33 +01:00
Dan Braghis
5fdac8443c Add audit log tests 2020-07-24 16:59:33 +01:00
Dan Braghis
7f9d949e35 Replace link to revisions with link to page history 2020-07-24 16:59:33 +01:00
Dan Braghis
d7d63c3ab1 Add audit log model, registry and reports 2020-07-24 16:59:33 +01:00
Matt Westcott
235edf450e Uncapitalise 'Locked pages' for consistency with the 'Workflow tasks' report 2020-07-24 16:59:33 +01:00
Dan Braghis
9e527e6d75 Only show active workflows in task usage (#6199)
and clean up duplicate property
2020-07-24 16:59:33 +01:00
Dan Braghis
69db40364c Add requested by filter on the workflow report (#6204) 2020-07-24 16:59:33 +01:00
Dan Braghis
7ae4d2ebf5 Update workflow icons (#6203) 2020-07-24 16:59:33 +01:00
Dan Braghis
eca154eb5a Update home dashboard styles (#6201)
* Update home style

- make the panels follow the edit page style
- add unlock action to the locked pages panel
- order workflow-related items by date, desc
- update workflow-related columns

* Use a simplified timesince filter

i.e.
19 hours, 48 minutes ago -> 19 hours ago
1 week, 1 day ago -> 1 week ago
0 minutes ago -> just now

* Use TaskState.started_at in home panels
2020-07-24 16:59:33 +01:00
Dan Braghis
fb0742802f Include task description in choosers, if defined (#6200) 2020-07-24 16:59:33 +01:00
Karl Hobley
03f728c67d Add "used on" column on Task index, edit and chooser (#6186)
Co-authored-by: Dan Braghis <dan.braghis@torchbox.com>
2020-07-24 16:59:33 +01:00
Karl Hobley
722c8eff56 Added workflow usage (#6178)
Co-authored-by: Dan Braghis <dan@zerolab.org>
2020-07-24 16:59:33 +01:00
Karl Hobley
bd9c73a00f Various UI tweaks to workflow management (#6177)
* Make workflow tasks management into a separate settings menu item
* UI improvements to make it match the design
2020-07-24 16:59:33 +01:00
Karl Hobley
edfd17a1f1 Reduce usage of edit handlers for workflow management (#6172)
* Use plain old Django forms for tasks

* Revert "Add ExcludeFieldsOnEditMixin for edit handlers, disabling specific fields when bound to an existing instance rather than creating a new one"

This reverts commit 62961b74bb.

* Move Workflow edit handler creation into Workflow forms

Only advantage of having it the way it was before is that allows
overriding the edit handler in subclasses. But nobody will be doing this
with workflows.

I've added a note into the code pointing out that we might want to
rethink using edit handlers if:

 - It gets easier to style formsets without using InlinePanel
 - We want to allow customisation of the form (the use of edit handlers
   should be considered an internal implementation detail at the moment)

* Make task name readonly but groups editable

* Update wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/create_form.html

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update wagtail/admin/forms/workflows.py

Co-authored-by: Dan Braghis <dan@zerolab.org>

Co-authored-by: Dan Braghis <dan@zerolab.org>
2020-07-24 16:59:33 +01:00
Karl Hobley
a80c34983b Workflow pages formset (#6171)
* Give "Create task" its own template
* Implement workflow pages formset
* Delete 'add workflow to page' view
* Moved $object-title-height to variables.scss
2020-07-24 16:59:33 +01:00
Karl Hobley
238d7d7b1b Implemented task chooser modal (#6169) 2020-07-24 16:59:33 +01:00
Karl Hobley
472c866163 Move "Apply filters" button above filters
Hard for users to find on a small screen at the moment
2020-07-24 16:59:33 +01:00
Karl Hobley
ba97889669 Add menu item for Workflow tasks report 2020-07-24 16:59:33 +01:00
jacobtoppm
903fd5ce11 Get STATUS_CHOICES from Task when annotating all_tasks_with_status (#6147) 2020-07-24 16:59:33 +01:00
jacobtoppm
2607bf43d0 Add failure icon, and use for rejected task states when displaying workflow status (#6148) 2020-07-24 16:59:33 +01:00
jacobtoppm
5d3e9d7ecd Register workflow and task permissions, add tests for workflow admin views with and without permissions, and ensure the workflow menu item is only shown if the workflow index is accessible (#6159) 2020-07-24 16:59:33 +01:00
jacobtoppm
0ed801244c Prevent non-reviewers from locking the page during workflow (#6156) 2020-07-24 16:59:33 +01:00
jacobtoppm
eaa7b6d7a3 Fix id of clipboard list svg (#6144) 2020-07-24 16:59:33 +01:00
jacobtoppm
04f703268e Change request.is_ajax to request.is_ajax() (#6145) 2020-07-24 16:59:33 +01:00
jacobtoppm
e70c309899 [Workflow] Commenting (#6136)
* Add comment to TaskState

* Add ability for Task on_action to accept kwargs, and a get_form_for_action method to request a form to enter addition kwargs for an action

* Refactor workflow_action to take more arguments rather than getting them from POST data, and add a GET version that returns a modal. Use this to add a way to add approve/reject comments on tasks

* Make tasks set finished_by

* Make workflow history timeline view the default, and fix comment display

* Add link to workflow history/comments on 'needs changes' message

* Fix tests to use new workflow action url

* Remove now-unnecessary check for TaskState copying on notifier

* Add comments to rejection emails

* Change needs changes banner to warning style, and reverse timeline order to show more recent events and crucially comments first

* Create template include for Wagtail standard form rendering, and use it in workflow action modal
2020-07-24 16:59:33 +01:00
jacobtoppm
f684bc7776 Workflow reviewable filter (#6139)
* Pass request into report filtersets

* Add reviewable filter to workflow and tasks reports
2020-07-24 16:59:33 +01:00
jacobtoppm
5be2d6df56 Fix task_states_with_status to get only latest task state status for task (#6138)
Get status from latest task state only when annotating task states with statuses
2020-07-24 16:59:33 +01:00
jacobtoppm
74a8cf8036 Workflow needs changes state (#6047)
Replace WorkflowState STATUS_REJECTED with STATUS_NEEDS_CHANGES, which does not end a workflow, and add cancellation and resubmit to rejector options. Make Workflows lock pages to non-reviewers. Make the linear mode of workflow the default.
2020-07-24 16:59:33 +01:00
Dan Braghis
f551dd3cfe Fix icon sizes on workflow report
[skip ci]
2020-07-24 16:59:33 +01:00
Dan Braghis
ecdc4558c5 Use TemplateResponse for workflow-related views 2020-07-24 16:59:33 +01:00
Dan Braghis
ed2d9a0094 Add missing admin widgets changes
Missed because of the `admin/widgets.py` to `admin/widgets/*` split
2020-07-24 16:59:33 +01:00
Dan Braghis
dce5020e17 Add a 'uniform' icon style 2020-07-24 16:59:33 +01:00
Dan Braghis
53c5606ada Fix icon use in workflow templates 2020-07-24 16:59:33 +01:00
Dan Braghis
0f58bd241a Move workflow upgrade considerations to 2.10 2020-07-24 16:59:33 +01:00
Dan Braghis
8dd8f59a72 Fix merge conflict remnants 2020-07-24 16:59:33 +01:00
Dan Braghis
a30d3e87fd Register new clipboard icon and use in Workflow menu 2020-07-24 16:59:33 +01:00
Matt Westcott
e6cd2b9483 Move pagination controls into base report 2020-07-24 16:59:33 +01:00
Matt Westcott
07ebbc24a4 Allow FilteredModelChoiceField to accept a callable or relation name as well as a property / method name for filter_accessor 2020-07-24 16:59:33 +01:00
Matt Westcott
ad37867bc6 Support optgroups in FilteredSelect 2020-07-24 16:59:33 +01:00
Matt Westcott
15114e8918 Add test for FilteredSelect 2020-07-24 16:59:33 +01:00
Matt Westcott
e182723371 More detailed docstring for FilteredSelect; also tweak it to accept filter_values as an actual list rather than a comma-delimited string 2020-07-24 16:59:33 +01:00
Matt Westcott
36780a9f56 Move FilteredSelect to wagtail.admin.widgets 2020-07-24 16:59:33 +01:00
Matt Westcott
35c55091af Move button select widgets to wagtail.admin.widgets 2020-07-24 16:59:33 +01:00
Matt Westcott
19609ebd4d Split up wagtail.admin.widgets into submodules 2020-07-24 16:59:33 +01:00
Matt Westcott
564e2097bb Fix name of started_at filter in tasks report 2020-07-24 16:59:33 +01:00
Matt Westcott
8b1a304533 Filter the tasks dropdown by the chosen workflow 2020-07-24 16:59:33 +01:00
Matt Westcott
c0d2dd7aea Add workflow filter to workflow tasks report 2020-07-24 16:59:33 +01:00
Karl Hobley
87d3213738 Mark translatable strings 2020-07-24 16:59:33 +01:00
Matt Westcott
bcbf6f0366 Add date range filters to workflow reports 2020-07-24 16:59:33 +01:00