salix/front/core/components/smart-table/index.html

87 lines
2.9 KiB
HTML
Raw Normal View History

<div class="vn-pa-md">
<vn-horizontal>
<div class="actions-left">
<vn-button icon="view_column"
ng-click="smartTableColumns.show($event)"
vn-tooltip="Shown columns">
</vn-button>
2021-10-23 12:26:42 +00:00
<div ng-transclude="actions"></div> <!-- transcluded actions -->
</div>
2021-10-25 15:18:57 +00:00
<div class="actions-right">
<vn-button icon="search"
2021-10-23 12:26:42 +00:00
ng-click="$ctrl.displaySearch()"
vn-tooltip="Search">
</vn-button>
<div class="button-group">
<vn-button icon="add"
2021-10-23 12:26:42 +00:00
ng-click="$ctrl.createRow()"
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>
<vn-button icon="delete"
2021-10-25 15:18:57 +00:00
ng-click="deleteConfirmation.show($event)"
ng-show="$ctrl.checkedRows.length > 0"
vn-tooltip="Remove selected rows">
</vn-button>
<vn-button icon="save"
2021-10-23 12:26:42 +00:00
ng-click="$ctrl.saveAll()"
vn-tooltip="Save data">
</vn-button>
</div>
<div class="button-group">
<vn-button icon="refresh"
ng-click="$ctrl.model.refresh()"
vn-tooltip="Refresh">
</vn-button>
<vn-button icon="more_vert"
ng-click="moreOptions.show($event)"
vn-tooltip="More">
</vn-button>
</div>
</div>
</vn-horizontal>
2021-10-23 12:26:42 +00:00
<div id="table"></div>
2021-10-25 15:18:57 +00:00
<!-- Remove this in favour of data-viewer or replace it? -->
<vn-pagination
ng-if="$ctrl.model"
model="$ctrl.model"
class="vn-pt-md">
</vn-pagination>
</div>
<vn-confirm
vn-id="deleteConfirmation"
on-accept="$ctrl.deleteAll()"
question="Are you sure you want to continue?"
message="Remove selected rows">
</vn-confirm>
<vn-crud-model
vn-id="userViewModel"
url="UserConfigViews"
link="{tableCode: $ctrl.viewConfigId, userFk: $ctrl.currentUserId}"
data="$ctrl.viewConfig"
auto-load="true">
</vn-crud-model>
<vn-popover class="modal-form" vn-id="smart-table-columns" message="Fields to show">
<tpl-body>
<div class="vn-pa-md">
<vn-horizontal ng-repeat="column in $ctrl.columns">
<vn-check vn-one
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>
</vn-popover>