<div class="top_nav">
  <div class="container-fluid">
    <div class="row">
      {% if of_n_entries == 0 -%}
        <div class="col-md-12">
          <span class="label label-default">Result loaded
            <abbr class="livestamp" title="{{time}}">{{time}}</abbr>
          </span>
          <span class="text-info">No match</span>
        </div>
      {% elif per_page == 0 or per_page >= of_n_entries -%}
        <div class="col-md-12">
        <span class="label label-default">Result loaded
        <abbr class="livestamp" title="{{time}}">{{time}}</abbr></span>
        <span class="text-info">Page 1 of 1 Entries 1-{{of_n_entries}}</span>
        </div>
      {% else -%}
        <div class="col-md-12">
          <form action="{{script}}/{{method}}" class="form-inline">
            <input type="hidden" name="per_page" value="{{per_page}}" />
            <input type="hidden" name="user" value="{{user}}" />
            {% if names -%}
              <input type="hidden" name="names" value="{{names}}" />
            {% endif -%}
            {% if no_fuzzy_time -%}
              <input type="hidden" name="no_fuzzy_time" value="{{no_fuzzy_time}}" />
            {% endif -%}
            {% if suite -%}
              <input type="hidden" name="suite" value="{{suite|replace("/", "%2F")}}" />
            {% endif -%}
            {% if cycles -%}
              <input type="hidden" name="cycles" value="{{cycles}}" />
            {% endif -%}
            {% if tasks -%}
              <input type="hidden" name="tasks" value="{{tasks}}" />
            {% endif -%}
            {% if order -%}
              <input type="hidden" name="order" value="{{order}}" />
            {% endif -%}
            {% for key, value in task_statuses -%}
              {% if value == "1" -%}
              <input type="hidden" name="task_status" value="{{key}}" />
              {% endif -%}
            {% endfor -%}
            {% if all_task_statuses -%}
              <input type="hidden" name="task_status" value="" />
            {% endif -%}
            {% if job_status -%}
              <input type="hidden" name="job_status" value="{{job_status}}" />
            {% endif -%}
            <ul class="list-inline">
              <li class="previous">
                <button id="page-prev" title="previous"
                {% if page == 1 -%}
                class="btn btn-default btn-link disabled"
                disabled="disabled"
                {% else %}
                class="btn btn-default btn-link"
                {% endif %}
                >&laquo;</button>
              </li>
              <li class="page_entries">
                <select id="page" name="page" class="form-control">
                  {% for i_page in range(n_pages) -%}
                    <option
                    {% if i_page + 1 == page -%}
                    selected="selected"
                    {% endif -%}
                    value="{{i_page + 1}}">Page {{i_page + 1}} of {{n_pages}}
                    ~
                    {% if (i_page + 1) * per_page < of_n_entries -%}
                    Entries {{i_page * per_page + 1}}-{{(i_page + 1) * per_page}}
                    {% else -%}
                    Entries {{i_page * per_page + 1}}-{{of_n_entries}}
                    {% endif -%}
                    of {{of_n_entries}}
                    </option>
                  {% endfor -%}
                </select>
              </li>
              <li class="next">
                <button id="page-next" title="next"
                {% if page == n_pages -%}
                class="btn btn-default btn-link disabled"
                disabled="disabled"
                {% else -%}
                class="btn btn-default btn-link"
                {% endif -%}
                >&raquo;</button>
              </li>
              <li>
                <span class="label label-default">
                  Result loaded
                  <abbr class="livestamp" title="{{time}}">{{time}}</abbr>
                </span>
              </li>
            </ul>
          </form>
        </div>
      {% endif -%}
    </div>
  </div>
</div>
