
<ion-view view-title="{{ 'Operations' | translate }}">

  <ion-content class="defect-page has-header" scroll="false">
        <div class="row">
          <div class="col">
            <button class="button button-clear no-animation style-number">
              {{ 'Style' | translate }} :{{style}}
            </button>
            <button class="button button-positive button-clear icon-left ion-plus-circled no-animation pull-right" ng-click="operationsctrl.goTo('operations')">
              {{ 'AddOperations' | translate }}
            </button>
          </div>
        </div>
    <div class="row" style="height:80%; width: 100%;" ng-show="operationsctrl.operations.length==0">
      <div class="valign-wrapper empty-message">
        <div class="valign">
          <i class="icon ion-information-circled"></i>
          <br>
          {{ 'PleaseSelectOperations' | translate }}
        </div>
      </div>
    </div>
        <div class="row">
          <div class="col">
            <ion-list class="operation-list">
              <ion-item class="item-icon-right" ng-repeat="operationl in operationsctrl.operations | startFrom:currentPage*pageSize | limitTo:pageSize/2 :0"
                        ng-click="operationsctrl.operationClick(operationl)" ng-class="{ active: operationl.selected }">
                {{isEnglish ? operationl.name : operationl.local_name}}
                <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="operationr in operationsctrl.operations | startFrom:(currentPage*pageSize+pageSize/2) | limitTo:pageSize/2 :0"
                        ng-click="operationsctrl.operationClick(operationr)" ng-class="{ active: operationr.selected }">
                {{isEnglish ? operationr.name : operationr.local_name}}
                <i class="icon ion-checkmark-circled"></i>
              </ion-item>
            </ion-list>
          </div>
        </div>
        <div class="row">
          <div class="col align-center button-wrapper">
            <div class="button-set">
              <button class="button button-positive button-clear" ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1">
                {{ 'Previous' | translate }}
              </button>
              <span class="pagenumber">{{currentPage+1}}/{{numberOfPages(operationsctrl.operations)}}{{ 'page' | translate }}</span>
              <button class="button button-positive button-clear" ng-disabled="currentPage >= operationsctrl.operations.length/pageSize - 1" ng-click="currentPage=currentPage+1">
                {{ 'Next' | translate }}
              </button>
            </div>
          </div>
        </div>
  </ion-content>
</ion-view>
