summaryrefslogtreecommitdiffstats
path: root/app/common/components/table/table.html
blob: b40c34676f684768847ae999296d00c8ea3e7f79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<table class="bmc-table">
  <thead>
    <!-- Header row -->
    <tr>
      <th ng-repeat="header in $ctrl.model.header"
          class="bmc-table__column-header">
        {{header}}
      </th>
    </tr>
  </thead>
  <tbody>
    <!-- Data rows -->
    <tr ng-if="$ctrl.model.data.length > 0"
        ng-repeat="row in $ctrl.model.data"
        class="bmc-table__row">
      <!-- Row item -->
      <td ng-repeat="item in row.uiData"
          class="bmc-table__cell">
        {{item}}
      </td>
      <!-- Row Actions -->
      <td ng-if="$ctrl.rowActionsEnabled"
          class="bmc-table__cell  bmc-table__row-actions">
        <table-actions
          actions="row.actions"
          emit-action="$ctrl.onEmitTableAction(action, row)">
        </table-actions>
      </td>
    </tr>
    <!-- Empty table -->
    <tr ng-if="$ctrl.model.data.length === 0">
      <td>No data</td>
    </tr>
  </tbody>
</table>
OpenPOWER on IntegriCloud