comparison client/src/components/systemconfiguration/PDFTemplates.vue @ 2462:9ae2a2f758bb

client: make use of new table header/body components
author Markus Kottlaender <markus@intevation.de>
date Mon, 04 Mar 2019 14:50:23 +0100
parents 408e0f4d4008
children 24bab584f0a1
comparison
equal deleted inserted replaced
2461:b60efa7d4cee 2462:9ae2a2f758bb
9 type="file" 9 type="file"
10 style="visibility:hidden" 10 style="visibility:hidden"
11 /> 11 />
12 </div> 12 </div>
13 <div class="mt-1 border-bottom pb-4"> 13 <div class="mt-1 border-bottom pb-4">
14 <transition name="fade"> 14 <UITableHeader
15 <table class="table table-sm table-hover" v-if="templates.length"> 15 :columns="[
16 <thead> 16 { id: 'name', title: 'Name', class: 'col-4' },
17 <tr> 17 { id: 'date', title: 'Date', class: 'col-4' },
18 <th><translate>Name</translate></th> 18 { id: 'country', title: 'Country', class: 'col-2' }
19 <th><translate>Date</translate></th> 19 ]"
20 <th><translate>Country</translate></th> 20 :sortable="false"
21 <th></th> 21 />
22 </tr> 22 <UITableBody :data="templates" v-slot="{ item: template }">
23 </thead> 23 <div class="py-2 col-4">{{ template.name }}</div>
24 <transition-group name="fade" tag="tbody"> 24 <div class="py-2 col-4">{{ template.time }}</div>
25 <tr v-for="template in templates" :key="template.name"> 25 <div class="py-2 col-2" v-if="template.country">
26 <td>{{ template.name }}</td> 26 {{ template.country }}
27 <td>{{ template.time }}</td> 27 </div>
28 <td v-if="template.country">{{ template.country }}</td> 28 <div class="py-2 col-2" v-else><i>global</i></div>
29 <td v-else><i>global</i></td> 29 <div class="col py-2 text-right">
30 <td class="text-right"> 30 <button class="btn btn-sm btn-dark" @click="deleteTemplate(template)">
31 <button 31 <font-awesome-icon icon="trash" />
32 class="btn btn-sm btn-dark" 32 </button>
33 @click="deleteTemplate(template)" 33 </div>
34 > 34 </UITableBody>
35 <font-awesome-icon icon="trash" />
36 </button>
37 </td>
38 </tr>
39 </transition-group>
40 </table>
41 </transition>
42 <button class="btn btn-info mt-2" @click="$refs.uploadTemplate.click()"> 35 <button class="btn btn-info mt-2" @click="$refs.uploadTemplate.click()">
43 <font-awesome-icon 36 <font-awesome-icon
44 icon="spinner" 37 icon="spinner"
45 class="fa-spin fa-fw" 38 class="fa-spin fa-fw"
46 v-if="uploading" 39 v-if="uploading"