Add user to attachments list

This commit is contained in:
kolaente 2020-03-04 20:35:00 +01:00
parent 2104d1ea4b
commit 2b5888805f
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -23,6 +23,7 @@
<th>Size</th> <th>Size</th>
<th>Type</th> <th>Type</th>
<th>Date</th> <th>Date</th>
<th>Created By</th>
<th>Action</th> <th>Action</th>
</tr> </tr>
<tr class="attachment" v-for="a in attachments" :key="a.id"> <tr class="attachment" v-for="a in attachments" :key="a.id">
@ -32,6 +33,7 @@
<td>{{ a.file.getHumanSize() }}</td> <td>{{ a.file.getHumanSize() }}</td>
<td>{{ a.file.mime }}</td> <td>{{ a.file.mime }}</td>
<td v-tooltip="formatDate(a.created)">{{ formatDateSince(a.created) }}</td> <td v-tooltip="formatDate(a.created)">{{ formatDateSince(a.created) }}</td>
<td><user :user="a.created_by" :avatar-size="30"/></td>
<td> <td>
<div class="buttons has-addons"> <div class="buttons has-addons">
<a class="button is-primary noshadow" @click="downloadAttachment(a)" v-tooltip="'Download this attachment'"> <a class="button is-primary noshadow" @click="downloadAttachment(a)" v-tooltip="'Download this attachment'">
@ -76,9 +78,13 @@
<script> <script>
import AttachmentService from '../../../services/attachment' import AttachmentService from '../../../services/attachment'
import AttachmentModel from '../../../models/attachment' import AttachmentModel from '../../../models/attachment'
import User from '../../global/user'
export default { export default {
name: 'attachments', name: 'attachments',
components: {
User,
},
data() { data() {
return { return {
attachments: [], attachments: [],