File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
backend/src/workflow/manager/api/services/workflow
frontend/packages/volto-workflow-manager/src/components/Workflow Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -200,17 +200,14 @@ def get_assignable_types_for(self, workflow_id):
200200 Returns a list of content types that do not currently have the
201201 specified workflow assigned.
202202 """
203- # Get the list of types already using this workflow
204- assigned_types = self .get_assigned_types_for (workflow_id )
203+ assigned_types = self ._get_assigned_types_for (workflow_id )
205204
206- # Get all user-friendly content types
207205 vocab_factory = getUtility (IVocabularyFactory ,
208206 name = "plone.app.vocabularies.ReallyUserFriendlyTypes" )
209207 all_types = vocab_factory (self .context )
210208
211209 assignable_types = []
212210 for term in all_types :
213- # A type is assignable if its ID is not in the assigned list
214211 if term .value not in assigned_types :
215212 assignable_types .append ({
216213 "id" : term .value ,
@@ -219,7 +216,7 @@ def get_assignable_types_for(self, workflow_id):
219216
220217 return sorted (assignable_types , key = lambda v : v ['title' ])
221218
222- def get_assigned_types_for (self , workflow_id ):
219+ def _get_assigned_types_for (self , workflow_id ):
223220 """Returns a list of content type IDs assigned to a workflow."""
224221 assigned = []
225222 for p_type , chain in self .portal_workflow .listChainOverrides ():
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def _serialize_workflow(workflow, base):
3838 }
3939 for t in workflow .transitions .objectValues ()
4040 ],
41- "assigned_types" : workflow_base .get_assigned_types_for (workflow .id ),
41+ "assigned_types" : workflow_base ._get_assigned_types_for (workflow .id ),
4242 "context_data" : {
4343 "assignable_types" : workflow_base .get_assignable_types_for (workflow .id ),
4444 "managed_permissions" : workflow_base .managed_permissions ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import Toast from '@plone/volto/components/manage/Toast/Toast';
1212import { useIntl , defineMessages } from 'react-intl' ;
1313import Icon from '@plone/volto/components/theme/Icon/Icon' ;
1414import add from '@plone/volto/icons/add.svg' ;
15- import adduser from '@plone/volto/icons/add-user .svg' ;
15+ import contentexisting from '@plone/volto/icons/content-existing .svg' ;
1616import checkboxChecked from '@plone/volto/icons/checkbox-checked.svg' ;
1717import blank from '@plone/volto/icons/blank.svg' ;
1818import CreateState from '../States/CreateState' ;
@@ -127,7 +127,7 @@ const ActionsToolbar = ({ workflowId }: { workflowId: string }) => {
127127 { validation . loading ? 'Checking...' : 'Sanity Check' }
128128 </ Button >
129129 < Button variant = "secondary" onPress = { ( ) => setAssignDialogOpen ( true ) } >
130- < Icon name = { adduser } size = "20px" />
130+ < Icon name = { contentexisting } size = "20px" />
131131 Assign
132132 </ Button >
133133 </ ButtonGroup >
You can’t perform that action at this time.
0 commit comments