UNPKG

kongadmin

Version:
98 lines (87 loc) 4.34 kB
<div class="row actions"> <div class="col-md-12"> <div class="pull-left"> <a data-ui-sref="plugins.add" ng-if="user.hasPermission($state.name.split('.')[0],'create')" class="btn btn-primary"> <i class="mdi mdi-plus"></i> Add global plugins </a> </div> <list-search class="pull-right" data-filters="filters" data-options="itemsPerPageOptions" data-items="itemsPerPage" ></list-search> </div> </div> <konga-loader ng-if="loading && !items.data.length"></konga-loader> <div class="row" ng-if="!loading || items.data.length"> <div class="col-md-12"> <div class="table-responsive"> <table class="table table-hover table-striped"> <tr> <th width="1" ng-if="user.hasPermission($state.name.split('.')[0],'update')"></th> <th width="1"></th> <th width="{{item.width}}" class="text-nowrap" data-ng-repeat="item in titleItems | filter:titleFilter" > <a data-ng-show="item.column" class="clickable" data-ng-click="changeSort(item)" data-ng-bind-html="item.title.toUpperCase()" ></a> <span data-ng-show="!item.column" data-ng-bind-html="item.title.toUpperCase()" ></span> <i class="mdi" data-ng-show="sort.column == item.column" data-ng-class="{'mdi-chevron-down': !sort.direction, 'mdi-chevron-up': sort.direction}" ></i> </th> <th width="1" ng-if="user.hasPermission($state.name.split('.')[0],'delete')"></th> </tr> <tr dir-paginate="item in items.data | orderBy:sort.column:sort.direction | filter : filters.searchWord | itemsPerPage: itemsPerPage"> <td ng-if="user.hasPermission($state.name.split('.')[0],'update')"> <input bs-switch switch-on-color="primary" ng-change="updatePlugin(item)" ng-model="item.enabled" type="checkbox" switch-size="mini"> </td> <td> <raw-view data-item="item"></raw-view> </td> <th><a href ng-click="onEditPlugin(item)">{{item.name}}</a></th> <td> <a data-ng-if="item.api_id" data-ui-sref="apis.edit({api_id:item.api_id})">{{item.api_id}}</a> <span data-ng-if="!item.api_id" >All APIs</span> </td> <td> <a data-ng-if="item.consumer_id" data-ui-sref="consumers.edit({id:item.consumer_id})">{{item.consumer_id}}</a> <span data-ng-if="!item.consumer_id" >All consumers</span> </td> <td>{{item.created_at | date : format : timezone}}</td> <td ng-if="user.hasPermission($state.name.split('.')[0],'delete')"> <button type="button" ng-click="deleteItem($index,item)" class="btn btn-danger btn-link"> <i class="mdi mdi-delete"></i> Delete </button> </td> </tr> <tr data-ng-if="items.data.length === 0"> <td colspan="100%" class="text-center text-muted"> <em>no data found...</em> </td> </tr> </table> </div> <dir-pagination-controls></dir-pagination-controls> </div> </div>