<tal:define define="dummy view/update"/>
<html metal:use-macro="view/@@standard_macros/page" i18n:domain="schooltool">
<head>
  <title metal:fill-slot="title"
         i18n:translate="">
    Section list for
    <tal:block i18n:name="term"
               tal:content="view/term/title" /> of
    <tal:block i18n:name="schoolyear"
               tal:content="view/school_year/title" />
  </title>
</head>
<body>

<h1 metal:fill-slot="content-header"
    i18n:translate="">
  Section list for
  <tal:block i18n:name="term"><a tal:attributes="href view/term/@@absolute_url"
                                 tal:content="view/term/title">Term</a></tal:block> of
  <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">

  <tal:block replace="structure batch/render" />
  <div metal:use-macro="view/@@view_macros/batch-search"/>
  <p tal:condition="not:batch" i18n:translate="">There are none.</p>
  <form method="post" tal:condition="batch"
        tal:attributes="action string:${context/@@absolute_url}/delete.html">
    <table class="container">
      <tr class="header">
        <th i18n:translate="">
        </th>
        <th i18n:translate="">
          Courses
        </th>
        <th i18n:translate="">
          Section
        </th>
        <th i18n:translate="">
          Instructors
        </th>
        <th i18n:translate="">
          Current Size
        </th>
      </tr>
      <tr tal:repeat="obj batch">
        <td>
          <input type="checkbox"
                 tal:attributes="name string:delete.${obj/zope:name}" />
        </td>
        <td>
          <a tal:repeat="course obj/courses"
             tal:attributes="href course/@@absolute_url"
             tal:content="course/title">
              Some Object
          </a>
        </td>
        <td>
          <a tal:attributes="href obj/@@absolute_url"
             tal:content="obj/title">
              Some Object
          </a>
        </td>
        <td>
          <tal:loop repeat="instructor obj/instructors">
            <span tal:condition="not:repeat/instructor/start">, </span>
            <a href="" tal:attributes="href instructor/@@absolute_url"
               tal:content="instructor/title" />
          </tal:loop>
        </td>
        <td>
          <span class="hint">
            (<span tal:replace="obj/size"/>
            <span i18n:translate="">Students</span>)
          </span>
        </td>
      </tr>
    </table>
    <div class="controls">
      <input type="submit" class="button-cancel" value="Delete"
             i18n:attributes="value delete-button;" />
    </div>
  </form>

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