comparison client/src/components/systemconfiguration/PDFTemplates.vue @ 2874:b9a6abef9f1c

client: more unified table layout Expandable/collapsible rows are now also handled by the component
author Markus Kottlaender <markus@intevation.de>
date Mon, 01 Apr 2019 11:51:03 +0200
parents 9adbe0633bf9
children 106e1d011a5d
comparison
equal deleted inserted replaced
2873:b1707f60f241 2874:b9a6abef9f1c
16 { id: 'name', title: `${nameLabel}`, class: 'col-4' }, 16 { id: 'name', title: `${nameLabel}`, class: 'col-4' },
17 { id: 'time', title: `${dateLabel}`, class: 'col-4' }, 17 { id: 'time', title: `${dateLabel}`, class: 'col-4' },
18 { id: 'country', title: `${countryLabel}`, class: 'col-2' } 18 { id: 'country', title: `${countryLabel}`, class: 'col-2' }
19 ]" 19 ]"
20 /> 20 />
21 <UITableBody 21 <UITableBody :data="templates | sortTable(sortColumn, sortDirection)">
22 :data="templates | sortTable(sortColumn, sortDirection)" 22 <template v-slot:row="{ item: template }">
23 v-slot="{ item: template }" 23 <div class="py-1 col-4">{{ template.name }}</div>
24 > 24 <div class="py-1 col-4">{{ template.time }}</div>
25 <div class="py-1 col-4">{{ template.name }}</div> 25 <div class="py-1 col-2" v-if="template.country">
26 <div class="py-1 col-4">{{ template.time }}</div> 26 {{ template.country }}
27 <div class="py-1 col-2" v-if="template.country"> 27 </div>
28 {{ template.country }} 28 <div class="py-1 col-2" v-else><i>global</i></div>
29 </div> 29 <div class="col py-1 text-right">
30 <div class="py-1 col-2" v-else><i>global</i></div> 30 <button
31 <div class="col py-1 text-right"> 31 class="btn btn-xs btn-info mr-1"
32 <button 32 ref="downloadTemplate"
33 class="btn btn-xs btn-info mr-1" 33 @click="downloadTemplate(template)"
34 ref="downloadTemplate" 34 >
35 @click="downloadTemplate(template)" 35 <font-awesome-icon icon="download" fixed-width />
36 > 36 </button>
37 <font-awesome-icon icon="download" fixed-width /> 37 <button
38 </button> 38 class="btn btn-xs btn-dark"
39 <button class="btn btn-xs btn-dark" @click="deleteTemplate(template)"> 39 @click="deleteTemplate(template)"
40 <font-awesome-icon icon="trash" fixed-width /> 40 >
41 </button> 41 <font-awesome-icon icon="trash" fixed-width />
42 </div> 42 </button>
43 </div>
44 </template>
43 </UITableBody> 45 </UITableBody>
44 <button class="btn btn-info mt-2" @click="$refs.uploadTemplate.click()"> 46 <button class="btn btn-info mt-2" @click="$refs.uploadTemplate.click()">
45 <font-awesome-icon 47 <font-awesome-icon
46 icon="spinner" 48 icon="spinner"
47 class="fa-spin fa-fw" 49 class="fa-spin fa-fw"