<tal:tag condition="view/update" />
<html metal:use-macro="context/@@standard_macros/page"
      i18n:domain="schooltool.intervention">
<head>
  <title metal:fill-slot="title" i18n:translate="">
    Intervention
  </title>
</head>
<body>
<div metal:fill-slot="body">
  <form method="post" class="batch-search">
    <input id="batch-search-box" type="text" name="SEARCH"
      tal:attributes="value request/SEARCH|nothing"/>

    <select name="ADDITIONAL_FILTER">
      <tal:block repeat="option view/additional_options">
        <option tal:attributes="selected option/selected|Nothing;
                                value option/value"
                tal:content="option/text" />
      </tal:block>
    </select>

    <label for="schoolyear"><b i18n:translate="">School Year</b></label>
    <select name="schoolyear">
      <tal:block repeat="schoolyear view/schoolyears">
        <option value="1"
            tal:condition="python:schoolyear['title'] != view.currentSchoolYear"
            tal:attributes="value schoolyear/title"
            tal:content="schoolyear/title" />
        <option value="1" selected="selected"
            tal:condition="python:schoolyear['title'] == view.currentSchoolYear"
            tal:attributes="value schoolyear/title"
            tal:content="schoolyear/title" />
      </tal:block>
    </select>

    <input type="submit" name="SEARCH_BUTTON" value="Find Now"
      i18n:attributes="value"/>
    <input type="submit" name="CLEAR_SEARCH" value="Clear"
      i18n:attributes="value"/>

    <div tal:condition="not: view/perform_search" style="margin-top: 2ex;">
      <h1 i18n:translate="">Enter any part of a student's name or select a filter
          from the drop-down to find an intervention.</h1>
      <p i18n:translate="">Listing all students currently disabled.</p>
    </div>
    <div tal:condition="view/perform_search" style="margin-top: 2ex;">
      <div tal:condition="not: view/interventions">
        <h1 i18n:translate="">There are no students that match the search criteria.</h1>
      </div>
      <div tal:condition="view/interventions">
        <ul>
          <li tal:repeat="intervention view/interventions">
            <a href="" tal:content="intervention/text"
               tal:attributes="href intervention/url">
               Intervention
            </a>
          </li>
        </ul>
      </div>
    </div>
  </form>
</div>
</body>
</html>
