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

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

<metal:block metal:fill-slot="body"
             tal:define="activities view/activities">

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

      <a tal:content="activity/title"
         tal:attributes="href activity/url">Activity</a>

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