2021-10-22 13:01:54 +00:00
|
|
|
<div class="vn-pa-md">
|
2021-11-08 13:13:28 +00:00
|
|
|
<vn-horizontal class="actions">
|
2021-10-22 13:01:54 +00:00
|
|
|
<div class="actions-left">
|
|
|
|
<vn-button icon="view_column"
|
2021-11-12 14:17:09 +00:00
|
|
|
id="shownColumns"
|
2021-10-29 14:55:19 +00:00
|
|
|
ng-if="$ctrl.options.activeButtons.shownColumns"
|
2021-10-27 15:11:33 +00:00
|
|
|
ng-click="smartTableColumns.show($event)"
|
2021-10-22 13:01:54 +00:00
|
|
|
vn-tooltip="Shown columns">
|
|
|
|
</vn-button>
|
2021-11-15 07:45:21 +00:00
|
|
|
<div ng-transclude="actions"></div>
|
2021-11-11 16:18:44 +00:00
|
|
|
</div>
|
|
|
|
<div class="actions-right">
|
2022-09-07 08:30:50 +00:00
|
|
|
<div class="totalRows" ng-if="$ctrl.model.data">
|
|
|
|
{{model.data.length}}
|
|
|
|
<span translate>results</span>
|
2021-11-08 13:13:28 +00:00
|
|
|
</div>
|
2021-10-22 13:01:54 +00:00
|
|
|
<vn-button icon="search"
|
2021-10-29 14:55:19 +00:00
|
|
|
ng-if="$ctrl.options.activeButtons.search"
|
2021-10-23 12:26:42 +00:00
|
|
|
ng-click="$ctrl.displaySearch()"
|
2021-10-22 13:01:54 +00:00
|
|
|
vn-tooltip="Search">
|
|
|
|
</vn-button>
|
2021-10-29 14:55:19 +00:00
|
|
|
<div class="button-group"
|
|
|
|
ng-if="$ctrl.options.activeButtons.crud">
|
2021-10-22 13:01:54 +00:00
|
|
|
<vn-button icon="add"
|
2021-10-23 12:26:42 +00:00
|
|
|
ng-click="$ctrl.createRow()"
|
2021-10-22 13:01:54 +00:00
|
|
|
vn-tooltip="Add new row">
|
|
|
|
</vn-button>
|
2021-10-23 12:26:42 +00:00
|
|
|
<vn-button icon="undo"
|
|
|
|
ng-click="$ctrl.model.undoChanges()"
|
|
|
|
vn-tooltip="Undo">
|
|
|
|
</vn-button>
|
2021-10-22 13:01:54 +00:00
|
|
|
<vn-button icon="delete"
|
2021-10-25 15:18:57 +00:00
|
|
|
ng-click="deleteConfirmation.show($event)"
|
|
|
|
ng-show="$ctrl.checkedRows.length > 0"
|
2021-10-22 13:01:54 +00:00
|
|
|
vn-tooltip="Remove selected rows">
|
|
|
|
</vn-button>
|
|
|
|
<vn-button icon="save"
|
2021-10-23 12:26:42 +00:00
|
|
|
ng-click="$ctrl.saveAll()"
|
2021-10-22 13:01:54 +00:00
|
|
|
vn-tooltip="Save data">
|
|
|
|
</vn-button>
|
|
|
|
</div>
|
2021-10-29 14:55:19 +00:00
|
|
|
<vn-button icon="refresh"
|
2022-09-07 08:30:50 +00:00
|
|
|
ng-click="$ctrl.refresh()"
|
|
|
|
disabled="$ctrl.isRefreshing"
|
2021-10-29 14:55:19 +00:00
|
|
|
vn-tooltip="Refresh">
|
|
|
|
</vn-button>
|
2021-10-22 13:01:54 +00:00
|
|
|
</div>
|
|
|
|
</vn-horizontal>
|
2021-10-23 12:26:42 +00:00
|
|
|
<div id="table"></div>
|
2022-05-03 12:08:46 +00:00
|
|
|
<div ng-transclude="pagination">
|
|
|
|
<vn-pagination
|
|
|
|
ng-if="$ctrl.model"
|
|
|
|
model="$ctrl.model"
|
|
|
|
class="vn-pt-md">
|
|
|
|
</vn-pagination>
|
|
|
|
</div>
|
2021-10-25 15:18:57 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteConfirmation"
|
|
|
|
on-accept="$ctrl.deleteAll()"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="Remove selected rows">
|
2021-10-27 15:11:33 +00:00
|
|
|
</vn-confirm>
|
|
|
|
|
2021-10-29 14:55:19 +00:00
|
|
|
<vn-crud-model
|
|
|
|
ng-if="$ctrl.viewConfigId"
|
2022-09-07 08:30:50 +00:00
|
|
|
vn-id="userViewModel"
|
2021-10-27 15:11:33 +00:00
|
|
|
url="UserConfigViews"
|
|
|
|
link="{tableCode: $ctrl.viewConfigId, userFk: $ctrl.currentUserId}"
|
|
|
|
data="$ctrl.viewConfig"
|
|
|
|
auto-load="true">
|
|
|
|
</vn-crud-model>
|
2021-10-28 07:25:46 +00:00
|
|
|
<vn-popover vn-id="smart-table-columns" message="Fields to show">
|
2021-10-27 15:11:33 +00:00
|
|
|
<tpl-body>
|
2021-11-11 16:18:44 +00:00
|
|
|
<div class="smart-table-columns vn-pa-md vn-w-sm">
|
|
|
|
<vn-horizontal>
|
|
|
|
<h6 translate style="margin:0">Shown columns</h6>
|
2022-09-07 08:30:50 +00:00
|
|
|
<vn-icon
|
2021-11-11 16:18:44 +00:00
|
|
|
vn-none
|
2022-09-07 08:30:50 +00:00
|
|
|
icon="info"
|
2021-11-11 16:18:44 +00:00
|
|
|
color-marginal
|
|
|
|
vn-tooltip="Check the columns you want to see"/>
|
|
|
|
</vn-horizontal>
|
|
|
|
<div class="vn-mb-md">
|
|
|
|
<vn-check label="Tick all"
|
|
|
|
ng-model="$ctrl.checkAll">
|
|
|
|
</vn-check>
|
|
|
|
</div>
|
|
|
|
|
2021-10-28 07:25:46 +00:00
|
|
|
<vn-horizontal class="vn-mb-md">
|
|
|
|
<vn-check ng-repeat="column in $ctrl.columns"
|
2021-10-27 15:11:33 +00:00
|
|
|
label="{{column.caption}}"
|
|
|
|
ng-model="$ctrl.viewConfig[0].configuration[column.field]">
|
|
|
|
</vn-check>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-button
|
|
|
|
label="Save"
|
|
|
|
ng-click="$ctrl.saveViewConfig()">
|
|
|
|
</vn-button>
|
|
|
|
</vn-horizontal>
|
|
|
|
</div>
|
|
|
|
</tpl-body>
|
2022-09-07 08:30:50 +00:00
|
|
|
</vn-popover>
|
2022-09-29 12:28:50 +00:00
|
|
|
|