<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="">Worksheets</title>
</head>
<body>

<h1 metal:fill-slot="content-header"
    i18n:translate="">Worksheets</h1>

<metal:block metal:fill-slot="body"
             tal:define="worksheets view/worksheets">
  <form method="post"
        tal:attributes="action string:${context/@@absolute_url}">
    <input type="hidden" name="form-submitted" value="" />
    <div tal:repeat="worksheet worksheets">
      <select name=""
              onchange="this.form.submit()"
              tal:attributes="name string:pos.${worksheet/name}">
        <tal:block repeat="num view/positions">
          <option value="1"
              tal:condition="python:num != worksheet['pos']"
              tal:attributes="value num"
              tal:content="num" />
          <option value="1" selected="selected"
              tal:condition="python:num == worksheet['pos']"
              tal:attributes="value num"
              tal:content="num" />
        </tal:block>
      </select>
      <input type="checkbox" name="delete:list"
             tal:attributes="value worksheet/name" />

      <a tal:content="worksheet/title"
         tal:attributes="href worksheet/url">Worksheet</a>

    </div>
    <div class="controls">
      <tal:block tal:condition="view/canModify"
                 metal:use-macro="view/@@standard_macros/delete-button" />
    </div>
  </form>

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