<div ng-controller="Complaints.FutureApprovalRoutingController">
    <div class="checkbox">
        <label>
            <input type="checkbox" ng-model="nonConcurEndsApprovals" ng-disabled="showInitButton == false">
            <span translate>complaints.comp.approvalRouting.checkbox.nonConcurEndsApprovalCycle</span>
        </label>
    </div>
    <div class="panel panel-success panel-grid">
        <div class="panel-heading">
            <div class="panel-title">
                <span> {{'complaints.comp.approvalRouting.title' | translate}}</span>
                <div class="pull-right">
                    <span>
                        <button tooltip="{{complaints.comp.approvalRouting.button.initiate.tooltip}}" tooltip-append-to-body="true"
                                tooltip-popup-delay="400" class="btn btn-default btn-xs" ng-click="initiateTask()"
                                ng-show="showInitButton == true" ng-disabled="initInProgress == true">
                                <span translate>complaints.comp.approvalRouting.button.initiate</span></button>
                        <button tooltip="{{complaints.comp.approvalRouting.button.withdraw.tooltip}}" tooltip-append-to-body="true"
                                tooltip-popup-delay="400" class="btn btn-default btn-xs" ng-click="withdrawTask()"
                                ng-show="showWithdrawButton == true" ng-disabled="withdrawInProgress == true">
                                <span translate>complaints.comp.approvalRouting.button.withdraw</span></button>
                        <button tooltip="{{addNewTooltip}}" tooltip-append-to-body="true" tooltip-popup-delay="400"
                                class="btn btn-default btn-xs" ng-hide="gridButtonReadOnly()" ng-click="userSearch()">
                                <i class="fa fa-lg fa-plus"></i></button>
                        <button tooltip-append-to-body="true" tooltip="{{complaints.comp.approvalRouting.button.save.tooltip}}"
                                tooltip-popup-delay="200" class="btn btn-default btn-xs" ng-disabled="!isDataChanged()"
                                ng-click="saveTask()">
                                <i class="fa fa-lg fa-save"></i></button>
                    </span>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize ui-grid-pagination ui-grid-edit ui-grid-cell-nav
                    adjust-table-height="gridOptions.data.length" ng-hide="gridOptions.noData" class="grid"></div>
            <div class="alert" ng-if="gridOptions.noData">
                <p class="text-center">
                    <span>{{noDataMessage}}</span>
                </p>
            </div>
        </div>
    </div>
</div>