improve grid layout
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template lang="pug">
|
||||
.when
|
||||
v-col(cols=12)
|
||||
.text-center
|
||||
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-model='type' color='primary' @change='type => change("type", type)')
|
||||
v-btn(value='normal' label="normal") {{$t('event.normal')}}
|
||||
|
||||
@@ -90,7 +90,6 @@ export default {
|
||||
// check if contain an h-event
|
||||
this.$emit('imported', ret[0])
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
this.error = true
|
||||
this.errorMessage = String(e)
|
||||
}
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<template lang="pug">
|
||||
v-row
|
||||
v-combobox.col-md-6(ref='place'
|
||||
:rules="[$validators.required('common.where')]"
|
||||
:label="$t('common.where')"
|
||||
:hint="$t('event.where_description')"
|
||||
:search-input.sync="placeName"
|
||||
prepend-icon='mdi-map-marker'
|
||||
persistent-hint
|
||||
:value="value.name"
|
||||
:items="filteredPlaces"
|
||||
no-filter
|
||||
item-text='name'
|
||||
@change='selectPlace')
|
||||
template(v-slot:item="{ item }")
|
||||
v-list-item-content(two-line v-if='item.create')
|
||||
v-list-item-title <v-icon color='primary'>mdi-plus</v-icon> {{item.name}}
|
||||
v-list-item-content(two-line v-else)
|
||||
v-list-item-title {{item.name}}
|
||||
v-list-item-subtitle {{item.address}}
|
||||
v-col(cols=12 md=6)
|
||||
v-combobox(ref='place'
|
||||
:rules="[$validators.required('common.where')]"
|
||||
:label="$t('common.where')"
|
||||
:hint="$t('event.where_description')"
|
||||
:search-input.sync="placeName"
|
||||
prepend-icon='mdi-map-marker'
|
||||
persistent-hint
|
||||
:value="value.name"
|
||||
:items="filteredPlaces"
|
||||
no-filter
|
||||
item-text='name'
|
||||
@change='selectPlace')
|
||||
template(v-slot:item="{ item }")
|
||||
v-list-item-content(two-line v-if='item.create')
|
||||
v-list-item-title <v-icon color='primary'>mdi-plus</v-icon> {{item.name}}
|
||||
v-list-item-content(two-line v-else)
|
||||
v-list-item-title {{item.name}}
|
||||
v-list-item-subtitle {{item.address}}
|
||||
|
||||
v-text-field.col-md-6(ref='address'
|
||||
prepend-icon='mdi-map'
|
||||
:disabled='disableAddress'
|
||||
:rules="[ v => disableAddress ? true : $validators.required('common.address')(v)]"
|
||||
:label="$t('common.address')"
|
||||
@change="changeAddress"
|
||||
:value="value.address")
|
||||
v-col(cols=12 md=6)
|
||||
v-text-field(ref='address'
|
||||
prepend-icon='mdi-map'
|
||||
:disabled='disableAddress'
|
||||
:rules="[ v => disableAddress ? true : $validators.required('common.address')(v)]"
|
||||
:label="$t('common.address')"
|
||||
@change="changeAddress"
|
||||
:value="value.address")
|
||||
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -14,49 +14,54 @@
|
||||
v-container
|
||||
v-row
|
||||
//- Not logged event
|
||||
v-col.col-12(v-if='!$auth.loggedIn')
|
||||
v-col(v-if='!$auth.loggedIn' cols=12)
|
||||
p(v-html="$t('event.anon_description')")
|
||||
|
||||
//- Title
|
||||
v-text-field.col-12(
|
||||
@change='v => event.title = v'
|
||||
:value = 'event.title'
|
||||
:rules="[$validators.required('common.title')]"
|
||||
prepend-icon='mdi-format-title'
|
||||
:label="$t('common.title')"
|
||||
autofocus
|
||||
ref='title')
|
||||
v-col(cols=12)
|
||||
v-text-field(
|
||||
@change='v => event.title = v'
|
||||
:value = 'event.title'
|
||||
:rules="[$validators.required('common.title')]"
|
||||
prepend-icon='mdi-format-title'
|
||||
:label="$t('common.title')"
|
||||
autofocus
|
||||
ref='title')
|
||||
|
||||
//- Where
|
||||
WhereInput.col-12(v-model='event.place')
|
||||
v-col(cols=12)
|
||||
WhereInput(v-model='event.place')
|
||||
|
||||
//- When
|
||||
DateInput.col-12(v-model='date')
|
||||
DateInput(v-model='date')
|
||||
|
||||
//- Description
|
||||
Editor.col-12.mb-3(
|
||||
:label="$t('event.description_description')"
|
||||
v-model='event.description'
|
||||
:placeholder="$t('event.description_description')"
|
||||
max-height='400px')
|
||||
v-col.px-0(cols='12')
|
||||
Editor.px-3.ma-0(
|
||||
:label="$t('event.description_description')"
|
||||
v-model='event.description'
|
||||
:placeholder="$t('event.description_description')"
|
||||
max-height='400px')
|
||||
|
||||
//- MEDIA / FLYER / POSTER
|
||||
v-file-input.col-12.col-sm-6.mt-3(
|
||||
:label="$t('common.media')"
|
||||
:hint="$t('event.media_description')"
|
||||
prepend-icon="mdi-camera"
|
||||
v-model='event.image'
|
||||
persistent-hint
|
||||
accept='image/*')
|
||||
v-col(cols=12 md=6)
|
||||
v-file-input(
|
||||
:label="$t('common.media')"
|
||||
:hint="$t('event.media_description')"
|
||||
prepend-icon="mdi-camera"
|
||||
v-model='event.image'
|
||||
persistent-hint
|
||||
accept='image/*')
|
||||
|
||||
//- tags
|
||||
v-combobox.col-12.col-sm-6.mt-3(v-model='event.tags'
|
||||
prepend-icon="mdi-tag-multiple"
|
||||
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||
:delimiters="[',', ' ']"
|
||||
:items="tags.map(t => t.tag)"
|
||||
:label="$t('common.tags')")
|
||||
v-img.col-12.col-sm-2.ml-3(v-if='mediaPreview' :src='mediaPreview')
|
||||
v-col(cols=12 md=6)
|
||||
v-combobox(v-model='event.tags'
|
||||
prepend-icon="mdi-tag-multiple"
|
||||
chips small-chips multiple deletable-chips hide-no-data hide-selected persistent-hint
|
||||
:delimiters="[',', ' ']"
|
||||
:items="tags.map(t => t.tag)"
|
||||
:label="$t('common.tags')")
|
||||
v-img.col-12.col-sm-2.ml-3(v-if='mediaPreview' :src='mediaPreview')
|
||||
|
||||
v-card-actions
|
||||
v-spacer
|
||||
@@ -118,7 +123,6 @@ export default {
|
||||
return {
|
||||
valid: false,
|
||||
openImportDialog: false,
|
||||
openMediaDialog: false,
|
||||
event: {
|
||||
place: { name: '', address: '' },
|
||||
title: '',
|
||||
@@ -163,6 +167,7 @@ export default {
|
||||
fromHour: true,
|
||||
dueHour: true
|
||||
}
|
||||
this.openImportDialog = false
|
||||
},
|
||||
cleanFile () {
|
||||
this.event.image = {}
|
||||
|
||||
Reference in New Issue
Block a user