improvements and fixes for meeting minutes: views, infos, creating follow-up events, ...

This commit is contained in:
Helmut Merz 2012-07-31 17:55:39 +02:00
parent c2ee316927
commit c0b68ace67
3 changed files with 33 additions and 6 deletions

View file

@ -333,12 +333,13 @@ class CreateFollowUpEvent(CreateConcept, BaseFollowUpController):
conceptType=taskType,
title=source.title,
description=source.description,
responsible=source.start,
responsible=source.responsible,
discussion=source.discussion,
consequences=source.consequences)
stask.assignChild(newTask, self.followsPredicate)
for rel in stask.getParentRelations():
if rel.predicate != self.view.typePredicate:
if rel.predicate not in (
self.view.typePredicate, self.followsPredicate):
if rel.first == bevt:
parent = self.object
else:

View file

@ -75,6 +75,10 @@ class WorkItemDetails(TrackDetails):
def descriptionFormatted(self):
return format.nl2br(self.description)
@Lazy
def deadline(self):
return self.formatTimeStamp(self.track.deadline, 'date')
@Lazy
def start(self):
return self.formatTimeStamp(self.track.start, 'time')
@ -418,7 +422,14 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
return [dict(name=util.getUidForObject(p), title=p.title)
for p in persons]
taskTypes = ['task', 'event']
taskTypes = ['task', 'event', 'agendaitem']
@Lazy
def followUpTask(self):
pred = self.conceptManager.get('follows')
if pred is not None and self.task is not None:
for t in self.task.getChildren([pred]):
return t
@Lazy
def x_tasks(self):

View file

@ -88,7 +88,7 @@
</tal:type>
<tal:type condition="not:view/showTypes">
<input type="hidden" name="workItemType"
tal:attributes="value python:workItemTypes[0]" />
tal:attributes="value python:workItemTypes[0].name" />
</tal:type>
<label i18n:translate="" for="title">Title</label>
<div>
@ -125,7 +125,8 @@
name="party" id="input_party"
store="party_search_store" />
</span>
<span id="target_task" style="display: none">&nbsp;
<span id="target_task" style="display: none"
tal:condition="not:view/followUpTask">&nbsp;
<label i18n:translate="move_to_task" for="input_task"
style="display: inline">to</label>
<span dojoType="dojox.data.QueryReadStore" jsId="task_search_store"
@ -138,6 +139,15 @@
name="task" id="input_task"
store="task_search_store" />
</span>
<span id="target_task" style="display: none"
tal:condition="view/followUpTask">&nbsp;
<label i18n:translate="move_to_task" for="input_task"
style="display: inline">to</label>
<span tal:content="view/followUpTask/title" />
<input type="hidden" name="task" id="input_task"
tal:attributes="value python:
view.getUidForObject(view.followUpTask)" />
</span>
</div>
<div>
<div id="deadline"
@ -219,6 +229,10 @@
<td><span i18n:translate="">Task</span>:</td>
<td tal:content="item/object/title"></td>
</tr>
<tr>
<td><span i18n:translate="">Deadline</span>:</td>
<td tal:content="item/deadline"></td>
</tr>
<tr>
<td><span i18n:translate="">Start - End</span>:</td>
<td><span tal:content="item/startDay" />
@ -251,7 +265,8 @@
tal:attributes="href python:view.getUrlForTarget(party)"
tal:content="party/title" /></td>
</tr>
<tr tal:condition="python:state.name in ('moved', 'moved_x')">
<tr tal:condition="python:state.name in ('moved', 'moved_x') and
item.targetWorkItem is not None">
<td><span i18n:translate="">Moved To</span>:</td>
<td><a tal:define="task python:view.getObjectForUid(item.targetWorkItem.taskId)"
tal:attributes="href python:view.getUrlForTarget(task)"