view zpt/staff/talks_full_html.zpt @ 218:0babf6e0a454

omit talks section if calendar is empty.
author casties
date Wed, 16 Oct 2013 15:44:16 +0200
parents 2598210ada7a
children 99432bde94ed
line wrap: on
line source

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/page">
<head>
<tal:block metal:fill-slot="head">
  <tal:x define="global member here/getContent" />
</tal:block>
</head>
<body>
  <div class="center" metal:fill-slot="center">
    <h1>
      <span tal:replace="member/title" /> <span tal:replace="python:here.decode(member.first_name)" /> <span
        tal:replace="python:here.decode(member.last_name)" />
    </h1>

    <p>
      <a tal:attributes="href python:here.getUrl(baseUrl=root+'/'+secmap['staff']+'/members')">main entry</a>
    </p>

    <h2>Talks and presentations</h2>

    <tal:block tal:define="calendar here/getTalksCal">
      <tal:block tal:condition="calendar">
        <tal:block tal:define="talks python:calendar.getSortedItems()">
          <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')" /> &#150; <i><span
                      tal:replace="python:talk.getValue('title')" /></i>
                </a></td>
              </tal:block>
            </tr>
          </table>
        </tal:block>
      </tal:block>
      
      <tal:block tal:condition="not:calendar">
        <tal:block tal:define="talks here/getTalks" tal:condition="talks">
          <table class="items shorter">
            <tr tal:repeat="talk talks">
              <td><span tal:content="talk/date" /></td>
              <td><a tal:attributes="href talk/link" tal:omit-tag="not:talk/link"> <span tal:content="talk/place" />
                  &#150; <i tal:content="talk/title" />
              </a></td>
            </tr>
          </table>
        </tal:block>
      </tal:block>
    </tal:block>
  </div>
</body>
</html>