skip an occurrence of recurring event
This commit is contained in:
@@ -29,6 +29,10 @@ html, body {
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
#__nuxt, #__layout {
|
#__nuxt, #__layout {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -118,6 +122,8 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-menu-item {
|
.el-menu-item {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
a {
|
a {
|
||||||
color: #303133;
|
color: #303133;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -8,11 +8,15 @@
|
|||||||
.p-name.p-summary.title {{event.title}}
|
.p-name.p-summary.title {{event.title}}
|
||||||
|
|
||||||
.card-body
|
.card-body
|
||||||
|
//- when
|
||||||
div
|
div
|
||||||
i.el-icon-date
|
i.el-icon-date
|
||||||
time.dt-start(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') {{event|when}}
|
time.dt-start(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")') {{event|when}}
|
||||||
|
|
||||||
|
//- place
|
||||||
el-button.p-location.mt-1.bg-dark.text-warning.float-right(plain size='mini' round type='text' icon='el-icon-location-outline' @click='addPlace') {{event.place.name}}
|
el-button.p-location.mt-1.bg-dark.text-warning.float-right(plain size='mini' round type='text' icon='el-icon-location-outline' @click='addPlace') {{event.place.name}}
|
||||||
//- date / place
|
|
||||||
|
//- description
|
||||||
.description.p-description.mt-3(v-if='!event.image_path || !event.tags.length' v-html='description')
|
.description.p-description.mt-3(v-if='!event.image_path || !event.tags.length' v-html='description')
|
||||||
|
|
||||||
.card-footer(v-if='event.tags.length')
|
.card-footer(v-if='event.tags.length')
|
||||||
|
|||||||
@@ -75,7 +75,8 @@
|
|||||||
"event": "Evento",
|
"event": "Evento",
|
||||||
"pause": "Pausa",
|
"pause": "Pausa",
|
||||||
"start": "Avvia",
|
"start": "Avvia",
|
||||||
"fediverse": "Fediverso"
|
"fediverse": "Fediverso",
|
||||||
|
"skip": "Salta"
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"description": "Entrando puoi pubblicare nuovi eventi.",
|
"description": "Entrando puoi pubblicare nuovi eventi.",
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
<template lang='pug'>
|
<template lang='pug'>
|
||||||
div
|
div
|
||||||
el-divider {{$t('common.admin')}}
|
el-divider {{$t('common.admin')}}
|
||||||
|
|
||||||
el-menu.menu
|
el-menu.menu
|
||||||
el-menu-item
|
el-menu-item
|
||||||
div(v-if='event.is_visible' @click='toggle(false)') <i class='el-icon-open'/> {{$t('common.hide')}}
|
div(v-if='event.is_visible' @click='toggle(false)') <i class='el-icon-open'/> {{$t(`common.${event.parentId?'skip':'hide'}`)}}
|
||||||
div(v-else @click='toggle(false)') <i class='el-icon-turn-off'/> {{$t('common.confirm')}}
|
div(v-else @click='toggle(false)') <i class='el-icon-turn-off'/> {{$t('common.confirm')}}
|
||||||
el-menu-item(@click='$router.replace(`/add/${event.id}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
|
el-menu-item(@click='$router.replace(`/add/${event.id}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
|
||||||
el-menu-item(@click='remove(false)') <i class='el-icon-delete'/> {{$t('common.remove')}}
|
el-menu-item(v-if='!event.parentId' @click='remove(false)') <i class='el-icon-delete'/> {{$t('common.remove')}}
|
||||||
div(v-if='event.parentId')
|
|
||||||
el-divider {{$t('event.recurrent')}}
|
template(v-if='event.parentId')
|
||||||
|
el-divider {{$t('event.recurrent')}}
|
||||||
|
p.text-secondary
|
||||||
|
i.el-icon-refresh
|
||||||
|
small {{event|recurrentDetail}}<br/>
|
||||||
el-menu-item(v-if='event.parent.is_visible' @click='toggle(true)') <i class='el-icon-video-pause'/> {{$t('common.pause')}}
|
el-menu-item(v-if='event.parent.is_visible' @click='toggle(true)') <i class='el-icon-video-pause'/> {{$t('common.pause')}}
|
||||||
el-menu-item(v-else @click='toggle(true)') <i class='el-icon-video-play'/> {{$t('common.start')}}
|
el-menu-item(v-else @click='toggle(true)') <i class='el-icon-video-play'/> {{$t('common.start')}}
|
||||||
el-menu-item(@click='$router.replace(`/add/${event.parentId}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
|
el-menu-item(@click='$router.replace(`/add/${event.parentId}`)') <i class='el-icon-edit'/> {{$t('common.edit')}}
|
||||||
|
|||||||
@@ -22,6 +22,18 @@ export default ({ app, store }) => {
|
|||||||
Vue.filter('to', timestamp => moment.unix(timestamp).to())
|
Vue.filter('to', timestamp => moment.unix(timestamp).to())
|
||||||
// format event start/end datetime based on page
|
// format event start/end datetime based on page
|
||||||
|
|
||||||
|
Vue.filter('recurrentDetail', event => {
|
||||||
|
const { frequency, days, type } = event.parent.recurrent
|
||||||
|
let recurrent
|
||||||
|
if (frequency === '1w' || frequency === '2w') {
|
||||||
|
recurrent = app.i18n.tc(`event.recurrent_${frequency}_days`, days.length, { days: days.map(d => moment().day(d - 1).format('dddd')) })
|
||||||
|
} else if (frequency === '1m' || frequency === '2m') {
|
||||||
|
const d = type === 'ordinal' ? days : days.map(d => moment().day(d - 1).format('dddd'))
|
||||||
|
recurrent = app.i18n.tc(`event.recurrent_${frequency}_${type}`, days.length, { days: d })
|
||||||
|
}
|
||||||
|
return recurrent
|
||||||
|
|
||||||
|
})
|
||||||
Vue.filter('when', (event) => {
|
Vue.filter('when', (event) => {
|
||||||
const start = moment.unix(event.start_datetime)
|
const start = moment.unix(event.start_datetime)
|
||||||
const end = moment.unix(event.end_datetime)
|
const end = moment.unix(event.end_datetime)
|
||||||
|
|||||||
Reference in New Issue
Block a user