Skip to content

Commit 611ecb7

Browse files
committed
change icon
1 parent 454dd85 commit 611ecb7

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

backend/src/workflow/manager/api/services/workflow/base.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff 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():

backend/src/workflow/manager/api/services/workflow/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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,

frontend/packages/volto-workflow-manager/src/components/Workflow/ActionsToolbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Toast from '@plone/volto/components/manage/Toast/Toast';
1212
import { useIntl, defineMessages } from 'react-intl';
1313
import Icon from '@plone/volto/components/theme/Icon/Icon';
1414
import 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';
1616
import checkboxChecked from '@plone/volto/icons/checkbox-checked.svg';
1717
import blank from '@plone/volto/icons/blank.svg';
1818
import 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>

0 commit comments

Comments
 (0)