diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index c902330..2a03d4a 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index 76f2957..cae5306 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: $Id$\n" "POT-Creation-Date: 2007-05-22 12:00 CET\n" -"PO-Revision-Date: 2012-06-10 12:00 CET\n" +"PO-Revision-Date: 2012-07-17 12:00 CET\n" "Last-Translator: Helmut Merz \n" "Language-Team: loops developers \n" "MIME-Version: 1.0\n" @@ -296,6 +296,9 @@ msgstr "Besprechungsprotokoll für dieses Objekt anzeigen." msgid "Download Meeting Minutes" msgstr "Besprechungsprotokoll generieren" +msgid "Participants" +msgstr "Teilnehmer" + msgid "Task/Action" msgstr "Aufgabe" diff --git a/organize/browser/event.py b/organize/browser/event.py index 560abad..d42abfb 100644 --- a/organize/browser/event.py +++ b/organize/browser/event.py @@ -316,7 +316,6 @@ class CreateFollowUpEvent(CreateConcept, BaseFollowUpController): result = super(CreateFollowUpEvent, self).update() form = self.request.form toBeAssigned = form.get('cb_select_tasks') or [] - print '***', toBeAssigned for uid in toBeAssigned: task = util.getObjectForUid(uid) self.createFollowUpTask(adapted(task)) diff --git a/organize/configure.zcml b/organize/configure.zcml index e760a03..3f03420 100644 --- a/organize/configure.zcml +++ b/organize/configure.zcml @@ -39,6 +39,26 @@ set_schema="loops.organize.interfaces.ITask" /> + + + + + + + + + + + + diff --git a/organize/interfaces.py b/organize/interfaces.py index c60fdc8..20413a8 100644 --- a/organize/interfaces.py +++ b/organize/interfaces.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2011 Helmut Merz helmutm@cy55.de +# Copyright (c) 2012 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,8 +18,6 @@ """ Interfaces for organizational stuff like persons and addresses. - -$Id$ """ from zope.interface import Interface, Attribute @@ -156,13 +154,29 @@ class IMemberRegistrationManager(Interface): current password. """ -# task +# task management, meeting minutes: task, event, agenda item class ITask(IConceptSchema, ITask, ILoopsAdapter): pass +class IEvent(ITask): + + participants = schema.Text( + title=_(u'Participants'), + description=_(u'The names of the persons taking part in the event.'), + default=u'', + missing_value=u'', + required=False) + + + +class IAgendaItem(ILoopsAdapter): + + pass + + # 'hasrole' predicate class IHasRole(IRelationAdapter): diff --git a/organize/task.py b/organize/task.py index b069497..cdbd172 100644 --- a/organize/task.py +++ b/organize/task.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Helmut Merz helmutm@cy55.de +# Copyright (c) 2012 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,23 +17,22 @@ # """ -Adapters for IConcept providing interfaces from the cybertools.organize package. - -$Id$ +Adapters for IConcept providing interfaces from the +cybertools.organize package. """ from time import mktime from zope.component import adapts from zope.interface import implements -from loops.organize.interfaces import ITask +from loops.organize.interfaces import ITask, IEvent, IAgendaItem from loops.interfaces import IConcept from loops.interfaces import IIndexAttributes from loops.common import AdapterBase from loops.type import TypeInterfaceSourceList -TypeInterfaceSourceList.typeInterfaces += (ITask,) +TypeInterfaceSourceList.typeInterfaces += (ITask, IEvent, IAgendaItem) class Task(AdapterBase): @@ -42,10 +41,29 @@ class Task(AdapterBase): implements(ITask) - _adapterAttributes = ('context', '__parent__',) + _adapterAttributes = AdapterBase._adapterAttributes _contextAttributes = list(ITask) +class Event(Task): + """ A scheduled event or appointment. + """ + + implements(IEvent) + + _contextAttributes = list(IEvent) + + +class AgendaItem(AdapterBase): + """ Some topic (a sort of task) that is discussed during an event. + """ + + implements(IAgendaItem) + + _adapterAttributes = AdapterBase._adapterAttributes + _contextAttributes = list(IAgendaItem) + + class IndexAttributes(object): implements(IIndexAttributes) diff --git a/organize/tests.py b/organize/tests.py index 7222b18..21f4a65 100755 --- a/organize/tests.py +++ b/organize/tests.py @@ -24,8 +24,9 @@ from cybertools.util.jeep import Jeep from loops.common import adapted from loops.concept import Concept from loops.organize.interfaces import IPerson, IHasRole +from loops.organize.interfaces import IEvent, IAgendaItem from loops.organize.party import Person, HasRole -from loops.organize.task import Task +from loops.organize.task import Task, Event, AgendaItem from loops.setup import addAndConfigureObject from loops.tests.auth import login @@ -37,6 +38,8 @@ def setupUtilitiesAndAdapters(loopsRoot): component.provideUtility(principalAnnotations, IPrincipalAnnotationUtility) component.provideAdapter(Person, provides=IPerson) component.provideAdapter(Task) + component.provideAdapter(Event, provides=IEvent) + component.provideAdapter(AgendaItem, provides=IAgendaItem) component.provideAdapter(FoundPrincipalFactory) component.provideAdapter(HasRole, provides=IHasRole) return Jeep(( diff --git a/organize/work/README.txt b/organize/work/README.txt index 1e3f88f..1cce6d4 100644 --- a/organize/work/README.txt +++ b/organize/work/README.txt @@ -242,14 +242,19 @@ and recording information about the tasks. Let's start with creating an a event and assigning it a task. - >>> from loops.organize.interfaces import ITask + >>> from loops.organize.interfaces import IEvent, IAgendaItem >>> tEvent = addAndConfigureObject(concepts, Concept, 'event', - ... title=u'Event', conceptType=concepts.getTypeConcept(), - ... typeInterface=ITask) + ... title=u'Event', conceptType=concepts.getTypeConcept(), + ... typeInterface=IEvent) + >>> tAgendaItem = addAndConfigureObject(concepts, Concept, 'agendaitem', + ... title=u'AgendaItem', conceptType=concepts.getTypeConcept(), + ... typeInterface=IEvent) >>> ev01 = addAndConfigureObject(concepts, Concept, 'ev01', - ... title=u'loops Meeting', conceptType=tEvent) - >>> ev01.assignChild(task01) + ... title=u'loops Meeting', conceptType=tEvent) + >>> aitem01 = addAndConfigureObject(concepts, Concept, 'aitem01', + ... title=u'Documentation of Features', conceptType=tAgendaItem) + >>> ev01.assignChild(aitem01) Now we create the meeting minutes report. We assign the event type as a child in order to provide the information for which types of objects the @@ -259,9 +264,9 @@ report is available. >>> component.provideAdapter(MeetingMinutes, provides=IReportInstance, ... name='meeting_minutes') - >>> meetingMinutes = addAndConfigureObject(concepts, Concept, 'meeting_minutes', - ... title=u'Meeting Minutes', conceptType=tReport, - ... reportType='meeting_minutes') + >>> meetingMinutes = addAndConfigureObject(concepts, Concept, + ... 'meeting_minutes', title=u'Meeting Minutes', conceptType=tReport, + ... reportType='meeting_minutes') >>> meetingMinutes.assignChild(tEvent, hasReport) We can now access the report using a corresponding report-based view. @@ -277,7 +282,8 @@ We can now access the report using a corresponding report-based view. ... for col in reportView.displayedColumns: ... print col.getDisplayValue(row), ... print - {'url': 'http://127.0.0.1/loops/views/home/.36', 'title': u'loops Development'} + {'url': 'http://127.0.0.1/loops/views/home/.58', + 'title': u'Documentation of Features'} diff --git a/organize/work/report.py b/organize/work/report.py index 86dc356..2cd9628 100644 --- a/organize/work/report.py +++ b/organize/work/report.py @@ -371,6 +371,7 @@ class MeetingMinutes(WorkReportInstance): tasks, taskTitle, taskDescription, workItems)) defaultOutputFields = fields states = ('planned', 'accepted', 'done', 'done_x', 'finished') + taskTypeNames = ('agendaitem',) def selectObjects(self, parts): return [adapted(t) for t in self.getTasks(parts)[1:]]