fix internal routing

This commit is contained in:
lesion
2019-02-26 14:08:24 +01:00
parent e5f2e2eeda
commit aed2fdea3c
10 changed files with 27 additions and 123 deletions

View File

@@ -19,7 +19,7 @@
b-form-input.mt-1(v-model='mail.mail' :placeholder="$t('Insert your address')")
b-button.mt-1.float-right(variant='success' @click='activate_email') {{$t('Send')}}
b-form(v-if="type==='embed'" style='max-width: 400px;')
div(v-if="type==='embed'" style='max-width: 400px;')
el-switch(v-model='export_list' :active-text="$t('export_list')")
b-card(v-if='export_list' no-body header='Eventi')
b-list-group(flush)
@@ -33,6 +33,8 @@
b-badge.float-right.ml-1(v-for='tag in event.tags') {{tag.tag}}
small.float-right(v-b-popover.hover='event.place.address') {{event.place.name}}
Calendar(v-else)
br
b-form-textarea(v-model='script')
</template>
<script>
@@ -51,7 +53,8 @@ export default {
type: '',
link: '',
mail: {},
export_list: true
export_list: true,
script: `<iframe>Ti piacerebbe</iframe>`,
}
},
filters,
@@ -67,8 +70,20 @@ export default {
this.$router.go(-1)
},
loadLink () {
const filters = this.filters.tags.join(',')
return `${config.apiurl}/export/${this.type}/${filters}`
const tags = this.filters.tags.join(',')
const places = this.filters.places.join(',')
let query = ''
if (tags || places) {
query = '?'
if (tags) {
query += 'tags=' + tags
if (places) { query += '&places=' + places }
} else {
query += 'places=' + places
}
}
return `${config.apiurl}/export/${this.type}${query}`
},
imgPath (event) {
return event.image_path && config.apiurl + '/../' + event.image_path

View File

@@ -32,7 +32,7 @@
label.text-muted {{$t('time_end_explanation')}}
el-time-select(
v-model='time.end'
:picker-options="{start: `${event.multidate?'00:00':time.start}`, step: '00:30', end: '24:00'}"
:picker-options="{start: '00:00', step: '00:30', end: '24:00'}"
)
b-tab