<!DOCTYPE html>
<html>
  <!--
    data-i18n=All criterions (AND)
    data-i18n=At least one (OR)
    data-i18n=Contains
    data-i18n=Equal to
    data-i18n=Greater than
    data-i18n=Less than
    data-i18n=Less than or Equal to
    data-i18n=Greater than or Equal to
    data-i18n=Searchable Text
    data-i18n=Search Expression
  -->
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>ERP5 Sort Editor</title>
    <link rel="http://www.renderjs.org/rel/interface" href="interface_sub_editor_panel.html">

    <!-- renderjs -->
    <script src="rsvp.js"></script>
    <script src="renderjs.js"></script>
    <script src="handlebars.js"></script>
    <script src="jiodev.js" type="text/javascript"></script>

    <!-- custom script -->
    <script src="gadget_erp5_search_editor.js"></script>

    <script id="filter-item-template" type="text/x-handlebars-template">
      <button class="ui-icon ui-icon-minus"></button>
      <div class="filter_item" >
        <select class="column">
          {{#each option}}
            <option {{#if selected}}selected="selected"{{/if}} data-i18n="{{text}}" value="{{value}}">{{text}}</option>
          {{/each}}
        </select>
        <select>
          {{#each operator_option}}
            <option {{#if selected}}selected="selected"{{/if}} data-i18n="{{text}}" value="{{value}}">{{text}}</option>
          {{/each}}
        </select>
        {{#if domain_option}}
        <select required>
          {{#each domain_option}}
            <option {{#if selected}}selected="selected"{{/if}} data-i18n="{{text}}" {{#if value}}value="{{value}}"{{/if}}>{{text}}</option>
          {{/each}}
        </select>
        {{else}}
        <input type="{{input_type}}" value="{{input_value}}" required></input>
        {{/if}}
      </div>
    </script>

    <script id="filter-template" type="text/x-handlebars-template">
      <div>
        <div data-role="header" class="ui-header">
          <div class="ui-btn-right">
            <div class="ui-controlgroup-controls">
              <button data-i18n="submit" type="submit" class="ui-btn-icon-left ui-icon-check">Submit</button>
            </div>
          </div>

          <h1 data-i18n="Filter Editor">Filter Editor</h1>
          <div class="ui-btn-left">
            <div class="ui-controlgroup-controls">
              <button data-i18n="Close" class="close ui-btn-icon-left ui-icon-times">Close</button>
            </div>
          </div>
        </div>


        <section>
          <fieldset>
            <select name="heard_about">
              <option data-i18n="All criterions (AND)" value="AND">All criterions (AND)</option>
              <option data-i18n="At least one (OR)" value="OR">At least one (OR)</option>
            </select>
          </fieldset>

          <div class="filter_item_container">
          </div>
          <button class="plus ui-icon-plus ui-btn-icon-left">Add Criteria</button>
          <button type="button" class="trash ui-icon-trash-o ui-btn-icon-left">Reset</button>

          <div class="domain_item_container">
          </div>
        </section>
      </div>
    </script>

  </head>
  <body>
    <form>
      <div class="container"></div>
    </form>
  </body>
</html>