display dossiers handled by a commission
This commit is contained in:
parent
fdc2232a88
commit
52f4ba9b66
|
@ -101,6 +101,17 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div tal:define="current_dossiers context/current_dossiers" tal:condition="current_dossiers">
|
||||
<h2>Dossiers traités par la commission</h2>
|
||||
<table id="related-elements">
|
||||
<tr tal:repeat="item current_dossiers">
|
||||
<td class="docref"><a tal:attributes="href item/getURL" tal:content="python: item.getObject().reftitle"></a></td>
|
||||
<td class="doctitle"><span tal:replace="item/Title"></span></td>
|
||||
<td class="docdate"><span tal:condition="python: hasattr(item.getObject(), 'date_str')" tal:replace="python: item.getObject().date_str"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div tal:replace="structure provider:plone.belowcontentbody" />
|
||||
|
||||
</tal:main-macro>
|
||||
|
|
|
@ -69,3 +69,9 @@ class View(BrowserView):
|
|||
return portal_catalog(portal_type='tabellio.agenda.comevent',
|
||||
id=meeting_ids,
|
||||
sort_on='start', sort_order='descending')[:10]
|
||||
|
||||
def current_dossiers(self):
|
||||
catalog = getToolByName(self.context, 'portal_catalog')
|
||||
brains = catalog(commissionsDoc=self.id)
|
||||
brains.sort(lambda x,y: -cmp(x.dateDoc, y.dateDoc))
|
||||
return brains
|
||||
|
|
Reference in New Issue