File tree Expand file tree Collapse file tree
src/components/Blocks/InfoBox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import React from 'react';
22import { defineMessages , useIntl } from 'react-intl' ;
33import { When , Recurrence } from '@package/components' ;
44import { List } from 'semantic-ui-react' ;
5+ import Icon from '@plone/volto/components/theme/Icon/Icon' ;
6+ import calendarSVG from '@plone/volto/icons/calendar.svg' ;
7+ import { expandToBackendURL } from '@plone/volto/helpers/Url/Url' ;
58
69const messages = defineMessages ( {
710 date : {
@@ -32,6 +35,10 @@ const messages = defineMessages({
3235 id : 'attendees' ,
3336 defaultMessage : 'Attendees' ,
3437 } ,
38+ downloadEvent : {
39+ id : 'Download Event' ,
40+ defaultMessage : 'Download Event' ,
41+ } ,
3542} ) ;
3643
3744const Body = ( props ) => {
@@ -121,6 +128,23 @@ const Body = (props) => {
121128 < List items = { properties . attendees } />
122129 </ >
123130 ) }
131+
132+ { /* ICS link */ }
133+ < div className = "download-event" >
134+ < Icon name = { calendarSVG } />
135+ < a
136+ className = "ics-download"
137+ target = "_blank"
138+ rel = "noreferrer"
139+ href = {
140+ properties && properties [ '@id' ]
141+ ? `${ expandToBackendURL ( properties [ '@id' ] ) } /ics_view `
142+ : ''
143+ }
144+ >
145+ { intl . formatMessage ( messages . downloadEvent ) }
146+ </ a >
147+ </ div >
124148 </ >
125149 ) : (
126150 < > </ >
Original file line number Diff line number Diff line change 2828 margin-bottom : 0.3rem ;
2929 }
3030 }
31+
32+ .download-event {
33+ display : flex ;
34+
35+ a {
36+ padding-top : 0.5rem ;
37+ }
38+ }
3139}
You can’t perform that action at this time.
0 commit comments