<tal:defs define="dummy view/update" />
<html metal:use-macro="view/@@standard_macros/page" i18n:domain="schooltool">
<head>
  <title metal:fill-slot="title"
         tal:content="view/index_title">Contents</title>
</head>
<body>

<h1 metal:fill-slot="content-header"
    tal:content="view/index_title">Contents</h1>

<metal:block metal:fill-slot="body"
             tal:define="objects context/values;
                         canModify view/canModify">

  <p tal:condition="not:objects" i18n:translate="">There are none.</p>
  <tal:block tal:condition="objects"
             tal:define="default context/default">
    <form tal:condition="canModify"
          method="post"
          tal:attributes="action string:${context/@@absolute_url}/delete.html">
      <div tal:repeat="obj objects/sortby:title">
        <input type="checkbox"
               tal:attributes="name string:delete.${obj/zope:name};
                               disabled obj/schooltool:has_dependents" />
        <a tal:content="obj/title"
           tal:attributes="href obj/@@absolute_url">Some Object</a>
      </div>
      <div class="controls">
        <input type="submit" class="button-cancel" value="Delete"
               i18n:attributes="value delete-button;" />
      </div>
    </form>
    <ul tal:condition="not:canModify">
      <li tal:repeat="obj objects/sortby:title">
        <a tal:content="obj/title"
           tal:attributes="href obj/@@absolute_url">Some Object</a>
      </li>
    </ul>
    <div class="row">
      <label i18n:translate="" for="ttschema">Default Timetable Schema:</label>
      <tal:block tal:condition="not:canModify">
        <span tal:condition="default">
        <a tal:content="default/title"
           tal:attributes="href default/@@absolute_url">(Default Schema)</a>
        </span>
        <span tal:condition="not:default" i18n:translate="">Not Selected</span>
      </tal:block>
      <form tal:condition="canModify"
            method="post"
            action=".">
        <select name="ttschema" size="1"
                id="ttschema">
          <option value="" i18n:translate="">Not Selected</option>
          <tal:block condition="not:default">
            <option tal:repeat="obj objects/sortby:title"
                    tal:content="obj/title"
                    tal:attributes="value python: obj.__name__">(Schema title)</option>
          </tal:block>
          <tal:block condition="default">
            <option tal:repeat="obj objects/sortby:title"
                    tal:content="obj/title"
                    tal:attributes="selected python:obj.__name__ == default.__name__;
                                    value python: obj.__name__">(Schema title)</option>
          </tal:block>

        </select>
        <input type="submit" class="button-ok" name="UPDATE_SUBMIT" value="Change"
               title="Shortcut: Alt-A" accesskey="A"
               i18n:attributes="value; accesskey" />
      </form>
    </div>
  </tal:block>

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