<!--
  This file is part of IVRE.
  Copyright 2011 - 2015 Pierre LALET <pierre.lalet@cea.fr>

  IVRE is free software: you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  IVRE is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
  License for more details.

  You should have received a copy of the GNU General Public License
  along with IVRE. If not, see <http://www.gnu.org/licenses/>.
-->

<li class="sidebox-header" ng-switch="shared.filter.count">
  <i class="glyphicon glyphicon-list black"></i>
  <span ng-switch-when="0">No result!</span>
  <span ng-switch-when="undefined">[Counting...]
    <br/>
    <small class="text-muted">showing {{firstdisplayed}} to {{lastdisplayed}}</small>
  </span>
  <span ng-switch-default="">
    {{shared.filter.count}} result<span ng-if="shared.filter.count > 1">s</span>
    <br/>
    <small class="text-muted">showing {{firstdisplayed}} to {{lastdisplayed}}</small>
  </span>
</li>
<li class="text-center">
  <div class="progress">
    <div class="progress-bar progress-bar-empty"
	 style="width: {{((firstdisplayed - 1) / shared.filter.count * 100) + '%'}}; max-width: 99%"
	 ></div>
    <div class="progress-bar"
	 style="width: {{((lastdisplayed - firstdisplayed + 1) / shared.filter.count * 100) + '%'}}; min-width: 1px"
	 ></div>
  </div>
  <div class="btn-group">
    <button class="btn btn-default"
	    ng-class="{disabled: at_start()}"
	    ng-click="goto_start()">
      <i class="glyphicon glyphicon-fast-backward"></i>
    </button>
    <button class="btn btn-default"
	    ng-class="{disabled: at_start()}"
	    id="btn-nav-prev"
	    ng-click="go_back()">
      <i class="glyphicon glyphicon-step-backward"></i>
    </button>
    <button class="btn btn-default"
       ng-class="{disabled: at_end()}"
       id="btn-nav-next"
       ng-click="go_forward()">
      <i class="glyphicon glyphicon-step-forward"></i>
    </button>
    <button class="btn btn-default"
	    ng-class="{disabled: at_end()}"
	    ng-click="goto_end()"
	    id="btn-nav-last">
      <i class="glyphicon glyphicon-fast-forward"></i>
    </button>
  </div>
</li>
