|
1 | | -<table datatable="ng" dt-options="$ctrl.dtOptions" dt-column-defs="$ctrl.dtColumnDefs" dt-instance="$ctrl.dtInstanceCallback" |
2 | | - class="table-view-container table table-striped table-bordered table-hover dataTable"> |
3 | | - <thead> |
4 | | - <tr role="row"> |
5 | | - <th class="table-view-pf-select"><input type="checkbox" value="$ctrl.selectAll" ng-model="$ctrl.selectAll" ng-change="$ctrl.toggleAll()"/></th> |
6 | | - <th ng-repeat="col in $ctrl.colummns">{{col.header}}</th> |
7 | | - <th ng-if="$ctrl.areActions()" colspan="{{$ctrl.calcActionsColspan()}}">Actions</th> |
| 1 | +<span> |
| 2 | + <table ng-if="$ctrl.config.itemsAvailable !== false" |
| 3 | + datatable="ng" dt-options="$ctrl.dtOptions" dt-column-defs="$ctrl.dtColumnDefs" dt-instance="$ctrl.dtInstanceCallback" |
| 4 | + class="table-view-container table table-striped table-bordered table-hover dataTable"> |
| 5 | + <thead> |
| 6 | + <tr role="row"> |
| 7 | + <th class="table-view-pf-select"><input type="checkbox" value="$ctrl.selectAll" ng-model="$ctrl.selectAll" ng-change="$ctrl.toggleAll()"/></th> |
| 8 | + <th ng-repeat="col in $ctrl.colummns">{{col.header}}</th> |
| 9 | + <th ng-if="$ctrl.areActions()" colspan="{{$ctrl.calcActionsColspan()}}">Actions</th> |
| 10 | + </tr> |
| 11 | + </thead> |
| 12 | + <tbody> |
| 13 | + <tr role="row" ng-repeat="item in $ctrl.items track by $index"> |
| 14 | + <td class="table-view-pf-select"> |
| 15 | + <input type="checkbox" value="item.selected" ng-model="item.selected" ng-change="$ctrl.toggleOne(item)"/> |
| 16 | + </td> |
| 17 | + <td ng-repeat="(key, value) in item" ng-if="$ctrl.isColItemFld(key)">{{ value }}</td> |
| 18 | + <td ng-if="$ctrl.actionButtons && $ctrl.actionButtons.length > 0" class="table-view-pf-actions" ng-repeat="actionButton in $ctrl.actionButtons"> |
| 19 | + <div class="table-view-pf-btn"> |
| 20 | + <button class="btn btn-default" title="{{actionButton.title}}" |
| 21 | + ng-click="$ctrl.handleButtonAction(actionButton, item)"> |
| 22 | + <span ng-if="!actionButton.include">{{actionButton.name}}</span> |
| 23 | + </button> |
| 24 | + </div> |
| 25 | + </td> |
| 26 | + <td ng-if="$ctrl.menuActions && $ctrl.menuActions.length > 0" class="table-view-pf-actions list-group-item-header"> |
| 27 | + <div uib-dropdown class="{{$ctrl.dropdownClass}} dropdown-kebab-pf" |
| 28 | + id="kebab_{{$index}}" |
| 29 | + ng-if="$ctrl.menuActions && $ctrl.menuActions.length > 0"> |
| 30 | + <button uib-dropdown-toggle class="btn btn-default dropdown-toggle" type="button" |
| 31 | + id="dropdownKebabRight_{{$index}}" |
| 32 | + ng-click="$ctrl.setupActions(item, $event)"> |
| 33 | + <span class="fa fa-ellipsis-v"></span> |
| 34 | + </button> |
| 35 | + <ul uib-dropdown-menu class="dropdown-menu dropdown-menu-right {{$index}}" aria-labelledby="dropdownKebabRight_{{$index}}" > |
| 36 | + <li ng-repeat="menuAction in $ctrl.menuActions" |
| 37 | + ng-if="menuAction.isVisible !== false" |
| 38 | + role="{{menuAction.isSeparator === true ? 'separator' : 'menuitem'}}" |
| 39 | + ng-class="{'divider': (menuAction.isSeparator === true), 'disabled': (menuAction.isDisabled === true)}"> |
| 40 | + <a ng-if="menuAction.isSeparator !== true" title="{{menuAction.title}}" ng-click="$ctrl.handleMenuAction(menuAction, item)"> |
| 41 | + {{menuAction.name}} |
| 42 | + </a> |
| 43 | + </li> |
| 44 | + </ul> |
| 45 | + </div> |
| 46 | + </td> |
8 | 47 | </tr> |
9 | | - </thead> |
10 | | - <tbody> |
11 | | - <tr role="row" ng-repeat="item in $ctrl.items track by $index"> |
12 | | - <td class="table-view-pf-select"> |
13 | | - <input type="checkbox" value="item.selected" ng-model="item.selected" ng-change="$ctrl.toggleOne(item)"/> |
14 | | - </td> |
15 | | - <td ng-repeat="(key, value) in item" ng-if="$ctrl.isColItemFld(key)">{{ value }}</td> |
16 | | - <td ng-if="$ctrl.actionButtons && $ctrl.actionButtons.length > 0" class="table-view-pf-actions" ng-repeat="actionButton in $ctrl.actionButtons"> |
17 | | - <div class="table-view-pf-btn"> |
18 | | - <button class="btn btn-default" title="{{actionButton.title}}" |
19 | | - ng-click="$ctrl.handleButtonAction(actionButton, item)"> |
20 | | - <span ng-if="!actionButton.include">{{actionButton.name}}</span> |
21 | | - </button> |
22 | | - </div> |
23 | | - </td> |
24 | | - <td ng-if="$ctrl.menuActions && $ctrl.menuActions.length > 0" class="table-view-pf-actions list-group-item-header"> |
25 | | - <div uib-dropdown class="{{$ctrl.dropdownClass}} dropdown-kebab-pf" |
26 | | - id="kebab_{{$index}}" |
27 | | - ng-if="$ctrl.menuActions && $ctrl.menuActions.length > 0"> |
28 | | - <button uib-dropdown-toggle class="btn btn-link" type="button" |
29 | | - id="dropdownKebabRight_{{$index}}" |
30 | | - ng-click="$ctrl.setupActions(item, $event)"> |
31 | | - <span class="fa fa-ellipsis-v"></span> |
32 | | - </button> |
33 | | - <ul uib-dropdown-menu class="dropdown-menu dropdown-menu-right {{$index}}" aria-labelledby="dropdownKebabRight_{{$index}}" > |
34 | | - <li ng-repeat="menuAction in $ctrl.menuActions" |
35 | | - ng-if="menuAction.isVisible !== false" |
36 | | - role="{{menuAction.isSeparator === true ? 'separator' : 'menuitem'}}" |
37 | | - ng-class="{'divider': (menuAction.isSeparator === true), 'disabled': (menuAction.isDisabled === true)}"> |
38 | | - <a ng-if="menuAction.isSeparator !== true" title="{{menuAction.title}}" ng-click="$ctrl.handleMenuAction(menuAction, item)"> |
39 | | - {{menuAction.name}} |
40 | | - </a> |
41 | | - </li> |
42 | | - </ul> |
43 | | - </div> |
44 | | - </td> |
45 | | - </tr> |
46 | | - </tbody> |
47 | | -</table> |
| 48 | + </tbody> |
| 49 | + </table> |
| 50 | + <pf-empty-state ng-if="$ctrl.config.itemsAvailable === false" config="$ctrl.emptyStateConfig"></pf-empty-state> |
| 51 | +</span> |
0 commit comments