make default work item action configurable via option 'organize.work.default_actions'
This commit is contained in:
parent
396d4727dc
commit
7d979a5749
4 changed files with 14 additions and 8 deletions
|
@ -106,6 +106,7 @@ class NodeView(BaseView):
|
||||||
return []
|
return []
|
||||||
return t.subparts
|
return t.subparts
|
||||||
parts = getParts(self)
|
parts = getParts(self)
|
||||||
|
#return parts
|
||||||
for n in self.textItems:
|
for n in self.textItems:
|
||||||
parts.extend(getParts(n))
|
parts.extend(getParts(n))
|
||||||
return parts
|
return parts
|
||||||
|
|
|
@ -138,12 +138,15 @@ The 'delegate' transition is omitted from the actions list because it is
|
||||||
only available for privileged users.
|
only available for privileged users.
|
||||||
|
|
||||||
>>> form.actions
|
>>> form.actions
|
||||||
[{'name': 'plan', 'title': 'plan'}, {'name': 'accept', 'title': 'accept'},
|
[{'selected': False, 'name': 'plan', 'title': 'plan'},
|
||||||
{'name': 'start', 'title': 'start working'}, {'name': 'work', 'title': 'work'},
|
{'selected': False, 'name': 'accept', 'title': 'accept'},
|
||||||
{'name': 'finish', 'title': 'finish'}, {'name': 'delegate', 'title': 'delegate'},
|
{'selected': False, 'name': 'start', 'title': 'start working'},
|
||||||
{'name': 'move', 'title': 'move'}, {'name': 'cancel', 'title': 'cancel'},
|
{'selected': False, 'name': 'work', 'title': 'work'},
|
||||||
{'name': 'modify', 'title': 'modify'}]
|
{'selected': False, 'name': 'finish', 'title': 'finish'},
|
||||||
|
{'selected': False, 'name': 'delegate', 'title': 'delegate'},
|
||||||
|
{'selected': False, 'name': 'move', 'title': 'move'},
|
||||||
|
{'selected': False, 'name': 'cancel', 'title': 'cancel'},
|
||||||
|
{'selected': False, 'name': 'modify', 'title': 'modify'}]
|
||||||
|
|
||||||
Work Item Queries
|
Work Item Queries
|
||||||
=================
|
=================
|
||||||
|
|
|
@ -517,7 +517,8 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def actions(self):
|
def actions(self):
|
||||||
result = [dict(name=t.name, title=t.title)
|
defaults = self.globalOptions('organize.work.default_actions') or []
|
||||||
|
result = [dict(name=t.name, title=t.title, selected=t.name in defaults)
|
||||||
for t in self.track.getAvailableTransitions()
|
for t in self.track.getAvailableTransitions()
|
||||||
if t.name in self.workItemType.actions and
|
if t.name in self.workItemType.actions and
|
||||||
t.name not in self.hiddenActions]
|
t.name not in self.hiddenActions]
|
||||||
|
|
|
@ -130,7 +130,8 @@
|
||||||
['start', 'duration', ''],
|
['start', 'duration', ''],
|
||||||
['start', 'effort', '']])">
|
['start', 'effort', '']])">
|
||||||
<option tal:repeat="action view/actions"
|
<option tal:repeat="action view/actions"
|
||||||
tal:attributes="value action/name"
|
tal:attributes="value action/name;
|
||||||
|
selected action/selected"
|
||||||
tal:content="action/title"
|
tal:content="action/title"
|
||||||
i18n:translate="" />
|
i18n:translate="" />
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Add table
Reference in a new issue