display events in committee tab (#1051)

This commit is contained in:
Frédéric Péters 2011-11-30 19:17:58 +01:00
parent 8c0f14925f
commit df5faadca0
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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>