85 lines
3.0 KiB
HTML
85 lines
3.0 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="WorkerDms/filter"
|
|
link="{worker: $ctrl.$params.id}"
|
|
limit="20"
|
|
data="$ctrl.workerDms"
|
|
order="dmsFk DESC"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-data-viewer
|
|
model="model"
|
|
class="vn-w-lg">
|
|
<vn-card>
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th field="dmsFk" shrink>Id</vn-th>
|
|
<vn-th field="reference" shrink>Reference</vn-th>
|
|
<vn-th expand>Description</vn-th>
|
|
<vn-th field="hasFile" shrink>Original</vn-th>
|
|
<vn-th field="created">Created</vn-th>
|
|
<vn-th shrink></vn-th>
|
|
<vn-th shrink></vn-th>
|
|
<vn-th shrink></vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="document in $ctrl.workerDms">
|
|
<vn-td number shrink>{{::document.dmsFk}}</vn-td>
|
|
<vn-td expand>
|
|
<span title="{{::document.reference}}">
|
|
{{::document.reference}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td expand>
|
|
<span title="{{::document.description}}">
|
|
{{::document.description}}
|
|
</span>
|
|
</vn-td >
|
|
<vn-td shrink>
|
|
<span title="{{'Download file' | translate}}" class="link"
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
|
{{::document.file}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
{{::document.created | date:'dd/MM/yyyy HH:mm'}}
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button title="{{'Download file' | translate}}"
|
|
icon="cloud_download"
|
|
ng-click="$ctrl.downloadFile(document.dmsFk)">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button ui-sref="worker.card.edit({dmsId: {{::document.dmsFk}}})"
|
|
icon="edit"
|
|
title="{{'Edit file' | translate}}">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
<vn-td shrink>
|
|
<vn-icon-button
|
|
icon="delete"
|
|
ng-click="confirm.show($index)"
|
|
title="{{'Remove file' | translate}}"
|
|
tabindex="-1">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<a ui-sref="worker.card.dms.create"
|
|
vn-tooltip="Upload file"
|
|
vn-bind="+"
|
|
fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
<vn-confirm
|
|
vn-id="confirm"
|
|
message="This file will be deleted"
|
|
question="Are you sure you want to continue?"
|
|
on-accept="$ctrl.deleteDms($data)">
|
|
</vn-confirm> |