]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | <cd-error-panel *ngIf="loadingError" |
2 | i18n>Failed to load data.</cd-error-panel> | |
3 | ||
4 | <div class="dataTables_wrapper"> | |
5 | <div class="dataTables_header clearfix form-inline" | |
6 | *ngIf="toolHeader"> | |
7 | <!-- actions --> | |
8 | <div class="oadatatableactions"> | |
9 | <ng-content select=".table-actions"></ng-content> | |
10 | </div> | |
11 | <!-- end actions --> | |
12 | ||
13 | <!-- filters --> | |
14 | <ng-content select=".table-filters"></ng-content> | |
15 | <!-- end filters --> | |
16 | ||
17 | <!-- search --> | |
18 | <div class="input-group"> | |
19 | <span class="input-group-addon"> | |
20 | <i class="glyphicon glyphicon-search"></i> | |
21 | </span> | |
22 | <input class="form-control" | |
23 | type="text" | |
24 | [(ngModel)]="search" | |
25 | (keyup)="updateFilter()"> | |
26 | <span class="input-group-btn"> | |
27 | <button type="button" | |
28 | class="btn btn-default clear-input tc_clearInputBtn" | |
29 | (click)="updateFilter(true)"> | |
30 | <i class="icon-prepend fa fa-remove"></i> | |
31 | </button> | |
32 | </span> | |
33 | </div> | |
34 | <!-- end search --> | |
35 | ||
36 | <!-- pagination limit --> | |
37 | <div class="input-group dataTables_paginate"> | |
38 | <input class="form-control" | |
39 | type="number" | |
40 | min="1" | |
41 | max="9999" | |
42 | [value]="userConfig.limit" | |
43 | (click)="setLimit($event)" | |
44 | (keyup)="setLimit($event)" | |
45 | (blur)="setLimit($event)"> | |
46 | </div> | |
47 | <!-- end pagination limit--> | |
48 | ||
49 | <!-- show hide columns --> | |
50 | <div class="widget-toolbar"> | |
51 | <div dropdown | |
52 | class="dropdown tc_menuitem tc_menuitem_cluster"> | |
53 | <a dropdownToggle | |
54 | class="btn btn-sm btn-default dropdown-toggle tc_columnBtn" | |
55 | data-toggle="dropdown"> | |
56 | <i class="fa fa-lg fa-table"></i> | |
57 | </a> | |
58 | <ul *dropdownMenu | |
59 | class="dropdown-menu"> | |
60 | <li *ngFor="let column of columns"> | |
61 | <label> | |
62 | <input type="checkbox" | |
63 | (change)="toggleColumn($event)" | |
64 | [name]="column.prop" | |
65 | [checked]="!column.isHidden"> | |
66 | <span>{{ column.name }}</span> | |
67 | </label> | |
68 | </li> | |
69 | </ul> | |
70 | </div> | |
71 | </div> | |
72 | <!-- end show hide columns --> | |
73 | ||
74 | <!-- refresh button --> | |
75 | <div class="widget-toolbar tc_refreshBtn" | |
76 | *ngIf="fetchData.observers.length > 0"> | |
77 | <a (click)="refreshBtn()"> | |
78 | <i class="fa fa-lg fa-refresh" | |
79 | [class.fa-spin]="updating || loadingIndicator"></i> | |
80 | </a> | |
81 | </div> | |
82 | <!-- end refresh button --> | |
83 | </div> | |
84 | <ngx-datatable #table | |
85 | class="bootstrap oadatatable" | |
86 | [cssClasses]="paginationClasses" | |
87 | [selectionType]="selectionType" | |
88 | [selected]="selection.selected" | |
89 | (select)="onSelect()" | |
90 | [sorts]="userConfig.sorts" | |
91 | (sort)="changeSorting($event)" | |
92 | [columns]="tableColumns" | |
93 | [columnMode]="columnMode" | |
94 | [rows]="rows" | |
95 | [rowClass]="getRowClass()" | |
96 | [headerHeight]="header ? 'auto' : 0" | |
97 | [footerHeight]="footer ? 'auto' : 0" | |
98 | [limit]="userConfig.limit > 0 ? userConfig.limit : undefined" | |
99 | [loadingIndicator]="loadingIndicator" | |
100 | [rowIdentity]="rowIdentity()" | |
101 | [rowHeight]="'auto'"> | |
102 | <ngx-datatable-footer> | |
103 | <ng-template ngx-datatable-footer-template | |
104 | let-rowCount="rowCount" | |
105 | let-pageSize="pageSize" | |
106 | let-selectedCount="selectedCount" | |
107 | let-curPage="curPage" | |
108 | let-offset="offset" | |
109 | let-isVisible="isVisible"> | |
110 | <div class="page-count"> | |
111 | <span *ngIf="selectionType"> | |
112 | {{ selectedCount }} <ng-container i18n="X selected">selected</ng-container> / | |
113 | </span> | |
114 | <span *ngIf="rowCount != data?.length"> | |
115 | {{ rowCount }} <ng-container i18n="X found">found</ng-container> / | |
116 | </span> | |
117 | <span> | |
118 | {{ data?.length || 0 }} <ng-container i18n="X total">total</ng-container> | |
119 | </span> | |
120 | </div> | |
121 | <datatable-pager [pagerLeftArrowIcon]="paginationClasses.pagerLeftArrow" | |
122 | [pagerRightArrowIcon]="paginationClasses.pagerRightArrow" | |
123 | [pagerPreviousIcon]="paginationClasses.pagerPrevious" | |
124 | [pagerNextIcon]="paginationClasses.pagerNext" | |
125 | [page]="curPage" | |
126 | [size]="pageSize" | |
127 | [count]="rowCount" | |
128 | [hidden]="!((rowCount / pageSize) > 1)" | |
129 | (change)="table.onFooterPage($event)"> | |
130 | </datatable-pager> | |
131 | </ng-template> | |
132 | </ngx-datatable-footer> | |
133 | </ngx-datatable> | |
134 | </div> | |
135 | ||
136 | <!-- Table Details --> | |
137 | <ng-content select="[cdTableDetail]"></ng-content> | |
138 | ||
139 | <!-- cell templates that can be accessed from outside --> | |
140 | <ng-template #tableCellBoldTpl | |
141 | let-value="value"> | |
142 | <strong>{{ value }}</strong> | |
143 | </ng-template> | |
144 | ||
145 | <ng-template #sparklineTpl | |
146 | let-row="row" | |
147 | let-value="value"> | |
148 | <cd-sparkline [data]="value" | |
149 | [isBinary]="row.cdIsBinary"></cd-sparkline> | |
150 | </ng-template> | |
151 | ||
152 | <ng-template #routerLinkTpl | |
153 | let-row="row" | |
154 | let-value="value"> | |
155 | <a [routerLink]="[row.cdLink]" | |
156 | [queryParams]="row.cdParams">{{ value }}</a> | |
157 | </ng-template> | |
158 | ||
159 | <ng-template #checkIconTpl | |
160 | let-value="value"> | |
161 | <i class="fa fa-check fa-fw" | |
162 | [hidden]="!value"></i> | |
163 | </ng-template> | |
164 | ||
165 | <ng-template #perSecondTpl | |
166 | let-row="row" | |
167 | let-value="value"> | |
168 | {{ value }} /s | |
169 | </ng-template> | |
170 | ||
171 | <ng-template #executingTpl | |
172 | let-row="row" | |
173 | let-value="value"> | |
174 | <i class="fa fa-spinner fa-spin fa-fw" | |
175 | *ngIf="row.cdExecuting"></i> | |
176 | {{ value }} | |
177 | <span *ngIf="row.cdExecuting" | |
178 | class="text-muted italic">({{ row.cdExecuting }}... )</span> | |
179 | </ng-template> | |
180 | ||
181 | <ng-template #classAddingTpl | |
182 | let-value="value"> | |
183 | <span class="{{useCustomClass(value)}}">{{ value }}</span> | |
184 | </ng-template> |