<tal:define define="dummy view/update"/>
<html metal:use-macro="view/@@standard_macros/page" i18n:domain="schooltool">
<head>
  <title metal:fill-slot="title"
         tal:content="view/index_title">Contents</title>
</head>
<body>

<h1 metal:fill-slot="content-header"
    i18n:translate="">
  Courses for
  <tal:block i18n:name="schoolyear"><a tal:attributes="href view/school_year/@@absolute_url"
                                       tal:content="view/school_year/title">School Year</a></tal:block>
</h1>

<metal:block metal:fill-slot="body"
             tal:define="batch view/batch;
                         canModify view/canModify">

  <p tal:condition="not:batch" i18n:translate="">There are none.</p>
  <tal:if tal:condition="batch">
    <tal:block replace="structure view/batch/render" />
    <div metal:use-macro="view/@@view_macros/batch-search"/>
    <div class="count" i18n:translate="">
      Showing
      <span i18n:name="count" tal:content="batch/length"/>
      of
      <span i18n:name="total" tal:content="batch/full_size"/>
      items
    </div>
    <form method="post"
          tal:condition="canModify"
          tal:attributes="action string:${context/@@absolute_url}/delete.html">
      <div tal:repeat="course batch" class="course">
        <input type="checkbox" tal:attributes="name string:delete.${course/zope:name}" />
        <a tal:content="course/title"
           tal:attributes="href course/@@absolute_url">Some Object</a>
      </div>
      <div class="controls">
        <input type="submit" class="button-cancel" value="Delete"
               i18n:attributes="value delete-button;" />
      </div>
    </form>
    <ul tal:condition="not:canModify" class="container-content">
      <li tal:repeat="course batch" class="course">
        <a tal:content="course/title"
           tal:attributes="href course/@@absolute_url">Some Object</a>
        <ul tal:condition="course/sections|nothing" class="section-list">
          <tal:for repeat="section course/sections/sortby:__name__">
          <li tal:condition="section/can_access:label">
            <a tal:condition="section/can_access:label"
               tal:content="section/label"
               tal:attributes="href section/@@absolute_url"
               >Some Object</a>
            <span class="hint">
              (<span tal:replace="section/size"/>
              <span i18n:translate="">Students</span>)
            </span>
          </li>
          </tal:for>
        </ul>
      </li>
    </ul>
  </tal:if>

</metal:block>
</body>
</html>
