Sage Abdullah
72455b10f0
Add TestSubmitSnippetToWorkflow based on TestSubmitPageToWorkflow
...
TestSubmitPageToWorkflow is renamed from TestSubmitToWorkflow
2023-01-19 14:07:49 +00:00
Sage Abdullah
7713efa0ab
Add snippet content type tests to workflow views
2023-01-19 14:07:49 +00:00
Sage Abdullah
a6d4fd2d22
Add basic snippet workflow tests in wagtail.tests.test_workflow
2023-01-19 14:07:49 +00:00
Sage Abdullah
4a476a669b
Do not show warning message when disabling a task if there's no in progress states
2023-01-19 14:07:49 +00:00
Sage Abdullah
4a404aee2e
Check Task.user_can_lock/unlock() when checking lock/unlock permissions
2023-01-19 14:07:48 +00:00
Sage Abdullah
c3c76a7ffb
Fix workflow history detail timeline content from showing on initial load
2023-01-19 14:07:48 +00:00
Sage Abdullah
0648edaece
Improve workflow history index accessibility
...
Wrap the workflow name in a link, as using the status tag as the primary link may not be obvious to users
Switch tooltip to use tippy with tabindex="0" so it's accessible via keyboard
2023-01-19 14:07:48 +00:00
Sage Abdullah
384969e130
Show workflow name on workflow history index page
2023-01-19 14:07:48 +00:00
Sage Abdullah
2aa8d17dc7
Show snippet type count on workflow index view's 'used by' column
2023-01-19 14:07:48 +00:00
Sage Abdullah
9ea6c5aabf
Check current workflow task's user_can_access_editor
for snippet edit permission
2023-01-19 14:07:48 +00:00
Sage Abdullah
401b227b76
Handle non-page objects in workflow notification templates
2023-01-19 14:07:47 +00:00
Sage Abdullah
230fe5a66c
Show non-page objects in workflow and workflow task reports
2023-01-19 14:07:47 +00:00
Sage Abdullah
4775990224
Link to workflow history view instead of the edit history in workflow status dialog
2023-01-19 14:07:47 +00:00
Sage Abdullah
4cc3556b16
Add workflow history views for snippets that extend WorkflowMixin
2023-01-19 14:07:47 +00:00
Sage Abdullah
d7f64584c9
Extract generic workflow history views and make pages views extend from them
2023-01-19 14:07:46 +00:00
Sage Abdullah
711d592052
Move pages/workflow_history
templates to shared
2023-01-19 14:06:11 +00:00
Sage Abdullah
4db3ef23d6
Make WorkflowObjectsToModeratePanel
generic
2023-01-19 14:06:11 +00:00
Sage Abdullah
3857935ec9
Rename WorkflowPagesToModeratePanel
to WorkflowObjectsToModeratePanel
2023-01-19 14:06:11 +00:00
Sage Abdullah
66732aebcd
Prefetch content_object's latest_revision instead of current_task_state's revision
...
The latter is unused in the template, while the former might be used if the object is not a page object
2023-01-19 14:06:10 +00:00
Sage Abdullah
dfaf715967
Make user_objects_in_workflow_moderation.html
work with non-Page objects
2023-01-19 14:06:10 +00:00
Sage Abdullah
d910b96cfd
Create is_page
, admin_edit_url
, and latest_str
admin helper tags
2023-01-19 14:06:10 +00:00
Sage Abdullah
6e7394c90f
Make UserPagesInWorkflowModerationPanel
generic
2023-01-19 14:06:10 +00:00
Sage Abdullah
e4dbd88810
Remove unique constraint before using GenericForeignKey
in WorkflowState
...
Prevent migrations crash on SQLite before https://github.com/django/django/pull/15175 landed in Django
2023-01-19 14:06:10 +00:00
Sage Abdullah
c008fdfb39
Avoid querying with GenericRelations
to prevent crash on Postgres
...
Upstream issue: https://code.djangoproject.com/ticket/16055
2023-01-19 14:06:09 +00:00
Sage Abdullah
b151180cc8
Add ModalWorkflow
code in snippets edit view to handle workflow cancellation on publish
2023-01-19 14:06:09 +00:00
Sage Abdullah
6401599bf1
Add workflow views for snippets that extend WorkflowMixin
2023-01-19 14:06:09 +00:00
Sage Abdullah
ef7964f226
Create separate workflow_menu_item.html
template for snippets action menu
2023-01-19 14:06:09 +00:00
Sage Abdullah
301c6d9040
Add workflow_states
default property to WorkflowMixin
2023-01-19 14:06:09 +00:00
Sage Abdullah
ce7e8b47a3
Create shared/confirm_workflow_cancellation.html
template
...
and use it in generic `ConfirmWorkflowCancellation` view
2023-01-19 14:06:09 +00:00
Sage Abdullah
a0567caca3
Make workflow_status.html
template generic
2023-01-19 14:06:08 +00:00
Sage Abdullah
a511431443
Extract generic workflow views and make pages views extend from them
2023-01-19 14:06:08 +00:00
Sage Abdullah
5b6036a165
Extract BaseObjectMixin
from BaseOperationView
2023-01-19 14:06:08 +00:00
Sage Abdullah
1300f0d2d3
Move pages/workflow_action_modal.html
template to shared
2023-01-19 14:06:08 +00:00
Sage Abdullah
7fa83361ab
Add ActivateWorkflowActionsForEditView
setup to snippets edit view
2023-01-19 14:06:08 +00:00
Sage Abdullah
1f3bda2220
Add code to construct WorkflowMenuItem
s in snippets action menu
2023-01-19 14:06:07 +00:00
Sage Abdullah
b03399a61a
Ignore reference indexing for WorkflowState
2023-01-19 14:06:07 +00:00
Sage Abdullah
c8463e8642
Safely access Page
-specific attributes in WorkflowState
methods
2023-01-19 14:06:07 +00:00
Sage Abdullah
dcb7949c59
Use variables in WorkflowLock.get_message()
to reduce queries
2023-01-19 14:06:07 +00:00
Sage Abdullah
7c71a2187f
Only show lock message if the request method is GET
2023-01-19 14:06:07 +00:00
Sage Abdullah
9a8b3adc90
Add workflow handling code in CreateEditViewOptionalFeaturesMixin
2023-01-19 14:06:07 +00:00
Sage Abdullah
22205e437c
Use workflow name in workflow information dialog
2023-01-19 14:06:06 +00:00
Sage Abdullah
3d1be62fa5
Ensure workflow email notifiers use the specific page instance
2023-01-19 14:06:06 +00:00
Sage Abdullah
901ed92739
Add workflow-related action menu items to snippets that extend WorkflowMixin
2023-01-19 14:06:06 +00:00
Sage Abdullah
70716e7c7a
Fix in-progress count in warning message when disabling workflows
...
The filter is missing a parameter to only query WorkflowStates
of the current Workflow
2023-01-19 14:06:06 +00:00
Sage Abdullah
14368e0465
Make warning message when disabling a workflow/task non-page specific
...
And only show warning message if there are states in progress when disabling a workflow/task
2023-01-19 14:06:06 +00:00
Sage Abdullah
e686213803
Add form to assign workflows to snippet models that extend WorkflowMixin
2023-01-19 14:06:05 +00:00
Sage Abdullah
e88c8c902a
Delete associated WorkflowContentType
objects in Workflow.deactivate
2023-01-19 14:06:05 +00:00
Sage Abdullah
b94c79fa73
Move WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH
handling to generic publish_revision
action
2023-01-19 14:06:05 +00:00
Sage Abdullah
3b1c71f48e
Add non-page specific message to WorkflowLock
2023-01-19 14:06:05 +00:00
Sage Abdullah
41304ec4f9
Move Page.get_lock()
to LockableMixin.get_lock()
2023-01-19 14:06:05 +00:00