diff --git a/client/web/compose/src/components/PageBlocks/CalendarBase.vue b/client/web/compose/src/components/PageBlocks/CalendarBase.vue
index fc8e26c2c..7bcc207a7 100644
--- a/client/web/compose/src/components/PageBlocks/CalendarBase.vue
+++ b/client/web/compose/src/components/PageBlocks/CalendarBase.vue
@@ -340,7 +340,18 @@ export default {
return
}
- this.$router.push({ name: 'page.record', params: { recordID, pageID: page.pageID } })
+ const route = { name: 'page.record', params: { recordID, pageID: page.pageID } }
+
+ if (this.options.eventDisplayOption === 'newTab') {
+ window.open(this.$router.resolve(route).href)
+ } else if (this.options.eventDisplayOption === 'modal') {
+ this.$root.$emit('show-record-modal', {
+ recordID,
+ recordPageID: page.pageID,
+ })
+ } else {
+ this.$router.push(route)
+ }
},
getHeight () {
diff --git a/client/web/compose/src/components/PageBlocks/CalendarConfigurator/CalendarDisplay.vue b/client/web/compose/src/components/PageBlocks/CalendarConfigurator/CalendarDisplay.vue
index 1a02047be..e28d69ff2 100644
--- a/client/web/compose/src/components/PageBlocks/CalendarConfigurator/CalendarDisplay.vue
+++ b/client/web/compose/src/components/PageBlocks/CalendarConfigurator/CalendarDisplay.vue
@@ -57,6 +57,23 @@
:options="views"
/>
+
+
+
+
+
+
+
+
diff --git a/lib/js/src/compose/types/page-block/calendar/page-block.ts b/lib/js/src/compose/types/page-block/calendar/page-block.ts
index 24f8c1f93..a5eb18b3b 100644
--- a/lib/js/src/compose/types/page-block/calendar/page-block.ts
+++ b/lib/js/src/compose/types/page-block/calendar/page-block.ts
@@ -38,6 +38,7 @@ class CalendarOptions {
public refreshRate = 0
public showRefresh = false
public magnifyOption = ''
+ public eventDisplayOption = 'sameTab'
}
/**
@@ -63,7 +64,7 @@ export class PageBlockCalendar extends PageBlock {
Apply(this.options, o, Boolean, 'showRefresh')
- Apply(this.options, o, String, 'magnifyOption')
+ Apply(this.options, o, String, 'magnifyOption', 'eventDisplayOption')
this.options.defaultView = PageBlockCalendar.handleLegacyView(o.defaultView) || 'dayGridMonth'
this.options.feeds = (o.feeds || []).map(f => new Feed(f))
diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml
index f9acb1d1f..07ee7c5f7 100644
--- a/locale/en/corteza-webapp-compose/block.yaml
+++ b/locale/en/corteza-webapp-compose/block.yaml
@@ -72,6 +72,10 @@ calendar:
listMonth: Agenda
timeGridDay: Day
timeGridWeek: Week
+ onEventClick: On event click
+ openInSameTab: Open record in the same tab
+ openInNewTab: Open record in a new tab
+ openInModal: Open record in a modal
viewLabel: Calendar
chart:
add: New Chart