salix/modules/client/front/dms/index.html

74 lines
3.1 KiB
HTML
Raw Normal View History

<vn-crud-model
vn-id="model"
url="/client/api/ClientDms"
link="{clientFk: $ctrl.$stateParams.id}"
filter="::$ctrl.filter"
limit="20"
data="$ctrl.clientDms">
</vn-crud-model>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="dmsFk" default-order="DESC" number>File</vn-th>
<vn-th>Description</vn-th>
<vn-th>Reference</vn-th>
<vn-th number>Hard copy</vn-th>
<vn-th>Worker</vn-th>
<vn-th>Created</vn-th>
<vn-th></vn-th>
<vn-th></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="document in $ctrl.clientDms">
<vn-td number>{{::document.dmsFk}}</vn-td>
<vn-td title = "{{::document.dms.description}}">
{{::document.dms.description}}</vn-td>
</vn-td>
<vn-td>{{::document.dms.reference}}</vn-td>
<vn-td number>{{::document.dms.hardCopyNumber | dashIfEmpty}}</vn-td>
<vn-td>
<span class="link"
ng-click="$ctrl.showWorkerDescriptor($event, document.dms.workerFk)">
{{::document.dms.worker.user.nickname | dashIfEmpty}}
</span>
</vn-td>
<vn-td>{{::document.dms.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td center>
<vn-icon-button
vn-tooltip="Remove file"
icon="delete"
ng-click="$ctrl.showDeleteConfirm(document.dmsFk)"
tabindex="-1">
</vn-icon-button>
</vn-td>
<vn-td center>
<a
target="_blank"
href="api/dms/{{::document.dmsFk}}/download?access_token={{::$ctrl.accessToken}}">
<vn-icon-button
icon="cloud_download"
title="{{'Download file' | translate}}">
</vn-icon-button>
</a>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-vertical>
<vn-pagination model="model"></vn-pagination>
</vn-card>
</vn-vertical>
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-confirm
vn-id="confirm"
message="This file will be deleted"
question="Are you sure?"
on-response="$ctrl.deleteDms(response)">
</vn-confirm>