Mercurial > hg > MPIWGWeb
diff zpt/staff/member_index_html.zpt @ 238:5f5d7f07c1bd
added "show only upcoming" option for talks from calendar.
author | casties |
---|---|
date | Fri, 24 Jan 2014 16:19:35 +0100 |
parents | 5d17c46ebffa |
children | e8f5f5033641 |
line wrap: on
line diff
--- a/zpt/staff/member_index_html.zpt Wed Jan 08 14:24:36 2014 +0100 +++ b/zpt/staff/member_index_html.zpt Fri Jan 24 16:19:35 2014 +0100 @@ -75,21 +75,23 @@ <!-- Talks --> <tal:block tal:define="calendar member/getTalksCal"> <tal:block tal:condition="calendar"> - <tal:block tal:define="talks python:calendar.getNext(6)" tal:condition="talks"> + <tal:block tal:define="upcoming python:calendar.getFlag('only_upcoming'); + talks python:test(upcoming, calendar.getAllItemsFromTodayOn(newestFirst=True)[:5], calendar.getNext(5))" tal:condition="talks"> - <h2 class="line">Talks and presentations</h2> + <h2 class="line" tal:condition="upcoming">Upcoming talks and presentations</h2> + <h2 class="line" tal:condition="not:upcoming">Talks and presentations</h2> <table class="items shorter"> <tr tal:repeat="talk talks"> <tal:block tal:define="url python:talk.getValue('url')"> <td width="25%" tal:content="python:talk.getDate()" /> - <td><a tal:omit-tag="not:url" tal:attributes="href url"> <span tal:replace="python:talk.getValue('location')" /> + <td><a class="external" target="_blank" tal:omit-tag="not:url" tal:attributes="href url"><span tal:replace="python:talk.getValue('location')" /> – <i><span tal:replace="python:talk.getValue('title')" /></i> </a></td> </tal:block> </tr> </table> - <p tal:condition="python:len(talks)>5"> + <p tal:condition="python:len(calendar.getItems())>5"> <a class="internal" tal:attributes="href string:$baseUrl/talks_full_html">More</a> </p> </tal:block>