<h2>List conferences</h2>

<form>
  <label>Conference name</label>
  
  <input type="text" ng-model="lookupName" jskom-autofocus
         spellcheck="false" autocorrect="off" autocapitalize="off"/>
  
  <div ng-hide="confs == null" ng-cloak>
    <table class="twelve">
      <thead>
        <tr>
          <th>Name</th>
        </tr>
      </thead>
      <tbody>
        <tr ng-show="confs.length == 0"><td>No matches</td></tr>
        
        <tr ng-repeat="conf in confs | startFrom:currentPage*pageSize | limitTo:pageSize">
          <td><a href="/conferences/{{conf.conf_no}}">{{conf|confName}}</a></td>
        </tr>
      </tbody>
    </table>
    
    <ul class="pagination">
      <li ng-class="{'unavailable': currentPage < 1 }">
        <a ng-click="previousPage()">Previous</a>
      </li>
      <li>{{currentPage+1}} / {{numberOfPages}}</li>
      <li ng-class="{'unavailable': currentPage >= numberOfPages - 1}">
        <a ng-click="nextPage()">Next</a>
      </li>
    </ul>
  </div>
  
  <div id="jskomControlBar">
    <div class="row">
      <div class="nine mobile-three columns"></div>
      <div class="three mobile-one columns">
        <button type="submit" class="button right"
                ng-disabled="isLoading"
                ng-click="listConfs()">
          <i class="icon-search"></i>
          Search
        </button>
      </div>
    </div>
  </div>
</form>
