<div class="timetable-table"
    xmlns:tal="http://xml.zope.org/namespaces/tal"
    xmlns:metal="http://xml.zope.org/namespaces/metal"
    tal:define="table view/makeTable">
<table class="timetable">

  <tal:block replace="resource_library:schooltool.timetable" />

  <thead>
    <tr>
      <th tal:repeat="title table/header" tal:content="title"
          colspan="1" class="day">Day N</th>
    </tr>
  </thead>

  <tbody>
    <tr tal:repeat="row table/rows">
      <tal:block repeat="col row">
        <tal:block condition="col">
          <td tal:attributes="width table/col_width">
            <span tal:content="structure col/title"
                  tal:condition="col/value"
                  class="period">[period]</span>
            <span tal:content="structure col/title"
                  tal:condition="not:col/value"
                  class="period inactive">[period]</span>
            <span tal:content='structure col/value'
                  class="activity">[activity]</span>
          </td>
        </tal:block>
        <tal:block tal:condition="not: col">
          <td tal:attributes="width table/col_width"></td>
        </tal:block>
      </tal:block>
    </tr>
  </tbody>

</table>

</div>
