meeting minutes improvements
create follow-up event: automatic creation of work items on new agenda item if selected; finished work items are not selected append new child to end of existing children if option 'children_append' is set and children is already ordered manually
This commit is contained in:
parent
1b8146b683
commit
9b4098c9da
6 changed files with 66 additions and 26 deletions
|
@ -45,6 +45,7 @@ from cybertools.composer.schema.grid.field import grid_macros
|
||||||
from cybertools.composer.schema.interfaces import ISchemaFactory
|
from cybertools.composer.schema.interfaces import ISchemaFactory
|
||||||
from cybertools.composer.schema.browser.common import schema_macros, schema_edit_macros
|
from cybertools.composer.schema.browser.common import schema_macros, schema_edit_macros
|
||||||
from cybertools.composer.schema.schema import FormState
|
from cybertools.composer.schema.schema import FormState
|
||||||
|
from cybertools.meta.interfaces import IOptions
|
||||||
from cybertools.stateful.interfaces import IStateful
|
from cybertools.stateful.interfaces import IStateful
|
||||||
from cybertools.typology.interfaces import IType, ITypeManager
|
from cybertools.typology.interfaces import IType, ITypeManager
|
||||||
from cybertools.util.format import toUnicode
|
from cybertools.util.format import toUnicode
|
||||||
|
@ -727,6 +728,13 @@ class EditConcept(EditObject):
|
||||||
return obj.getParentRelations(predicates=predicates, parent=concept)
|
return obj.getParentRelations(predicates=predicates, parent=concept)
|
||||||
|
|
||||||
def assignConcept(self, obj, concept, predicate):
|
def assignConcept(self, obj, concept, predicate):
|
||||||
|
if IOptions(adapted(concept.conceptType)).children_append:
|
||||||
|
sibRelations = concept.getChildRelations()
|
||||||
|
if sibRelations:
|
||||||
|
maxOrder = max([r.order for r in sibRelations])
|
||||||
|
if maxOrder > 0:
|
||||||
|
return obj.assignParent(concept, predicate,
|
||||||
|
order=maxOrder+1)
|
||||||
obj.assignParent(concept, predicate)
|
obj.assignParent(concept, predicate)
|
||||||
|
|
||||||
def deassignConcept(self, obj, concept, predicates):
|
def deassignConcept(self, obj, concept, predicates):
|
||||||
|
|
Binary file not shown.
|
@ -3,7 +3,7 @@ msgstr ""
|
||||||
|
|
||||||
"Project-Id-Version: $Id$\n"
|
"Project-Id-Version: $Id$\n"
|
||||||
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
"POT-Creation-Date: 2007-05-22 12:00 CET\n"
|
||||||
"PO-Revision-Date: 2012-07-26 12:00 CET\n"
|
"PO-Revision-Date: 2012-08-09 12:00 CET\n"
|
||||||
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
"Last-Translator: Helmut Merz <helmutm@cy55.de>\n"
|
||||||
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
"Language-Team: loops developers <helmutm@cy55.de>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -275,6 +275,12 @@ msgstr "Eine neues Projekt anlegen."
|
||||||
msgid "Create Work Item..."
|
msgid "Create Work Item..."
|
||||||
msgstr "Aktivität anlegen..."
|
msgstr "Aktivität anlegen..."
|
||||||
|
|
||||||
|
msgid "Create a work item for this object."
|
||||||
|
msgstr "Eine Aktivität zu diesem Objekt anlegen."
|
||||||
|
|
||||||
|
msgid "Add Work Item"
|
||||||
|
msgstr "Aktivität anlegen/bearbeiten"
|
||||||
|
|
||||||
msgid "Edit Video..."
|
msgid "Edit Video..."
|
||||||
msgstr "Video bearbeiten..."
|
msgstr "Video bearbeiten..."
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ from loops.browser.node import NodeView
|
||||||
from loops.common import adapted, baseObject
|
from loops.common import adapted, baseObject
|
||||||
from loops.concept import Concept
|
from loops.concept import Concept
|
||||||
from loops.organize.work.meeting import MeetingMinutes
|
from loops.organize.work.meeting import MeetingMinutes
|
||||||
|
from loops.organize.tracking.report import TrackDetails
|
||||||
from loops.setup import addAndConfigureObject
|
from loops.setup import addAndConfigureObject
|
||||||
from loops.util import _
|
from loops.util import _
|
||||||
from loops import util
|
from loops import util
|
||||||
|
@ -317,9 +318,21 @@ class CreateFollowUpEvent(CreateConcept, BaseFollowUpController):
|
||||||
result = super(CreateFollowUpEvent, self).update()
|
result = super(CreateFollowUpEvent, self).update()
|
||||||
form = self.request.form
|
form = self.request.form
|
||||||
toBeAssigned = form.get('cb_select_tasks') or []
|
toBeAssigned = form.get('cb_select_tasks') or []
|
||||||
for uid in toBeAssigned:
|
taskId = newTask = None
|
||||||
task = util.getObjectForUid(uid)
|
workItems = self.view.loopsRoot.getRecordManager()['work']
|
||||||
self.createFollowUpTask(adapted(task))
|
for id in sorted(toBeAssigned):
|
||||||
|
if not '.' in id:
|
||||||
|
taskId = id
|
||||||
|
task = util.getObjectForUid(id)
|
||||||
|
newTask = self.createFollowUpTask(adapted(task))
|
||||||
|
else:
|
||||||
|
tId, trackId = id.split('.')
|
||||||
|
if tId == taskId:
|
||||||
|
track = workItems.get(trackId)
|
||||||
|
if track is not None:
|
||||||
|
td = TrackDetails(self.view, track)
|
||||||
|
newTId = self.view.getUidForObject(newTask)
|
||||||
|
track.doAction('move', td.personId, task=newTId)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def createFollowUpTask(self, source):
|
def createFollowUpTask(self, source):
|
||||||
|
|
|
@ -86,19 +86,21 @@
|
||||||
style="border: 1px solid grey">Copy Agenda Items</th>
|
style="border: 1px solid grey">Copy Agenda Items</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td tal:condition="showCheckboxes" style="width: 2%"> </td>
|
||||||
<td style="width: 15%"> </td>
|
<td style="width: 15%"> </td>
|
||||||
<td style="width: 53%"> </td>
|
<td style="width: 53%"> </td>
|
||||||
<td style="width: 20%"> </td>
|
<td style="width: 20%"> </td>
|
||||||
<td style="width: 12%"> </td>
|
<td style="width: 12%"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tal:task repeat="row results">
|
<tal:tasks repeat="row results">
|
||||||
|
<tal:task define="taskUid row/context/uid">
|
||||||
<tr class="agenda-item-headline"
|
<tr class="agenda-item-headline"
|
||||||
style="background-color: #777777">
|
style="background-color: #777777">
|
||||||
<td tal:condition="showCheckboxes"
|
<td tal:condition="showCheckboxes"
|
||||||
style="border: 1px solid grey">
|
style="border: 1px solid grey" class="center">
|
||||||
<input type="checkbox" checked
|
<input type="checkbox" checked
|
||||||
tal:attributes="name string:$cb_name:list;
|
tal:attributes="name string:$cb_name:list;
|
||||||
value row/context/uid" /></td>
|
value taskUid" /></td>
|
||||||
<td colspan="4"
|
<td colspan="4"
|
||||||
style="border: 1px solid grey"
|
style="border: 1px solid grey"
|
||||||
tal:define="col report/fields/title"
|
tal:define="col report/fields/title"
|
||||||
|
@ -126,33 +128,41 @@
|
||||||
</tal:field>
|
</tal:field>
|
||||||
</tr>
|
</tr>
|
||||||
</tal:item>
|
</tal:item>
|
||||||
<tr style="background-color: #eeeeee">
|
<tal:workitems define="col report/fields/workItems;
|
||||||
<td style="border: 1px solid grey"
|
results python:col.getValue(row)"
|
||||||
tal:condition="showCheckboxes"></td>
|
condition="results/result">
|
||||||
<td colspan="2"
|
<tr style="background-color: #eeeeee">
|
||||||
style="border: 1px solid grey; width: 68%"
|
<td style="border: 1px solid grey"
|
||||||
i18n:translate="">header_workitems</td>
|
tal:condition="showCheckboxes"></td>
|
||||||
<td style="border: 1px solid grey; width: 20%"
|
<td colspan="2"
|
||||||
i18n:translate="">header_responsible</td>
|
style="border: 1px solid grey; width: 68%"
|
||||||
<td style="border: 1px solid grey; width: 12%; text-align: center"
|
i18n:translate="">header_workitems</td>
|
||||||
i18n:translate="">header_deadline</td>
|
<td style="border: 1px solid grey; width: 20%"
|
||||||
</tr>
|
i18n:translate="">header_responsible</td>
|
||||||
<tal:workitems define="col report/fields/workItems">
|
<td style="border: 1px solid grey; width: 12%" class="center"
|
||||||
<metal:column use-macro="python:
|
i18n:translate="">header_deadline</td>
|
||||||
reportView.getColumnRenderer(col)" />
|
</tr>
|
||||||
|
<metal:column use-macro="python:
|
||||||
|
reportView.getColumnRenderer(col)" />
|
||||||
</tal:workitems>
|
</tal:workitems>
|
||||||
</tal:task>
|
</tal:task>
|
||||||
|
</tal:tasks>
|
||||||
</metal:rows>
|
</metal:rows>
|
||||||
</table>
|
</table>
|
||||||
</metal:results>
|
</metal:results>
|
||||||
|
|
||||||
|
|
||||||
<metal:sub define-macro="subreport"
|
<metal:sub define-macro="subreport"
|
||||||
tal:define="results python:col.getValue(row);
|
tal:define="fields results/displayedColumns">
|
||||||
fields results/displayedColumns">
|
|
||||||
<tr class="listing" tal:repeat="row results">
|
<tr class="listing" tal:repeat="row results">
|
||||||
<td tal:condition="showCheckboxes"
|
<td tal:condition="showCheckboxes"
|
||||||
style="border: 1px solid grey" />
|
style="border: 1px solid grey" class="center">
|
||||||
|
<input type="checkbox"
|
||||||
|
tal:define="trackId row/context/name"
|
||||||
|
tal:attributes="name string:$cb_name:list;
|
||||||
|
value string:$taskUid.$trackId;
|
||||||
|
checked row/isActive" />
|
||||||
|
</td>
|
||||||
<td colspan="2"
|
<td colspan="2"
|
||||||
tal:define="col fields/title"
|
tal:define="col fields/title"
|
||||||
tal:attributes="class col/cssClass"
|
tal:attributes="class col/cssClass"
|
||||||
|
|
|
@ -282,7 +282,10 @@ class WorkReportInstance(ReportInstance):
|
||||||
|
|
||||||
class MeetingMinutesWorkRow(WorkRow):
|
class MeetingMinutesWorkRow(WorkRow):
|
||||||
|
|
||||||
pass
|
@Lazy
|
||||||
|
def isActive(self):
|
||||||
|
return self.context.state not in (
|
||||||
|
'finished', 'closed', 'cancelled')
|
||||||
|
|
||||||
|
|
||||||
class MeetingMinutesWork(WorkReportInstance, SubReport):
|
class MeetingMinutesWork(WorkReportInstance, SubReport):
|
||||||
|
|
Loading…
Add table
Reference in a new issue