- Create single page of an Event (to share on FB for example).

This commit is contained in:
Paolo Arena
2019-11-07 23:11:05 +01:00
parent 5393092542
commit 8ba6c8361b
11 changed files with 176 additions and 41 deletions

View File

@@ -48,6 +48,7 @@ export default class CEventsCalendar extends MixinEvents {
public $t: any public $t: any
public calendarView = 'month' public calendarView = 'month'
public selectedDate = '2019-04-01' public selectedDate = '2019-04-01'
public tabeditor: string = 'details'
public formDefault: IEvents = { public formDefault: IEvents = {
title: '', title: '',
details: '', details: '',
@@ -497,6 +498,13 @@ export default class CEventsCalendar extends MixinEvents {
return (this.isAlreadyBooked(event) ? 'text-left bg-light-green-1' : 'text-left') return (this.isAlreadyBooked(event) ? 'text-left bg-light-green-1' : 'text-left')
} }
public checkFieldUndef() {
if (this.eventForm.bodytext === undefined)
this.eventForm.bodytext = ''
if (this.eventForm.details === undefined)
this.eventForm.details = ''
}
public editEvent(eventparam) { public editEvent(eventparam) {
console.log('editEvent - INIZIO') console.log('editEvent - INIZIO')
this.resetForm() this.resetForm()
@@ -505,6 +513,8 @@ export default class CEventsCalendar extends MixinEvents {
this.eventForm = { ...eventparam } this.eventForm = { ...eventparam }
this.checkFieldUndef()
this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(eventparam.dateTimeStart) this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(eventparam.dateTimeStart)
this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(eventparam.dateTimeEnd) this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(eventparam.dateTimeEnd)

View File

@@ -75,7 +75,7 @@
<img :src="`../../statics/images/avatar/` + getWhereIcon(myevent.wherecode)"> <img :src="`../../statics/images/avatar/` + getWhereIcon(myevent.wherecode)">
</q-avatar> </q-avatar>
<q-avatar v-else color="blue" font-size="20px" text-color="white" icon="home"> <q-avatar v-else color="blue" font-size="20px" text-color="white" icon="home">
</q-avatar> </q-avatar>showpage
<span class="cal__teacher-content">{{getWhereName(myevent.wherecode)}}</span> <span class="cal__teacher-content">{{getWhereName(myevent.wherecode)}}</span>
</q-chip> </q-chip>
</span> </span>
@@ -93,7 +93,7 @@
</div> </div>
<p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center"> <p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center">
<q-btn size="md" type="a" :href="`../../statics/` + myevent.linkpdf" <q-btn size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
target="_blank" rounded color="primary" icon="info" :label="$t('cal.showinfo')"> target="_blank" rounded color="primary" icon="info" :label="$t('cal.showpdf')">
</q-btn> </q-btn>
</p> </p>
</div> </div>
@@ -132,9 +132,35 @@
borderless rounded dense :label="$t('event.title')" borderless rounded dense :label="$t('event.title')"
:rules="[v => v && v.length > 0 || $t('event.notempty')]"></q-input> :rules="[v => v && v.length > 0 || $t('event.notempty')]"></q-input>
<CMyEditor :value.sync="eventForm.details">
</CMyEditor> <q-tabs
v-model="tabeditor"
dense
class="text-grey"
active-color="primary"
indicator-color="primary"
align="justify"
narrow-indicator
>
<q-tab name="details" label="Descrizione"/>
<q-tab name="container" label="Contenuto"/>
</q-tabs>
<q-tab-panels v-model="tabeditor" animated>
<q-tab-panel name="details">
<CMyEditor :value.sync="eventForm.details">
</CMyEditor>
</q-tab-panel>
<q-tab-panel name="container">
<CMyEditor :value.sync="eventForm.bodytext">
</CMyEditor>
</q-tab-panel>
</q-tab-panels>
<!--<q-checkbox v-model="eventForm.allday" :label="$t('cal.alldayevent')"></q-checkbox>--> <!--<q-checkbox v-model="eventForm.allday" :label="$t('cal.alldayevent')"></q-checkbox>-->
@@ -304,7 +330,7 @@
<p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center"> <p v-if="myevent.linkpdf" style="margin-top: 10px; text-align: center">
<q-btn size="md" type="a" :href="`../../statics/` + myevent.linkpdf" <q-btn size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
target="_blank" rounded color="primary" icon="info" :label="$t('cal.showinfo')"> target="_blank" rounded color="primary" icon="info" :label="$t('cal.showpdf')">
</q-btn> </q-btn>
</p> </p>
</div> </div>
@@ -377,7 +403,7 @@
<!-- the calendar --> <!-- the calendar -->
<q-page v-if="visuAllCal" class="column" style="min-height: 500px !important;"> <q-page v-if="visuAllCal" class="column" style="min-height: 500px !important;">
<div > <div>
<q-toolbar class="mytoolbar"> <q-toolbar class="mytoolbar">
<q-btn color="primary" round icon="keyboard_arrow_left" @click="calendarPrev"/> <q-btn color="primary" round icon="keyboard_arrow_left" @click="calendarPrev"/>
<q-btn color="primary" round icon="keyboard_arrow_right" @click="calendarNext"/> <q-btn color="primary" round icon="keyboard_arrow_right" @click="calendarNext"/>
@@ -669,16 +695,20 @@
</div> </div>
<p class="text-center">
<span v-if="event.linkpdf" class="">
<q-btn size="md" type="a" :href="`../../statics/` + event.linkpdf"
target="_blank" rounded color="primary" icon="info"
:label="$t('cal.showinfo')">
</q-btn>
</span>
</p>
<div class="row justify-end"> <div class="row justify-end">
<div class="justify-start">
<q-btn v-if="event.linkpdf" size="md" type="a"
:href="`../../statics/` + event.linkpdf"
target="_blank" rounded color="primary" icon="info"
:label="$t('cal.showpdf')">
</q-btn>
<q-btn v-if="event.bodytext" rounded outline class="q-mx-sm"
color="primary"
:to="`/event/` + event._id"
:label="$t('event.showpage')">
</q-btn>
</div>
<q-btn rounded outline class="q-mx-sm" <q-btn rounded outline class="q-mx-sm"
color="primary" @click="askForInfoEventMenu(event)" color="primary" @click="askForInfoEventMenu(event)"
:label="$t('event.askinfo')"> :label="$t('event.askinfo')">

View File

@@ -35,6 +35,7 @@ export default class CMyPage extends Vue {
@Prop({ required: false, default: '' }) public img: string @Prop({ required: false, default: '' }) public img: string
@Prop({ required: false, default: '' }) public imgbackground: string @Prop({ required: false, default: '' }) public imgbackground: string
@Prop({ required: false, default: '' }) public sizes: string @Prop({ required: false, default: '' }) public sizes: string
@Prop({ required: false, default: '' }) public styleadd: string
public $t public $t
public $q public $q

View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<CTitle v-if="imgbackground" :imgbackground="imgbackground" <CTitle v-if="imgbackground" :imgbackground="imgbackground"
:headtitle="title" :sizes="sizes"></CTitle> :headtitle="title" :sizes="sizes" :styleadd="styleadd"></CTitle>
<div v-if="!imgbackground"> <div v-if="!imgbackground">
<CImgTitle v-if="img" :src="img" :title="title"> <CImgTitle v-if="img" :src="img" :title="title">
</CImgTitle> </CImgTitle>

View File

@@ -1,3 +1,5 @@
$graytext: #555;
.listaev { .listaev {
color: black; color: black;
font-size: 0.75rem; font-size: 0.75rem;
@@ -84,3 +86,84 @@
} }
} }
.cal {
color: black;
font-size: 0.75rem;
font-weight: 400;
line-height: 1.25rem;
letter-spacing: 0.03333em;
&__title {
color: white;
font-weight: 700;
font-size: 1rem;
padding-bottom: 10px;
}
&__details {
color: black;
}
&__hours {
color: blue;
&-title {
color: $graytext;
}
&-content {
font-weight: 400;
}
}
&__where {
margin-top: 5px;
color: blue;
&-title {
color: $graytext;
}
&-content {
color: darkblue;
}
}
&__when {
margin-top: 5px;
color: blue;
&-title {
color: $graytext;
}
&-content {
color: darkblue;
}
}
&__teacher {
margin-top: 5px;
&-title {
color: $graytext;
}
&-content {
color: darkblue;
}
}
&__quota {
margin-top: 5px;
&-title {
color: $graytext;
}
&-content {
}
}
&__img {
width: 100px;
height: 100px;
padding: 10px;
}
}

View File

@@ -2,7 +2,7 @@
<div> <div>
<CMyPage v-if="myevent" :imgbackground="myevent.img" :title="myevent.title" keywords="" description=""> <CMyPage v-if="myevent" :imgbackground="myevent.img" :title="myevent.title" keywords="" description="">
<div class="q-ma-md"> <div class="q-mx-md">
<div class="listaev__align_chips q-ma-md"> <div class="listaev__align_chips q-ma-md">
<img :src="getImgEvent(myevent)" <img :src="getImgEvent(myevent)"
@click="selectEvent(myevent)" @click="selectEvent(myevent)"
@@ -79,7 +79,7 @@
<div style="margin: 10px;"></div> <div style="margin: 10px;"></div>
<p v-if="myevent.bodytext" class="listaev__details text-left" v-html="myevent.bodytext"></p> <p v-if="myevent.bodytext" class="listaev__details text-left q-mb-md" v-html="myevent.bodytext"></p>
<p v-else class="listaev__details" v-html="myevent.details"></p> <p v-else class="listaev__details" v-html="myevent.details"></p>
<div v-if="myevent.teacher" class=""> <div v-if="myevent.teacher" class="">
@@ -97,7 +97,7 @@
<span class="cal__teacher-content">{{getTeacherByUsername(myevent.teacher2)}}</span> <span class="cal__teacher-content">{{getTeacherByUsername(myevent.teacher2)}}</span>
</q-chip> </q-chip>
<span v-if="myevent.wherecode" class=""> <span v-if="myevent.wherecode" class="q-ma-md">
<span v-if="tools.isMobile()"><br/></span> <span v-if="tools.isMobile()"><br/></span>
<span class="cal__where-title">{{$t('cal.where')}}: </span> <span class="cal__where-title">{{$t('cal.where')}}: </span>
@@ -112,7 +112,7 @@
</q-chip> </q-chip>
</span> </span>
</div> </div>
<div v-if="myevent.contribtype" class=""> <div v-if="myevent.contribtype" class="q-ma-sm">
<span class="cal__quota-title">{{$t('event.price')}}:<span <span class="cal__quota-title">{{$t('event.price')}}:<span
class="margin_with"></span></span> class="margin_with"></span></span>
<span v-if="!isShowPrice(myevent)" class=""> <span v-if="!isShowPrice(myevent)" class="">
@@ -128,21 +128,26 @@
</div> </div>
<p class="text-center"> <div class="row justify-start q-ma-md">
<span v-if="myevent.linkpdf" class=""> <q-btn v-if="myevent.linkpdf"
<q-btn size="md" type="a" :href="`../../statics/` + myevent.linkpdf" size="md" type="a" :href="`../../statics/` + myevent.linkpdf"
target="_blank" rounded color="primary" icon="info" target="_blank" rounded outline
:label="$t('cal.showinfo')"> color="primary" icon="info"
:label="$t('cal.showpdf')">
</q-btn> </q-btn>
</span> <q-btn v-if="myevent.bodytext" rounded outline class="q-mx-sm"
</p> color="primary"
<div class="row justify-end"> :to="`/event/` + myevent._id"
:label="$t('event.showpage')">
</q-btn>
</div>
<div class="row justify-end q-ma-md">
<q-btn rounded outline class="q-mx-sm" <q-btn rounded outline class="q-mx-sm"
color="primary" @click="askForInfoEventMenu(myevent)" color="primary" @click="askForInfoEventMenu(myevent)"
:label="$t('event.askinfo')"> :label="$t('event.askinfo')">
</q-btn> </q-btn>
<q-btn rounded outline class="q-mx-sm" <q-btn rounded class="q-mx-sm"
v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS" v-if="!myevent.nobookable && !isAlreadyBooked(myevent) && static_data.functionality.BOOKING_EVENTS"
color="primary" @click="addBookEventMenu(myevent)" color="primary" @click="addBookEventMenu(myevent)"
:label="$t('cal.booking')" :disable="!isEventEnabled(myevent)"> :label="$t('cal.booking')" :disable="!isEventEnabled(myevent)">

View File

@@ -10,10 +10,11 @@ import { Screen } from 'quasar'
name: 'CTitle' name: 'CTitle'
}) })
export default class CTitle extends Vue { export default class CTitle extends Vue {
@Prop({ required: true }) public headtitle: string
@Prop({ required: false, default: '' }) public imgbackground: string @Prop({ required: false, default: '' }) public imgbackground: string
@Prop({ required: false, default: '' }) public imghead: string @Prop({ required: false, default: '' }) public imghead: string
@Prop({ required: false, default: '' }) public sizes: string @Prop({ required: false, default: '' }) public sizes: string
@Prop({ required: true }) public headtitle: string @Prop({ required: false, default: '' }) public styleadd: string
get tools() { get tools() {
return tools return tools

View File

@@ -3,7 +3,7 @@
<q-img v-if="imgbackground" :src="getsrc" <q-img v-if="imgbackground" :src="getsrc"
:style="tools.styles_imgtitle(sizes)"> :style="tools.styles_imgtitle(sizes)">
<div class="absolute-bottom text-body1 text-center"> <div class="absolute-bottom text-body1 text-center" :style="styleadd">
<h2 class="titletext">{{headtitle}}</h2> <h2 class="titletext">{{headtitle}}</h2>
</div> </div>
</q-img> </q-img>

View File

@@ -30,7 +30,7 @@ export default class Footer extends Vue {
return tools return tools
} }
get mythis() { get mythisfoot() {
return this return this
} }

View File

@@ -98,16 +98,16 @@
<div v-if="myitemmenu.infooter"> <div v-if="myitemmenu.infooter">
<div v-if="myitemmenu.solotitle"> <div v-if="myitemmenu.solotitle">
<span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythis)}}</span><br/> <span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
</div> </div>
<div v-else> <div v-else>
<router-link :to="myitemmenu.path"> <router-link :to="myitemmenu.path">
<span class="footer_link"><span <span class="footer_link"><span
v-if="myitemmenu.level_child > 0">&nbsp;&nbsp;&nbsp;</span> v-if="myitemmenu.level_child > 0">&nbsp;&nbsp;&nbsp;</span>
{{tools.getLabelByItem(myitemmenu, mythis)}}</span><br/> {{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
</router-link> </router-link>
</div> </div>
<!--<a :href="myitemmenu.path"><span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythis)}}</span></a><br/>--> <!--<a :href="myitemmenu.path"><span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span></a><br/>-->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -247,7 +247,7 @@ const msgglobal = {
selnumpeople: 'Partecipanti', selnumpeople: 'Partecipanti',
selnumpeople_short: 'Num', selnumpeople_short: 'Num',
msgbooking: 'Messaggio da inviare', msgbooking: 'Messaggio da inviare',
showinfo: 'Vedi Info', showpdf: 'Vedi PDF',
bookingtextdefault: 'Mi prenoto all\'evento', bookingtextdefault: 'Mi prenoto all\'evento',
bookingtextdefault_of: 'di', bookingtextdefault_of: 'di',
data: 'Data', data: 'Data',
@@ -277,6 +277,7 @@ const msgglobal = {
contribtype: 'Tipo Contributo', contribtype: 'Tipo Contributo',
price: 'Contributo', price: 'Contributo',
askinfo: 'Chiedi Info', askinfo: 'Chiedi Info',
showpage: 'Vedi Pagina',
infoafterprice: 'Note dopo la Quota', infoafterprice: 'Note dopo la Quota',
teacher: 'Insegnante', // teacherid teacher: 'Insegnante', // teacherid
teacher2: 'Insegnante2', // teacherid2 teacher2: 'Insegnante2', // teacherid2
@@ -546,7 +547,7 @@ const msgglobal = {
selnumpeople: 'Partecipantes', selnumpeople: 'Partecipantes',
selnumpeople_short: 'Num', selnumpeople_short: 'Num',
msgbooking: 'Mensaje para enviar', msgbooking: 'Mensaje para enviar',
showinfo: 'Ver Info', showpdf: 'Ver PDF',
bookingtextdefault: 'Reservo el evento', bookingtextdefault: 'Reservo el evento',
bookingtextdefault_of: 'de', bookingtextdefault_of: 'de',
data: 'Fecha', data: 'Fecha',
@@ -576,6 +577,7 @@ const msgglobal = {
contribtype: 'Tipo de Contribución', contribtype: 'Tipo de Contribución',
price: 'Precio', price: 'Precio',
askinfo: 'Solicitar información', askinfo: 'Solicitar información',
showpage: 'Ver página',
infoafterprice: 'notas después del precio', infoafterprice: 'notas después del precio',
teacher: 'Profesor', // teacherid teacher: 'Profesor', // teacherid
teacher2: 'Profesor2', // teacherid2 teacher2: 'Profesor2', // teacherid2
@@ -844,7 +846,7 @@ const msgglobal = {
selnumpeople: 'Participants', selnumpeople: 'Participants',
selnumpeople_short: 'Num', selnumpeople_short: 'Num',
msgbooking: 'Message à envoyer', msgbooking: 'Message à envoyer',
showinfo: 'Voir Info', showpdf: 'Voir PDF',
bookingtextdefault: 'Je réserve l\'événement', bookingtextdefault: 'Je réserve l\'événement',
bookingtextdefault_of: 'du', bookingtextdefault_of: 'du',
data: 'Date', data: 'Date',
@@ -874,6 +876,7 @@ const msgglobal = {
contribtype: 'Type de contribution', contribtype: 'Type de contribution',
price: 'Prix', price: 'Prix',
askinfo: 'Demander des infos', askinfo: 'Demander des infos',
showpage: 'Voir la page',
infoafterprice: 'Notes après le prix', infoafterprice: 'Notes après le prix',
teacher: 'Enseignant', // teacherid teacher: 'Enseignant', // teacherid
teacher2: 'Enseignant2', // teacherid2 teacher2: 'Enseignant2', // teacherid2
@@ -1141,7 +1144,7 @@ const msgglobal = {
selnumpeople: 'Participants', selnumpeople: 'Participants',
selnumpeople_short: 'Num', selnumpeople_short: 'Num',
msgbooking: 'Message to send', msgbooking: 'Message to send',
showinfo: 'Show Info', showpdf: 'Show PDF',
bookingtextdefault: 'I book the event', bookingtextdefault: 'I book the event',
bookingtextdefault_of: 'of', bookingtextdefault_of: 'of',
data: 'Date', data: 'Date',
@@ -1171,6 +1174,7 @@ const msgglobal = {
contribtype: 'Contribute Type', contribtype: 'Contribute Type',
price: 'Price', price: 'Price',
askinfo: 'Ask for Info', askinfo: 'Ask for Info',
showpage: 'Show Page',
infoafterprice: 'Info after Price', infoafterprice: 'Info after Price',
teacher: 'Teacher', // teacherid teacher: 'Teacher', // teacherid
teacher2: 'Teacher2', // teacherid2 teacher2: 'Teacher2', // teacherid2
@@ -1440,7 +1444,7 @@ const msgglobal = {
selnumpeople: 'Participants', selnumpeople: 'Participants',
selnumpeople_short: 'Num', selnumpeople_short: 'Num',
msgbooking: 'Message to send', msgbooking: 'Message to send',
showinfo: 'Show Info', showpdf: 'Show PDF',
bookingtextdefault: 'I book the event', bookingtextdefault: 'I book the event',
bookingtextdefault_of: 'of', bookingtextdefault_of: 'of',
data: 'Date', data: 'Date',
@@ -1470,6 +1474,7 @@ const msgglobal = {
contribtype: 'Contribute Type', contribtype: 'Contribute Type',
price: 'Price', price: 'Price',
askinfo: 'Ask for Info', askinfo: 'Ask for Info',
showpage: 'Show Page',
infoafterprice: 'Info after Price', infoafterprice: 'Info after Price',
teacher: 'Teacher', // teacherid teacher: 'Teacher', // teacherid
teacher2: 'Teacher2', // teacherid2 teacher2: 'Teacher2', // teacherid2