<div i18n:domain="schooltool" tal:define="demographics view/demographics">
  <form method="post" tal:attributes="action request/getURL"
        tal:condition="demographics">
    <input type="hidden" name="form-submitted" value="yes" />
    <table>
      <thead>
        <tr>
          <th i18n:translate="">Order</th>
          <th i18n:translate="">Title</th>
          <th i18n:translate="">ID</th>
          <th i18n:translate="">Delete</th>
        </tr>
      </thead>
      <tr tal:repeat="demo demographics">
        <td>
          <select name=""
                  onchange="this.form.submit()"
                  tal:attributes="name string:pos.${demo/name}">
            <tal:block repeat="num view/positions">
              <option value="1"
                      tal:condition="python:num != demo['pos']"
                      tal:attributes="value num"
                      tal:content="num" />
              <option value="1" selected="selected"
                      tal:condition="python:num == demo['pos']"
                      tal:attributes="value num"
                      tal:content="num" />
            </tal:block>
          </select>
        </td>
        <td tal:content="demo/title" />
        <td tal:content="demo/name" />
        <td>
          <button class="image" type="submit" title="Delete" value="1"
                  tal:attributes="name string:delete.${demo/name};"
                  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:demographics">There are none.</h3>
  <h3>
    <a tal:attributes="href context/@@absolute_url"
       i18n:translate="">Done</a>
  </h3>
</div>

