summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-11-30 18:17:58 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-11-30 18:17:58 (GMT)
commitdf5faadca0fbc9ac651cf97c6e298d910dfdd769 (patch)
tree36387393945e7b1a264a72c94c7f9ec5dac0cf96
parent8c0f14925f1bf8f09452768abb20b34933d9a458 (diff)
downloadtabellio.mixedcommittee-master.zip
tabellio.mixedcommittee-master.tar.gz
tabellio.mixedcommittee-master.tar.bz2
display events in committee tab (#1051)HEADmaster
-rw-r--r--tabellio/mixedcommittee/committee.py5
-rw-r--r--tabellio/mixedcommittee/folder.pt7
2 files changed, 11 insertions, 1 deletions
diff --git a/tabellio/mixedcommittee/committee.py b/tabellio/mixedcommittee/committee.py
index a142b62..276a63f 100644
--- a/tabellio/mixedcommittee/committee.py
+++ b/tabellio/mixedcommittee/committee.py
@@ -19,3 +19,8 @@ class ICommittee(form.Schema):
class Committee(Container):
implements(ICommittee)
+
+ def events(self):
+ events = [x for x in self.objectValues() if x.portal_type == 'tabellio.agenda.event']
+ events.sort(lambda x,y: cmp(x.start, y.start))
+ return events
diff --git a/tabellio/mixedcommittee/folder.pt b/tabellio/mixedcommittee/folder.pt
index 355b79f..251100c 100644
--- a/tabellio/mixedcommittee/folder.pt
+++ b/tabellio/mixedcommittee/folder.pt
@@ -38,7 +38,12 @@
</dd>
<dt>Agenda</dt>
<dd>
- <div/>
+ <div>
+ <ul>
+ <li tal:repeat="event item/events"><span
+ tal:content="event/longdatetime">date</span> : <a tal:attributes="href
+ event/absolute_url" tal:content="event/Title">title</a></li>
+ </ul>
</dd>
</dl>