<ion-view view-title="{{ 'Reject' | translate }}">
  <ion-content class="defect-page has-header" scroll="false">
    <div class="row" style="height:100%; width: 100%;" ng-show="opsrejectsctrl.currentRejects.length==0">
      <div class="valign-wrapper empty-message">
        <div class="valign">
          <i class="icon ion-information-circled"></i>
          <br>
          {{'NoRejectsForThisOperation' | translate}}
        </div>
      </div>
    </div>
    <div class="row margin-top-20"  ng-show="opsrejectsctrl.currentRejects.length >0">
      <div class="col">
        <ion-list class="operation-list">
          <ion-item class="item-icon-right"
                    ng-repeat="issuel in opsrejectsctrl.currentRejects | startFrom:currentPagei*pageSize | limitTo:pageSize/2 :0"
                    ng-click="opsrejectsctrl.rejectClick(issuel)" ng-class="{ active: issuel.ischecked }">
            {{isEnglish ? issuel.name : issuel.local_name}}<b class="number">{{issuel.category_id}}</b>
            <i class="icon ion-checkmark-circled"></i>
          </ion-item>
        </ion-list>
      </div>
      <div class="col">
        <ion-list class="operation-list">
          <ion-item class="item-icon-right"
                    ng-repeat="issuer in opsrejectsctrl.currentRejects | startFrom:(currentPagei*pageSize+7) | limitTo:pageSize/2 :0"
                    ng-click="opsrejectsctrl.rejectClick(issuer)" ng-class="{ active: issuer.ischecked }">
            {{isEnglish ? issuer.name : issuer.local_name}}<b class="number">{{issuer.category_id}}</b>
            <i class="icon ion-checkmark-circled"></i>
          </ion-item>
        </ion-list>
      </div>
    </div>
    <div class="row"  ng-show="opsrejectsctrl.currentRejects.length >0">
      <div class="col align-center button-wrapper">
        <div class="button-set">
          <button class="button button-positive button-clear" ng-disabled="currentPagei == 0" ng-click="currentPagei=currentPagei-1">
            {{'Previous' | translate}}
          </button>
          <span class="pagenumber">{{currentPagei+1}}/{{numberOfPages(opsrejectsctrl.currentRejects)}}{{'page' | translate}}</span>
          <button class="button button-positive button-clear"
                  ng-disabled="currentPagei >= opsrejectsctrl.currentRejects.length/pageSize - 1"
                  ng-click="currentPagei=currentPagei+1">
            {{'Next' | translate}}
          </button>
        </div>
      </div>
    </div>
    <div class="row"  ng-show="opsrejectsctrl.currentRejects.length >0">
      <div class="col">
        <button ng-click="opsrejectsctrl.save()" ng-disabled="opsrejectsctrl.selectedRejects.length==0"
                class="defects-done button button-positive button-fab pull-right">
          {{'Done' | translate}}
        </button>
      </div>
    </div>
  </ion-content>
</ion-view>
