Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame] | 1 | <table class="bmc-table"> |
| 2 | <thead> |
| 3 | <!-- Header row --> |
| 4 | <tr> |
| 5 | <th ng-repeat="header in $ctrl.model.header" |
| 6 | class="bmc-table__column-header"> |
| 7 | {{header}} |
| 8 | </th> |
| 9 | </tr> |
| 10 | </thead> |
| 11 | <tbody> |
| 12 | <!-- Data rows --> |
| 13 | <tr ng-if="$ctrl.model.data.length > 0" |
| 14 | ng-repeat="row in $ctrl.model.data" |
| 15 | class="bmc-table__row"> |
| 16 | <!-- Row item --> |
| 17 | <td ng-repeat="item in row.uiData" |
| 18 | class="bmc-table__cell"> |
| 19 | {{item}} |
| 20 | </td> |
| 21 | <!-- Row Actions --> |
Yoshie Muranaka | bb68879 | 2019-08-12 09:31:52 -0500 | [diff] [blame^] | 22 | <td ng-if="$ctrl.rowActionsEnabled" |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame] | 23 | class="bmc-table__cell bmc-table__row-actions"> |
Yoshie Muranaka | bb68879 | 2019-08-12 09:31:52 -0500 | [diff] [blame^] | 24 | <table-actions |
| 25 | actions="row.actions" |
| 26 | emit-action="$ctrl.onEmitTableAction(action, row)"> |
| 27 | </table-actions> |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame] | 28 | </td> |
| 29 | </tr> |
| 30 | <!-- Empty table --> |
| 31 | <tr ng-if="$ctrl.model.data.length === 0"> |
| 32 | <td>No data</td> |
| 33 | </tr> |
| 34 | </tbody> |
| 35 | </table> |