allow hiding actions via type options
This commit is contained in:
parent
e054d43221
commit
2d121fe028
1 changed files with 10 additions and 1 deletions
|
@ -407,11 +407,20 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
||||||
def actions(self):
|
def actions(self):
|
||||||
result = [dict(name=t.name, title=t.title)
|
result = [dict(name=t.name, title=t.title)
|
||||||
for t in self.track.getAvailableTransitions()
|
for t in self.track.getAvailableTransitions()
|
||||||
if t.name in self.workItemType.actions]
|
if t.name in self.workItemType.actions and
|
||||||
|
t.name not in self.hiddenActions]
|
||||||
#and (t.name != 'delegate' or
|
#and (t.name != 'delegate' or
|
||||||
# checkPermission('loops.ManageSite', self.context))]
|
# checkPermission('loops.ManageSite', self.context))]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def hiddenActions(self):
|
||||||
|
task = self.task
|
||||||
|
if task is None:
|
||||||
|
task = self.target
|
||||||
|
options = IOptions(adapted(task.conceptType))
|
||||||
|
return options.hidden_workitem_actions or []
|
||||||
|
|
||||||
def getTypesParamsForFilteringSelect(self, types=['person']):
|
def getTypesParamsForFilteringSelect(self, types=['person']):
|
||||||
result = []
|
result = []
|
||||||
for t in types:
|
for t in types:
|
||||||
|
|
Loading…
Add table
Reference in a new issue