provide basic work delegation functionality
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3596 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
8c7f688324
commit
dddc43086d
5 changed files with 42 additions and 9 deletions
|
@ -8,8 +8,13 @@ $Id$
|
|||
|
||||
New features
|
||||
|
||||
- delegation of work items basically working
|
||||
- show "parents" portlet for anonymous, controlled by global option
|
||||
``showParentsForAnonymous``
|
||||
- use Lighbox view for media asset listings
|
||||
- new view: ``list_children.html``
|
||||
- evaluate action settings also on queries
|
||||
- new action: ``create institution``
|
||||
- "send email" feature, controlled by global option ``organize.allowSendEmail``
|
||||
- presence: portlet showing other users logged-in and working within the
|
||||
same loops site, controlled by global option ``organize.showPresence`,
|
||||
|
@ -33,6 +38,9 @@ New features
|
|||
|
||||
Bug fixes
|
||||
|
||||
- use correct target view for identifying target concept upon editing
|
||||
(problem with personal_info query: query was updated instead of person)
|
||||
- check/evaluate language settings in dialogs
|
||||
- relations: store relation objects explicitly in relation registry
|
||||
- external collection: now works correctly (without creating empty files
|
||||
in the var directory); resource type of generated object controlled by
|
||||
|
|
|
@ -29,6 +29,11 @@ function validate(nodeName, required) {
|
|||
}
|
||||
}
|
||||
|
||||
function showIf(node, value, targetName) {
|
||||
var display = (node.value == value) ? 'inline' : 'none';
|
||||
dojo.byId(targetName).style.display = display;
|
||||
}
|
||||
|
||||
function destroyWidgets(node) {
|
||||
dojo.forEach(dojo.query('[widgetId]', node), function(n) {
|
||||
w = dijit.byNode(n);
|
||||
|
|
|
@ -139,8 +139,8 @@ work item, the form will be pre-filled with some of the item's data.
|
|||
>>> form.actions
|
||||
[{'name': 'plan', 'title': 'plan'}, {'name': 'accept', 'title': 'accept'},
|
||||
{'name': 'start', 'title': 'start working'}, {'name': 'work', 'title': 'work'},
|
||||
{'name': 'finish', 'title': 'finish'}, {'name': 'cancel', 'title': 'cancel'},
|
||||
{'name': 'modify', 'title': 'modify'}]
|
||||
{'name': 'finish', 'title': 'finish'}, {'name': 'delegate', 'title': 'delegate'},
|
||||
{'name': 'cancel', 'title': 'cancel'}, {'name': 'modify', 'title': 'modify'}]
|
||||
|
||||
|
||||
Work Item Queries
|
||||
|
|
|
@ -214,7 +214,8 @@ class BaseWorkItemsView(object):
|
|||
state = form.get('wi_state') or self.options.wi_state
|
||||
if not state:
|
||||
result['state'] = ['planned', 'accepted', 'running', 'done', 'done_x',
|
||||
'finished', 'delegated']
|
||||
'finished', 'delegated',
|
||||
'cancelled']
|
||||
elif state != 'all':
|
||||
result['state'] = state
|
||||
return result
|
||||
|
@ -325,6 +326,13 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
|||
return [dict(name=t.name, title=t.title)
|
||||
for t in self.track.getAvailableTransitions()]
|
||||
|
||||
@Lazy
|
||||
def candidates(self):
|
||||
ptype = self.conceptManager['person']
|
||||
persons = ptype.getChildren([self.typePredicate])
|
||||
return [dict(name=util.getUidForObject(p), title=p.title)
|
||||
for p in persons]
|
||||
|
||||
@Lazy
|
||||
def duration(self):
|
||||
if self.state == 'running':
|
||||
|
@ -374,6 +382,8 @@ class CreateWorkItem(EditObject, BaseTrackView):
|
|||
result[k] = v
|
||||
for k in ('title', 'description', 'comment'):
|
||||
setValue(k)
|
||||
if action == 'delegate':
|
||||
setValue('party')
|
||||
startDate = form.get('start_date', '').strip()
|
||||
startTime = form.get('start_time', '').strip().replace('T', '') or '00:00:00'
|
||||
endTime = form.get('end_time', '').strip().replace('T', '') or '00:00:00'
|
||||
|
|
|
@ -89,11 +89,21 @@
|
|||
</div>
|
||||
<div>
|
||||
<label i18n:translate="" for="action">Action</label>
|
||||
<select name="workitem.action" id="action">
|
||||
<select name="workitem.action" id="action"
|
||||
onChange="showIf(this, 'delegate', 'party')">
|
||||
<option tal:repeat="action view/actions"
|
||||
tal:attributes="value action/name"
|
||||
tal:content="action/title" />
|
||||
</select>
|
||||
<span id="party" style="display: none">
|
||||
<label i18n:translate="" for="input_party"
|
||||
style="display: inline">to</label>
|
||||
<select name="party" id="input_party">
|
||||
<option tal:repeat="cand view/candidates"
|
||||
tal:attributes="value cand/name"
|
||||
tal:content="cand/title" />
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<label i18n:translate="" for="start-end">Start - End</label>
|
||||
|
|
Loading…
Add table
Reference in a new issue