<div i18n:domain="schooltool" tal:define="levels view/levels">
  <form method="post" tal:attributes="action request/getURL"
        tal:condition="levels">
    <input type="hidden" name="form-submitted" value="yes" />
    <table>
      <thead>
        <tr>
          <th i18n:translate="">Grade Year</th>
          <th i18n:translate="">Title</th>
          <th i18n:translate="">Delete</th>
        </tr>
      </thead>
      <tr tal:repeat="level levels">
        <td>
        <select onchange="this.form.submit()"
                tal:attributes="name string:pos.${level/form_key}">
          <tal:block repeat="number level/positions">
            <option tal:attributes="value number/value;
                                    selected number/selected"
                    tal:content="number/value" />
          </tal:block>
        </select>
        </td>
        <td tal:content="level/level/title" />
        <td>
          <button class="image" type="submit" title="Delete" value="1"
                  tal:attributes="name string:delete.${level/form_key};"
                  i18n:attributes="title">
            <img alt="Delete" i18n:attributes="alt"
                 tal:attributes="src context/++resource++schooltool.skin.flourish/remove-icon.png" />
          </button>
        </td>
      </tr>
    </table>
  </form>
  <h3 i18n:translate="" tal:condition="not:levels">There are none.</h3>
  <h3>
    <a tal:attributes="href context/@@absolute_url"
       i18n:translate="">Done</a>
  </h3>
</div>

