-
Notifications
You must be signed in to change notification settings - Fork 0
/
cu-grid.template.jade
36 lines (36 loc) · 1.33 KB
/
cu-grid.template.jade
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
36
.table-responsive
.title(ng-if="gridConfig.gridName") {{gridConfig.gridName}}
.controls
.btn-group.filters(
dropdown
ng-if="gridConfig.filteringConfig.enableFiltering"
)
button.btn.dropdown-toggle(dropdown-toggle) Filters
span.caret
ul.dropdown-menu(role="menu", ng-click="$event.stopPropagation()")
li(
ng-repeat="column in gridConfig.columns"
ng-if="column.filter.enableFiltering"
)
form(ng-submit="addFilter(column, filters[column.field])")
label {{column.name}}
input(ng-model="filters[column.field]")
table.table.table-striped
thead
tr
th(
ng-repeat="column in gridConfig.columns"
ng-click="changeOrder(column)"
) {{column.name}}
i.glyphicon.glyphicon-sort-by-attributes(ng-show="orderBy == column.field")
i.glyphicon.glyphicon-sort-by-attributes-alt(ng-show="orderBy == '-' + column.field")
tbody
tr(ng-repeat="element in gridConfig.data")
td(ng-repeat="column in gridConfig.columns") {{element[column.field]}}
.pagination-block(ng-if="gridConfig.paginationConfig.enablePagination")
pagination.pagination-sm(
total-items="gridConfig.paginationConfig.totalItems"
ng-model="currentPage"
max-size="3"
ng-change="changePage(currentPage)"
)