diff --git a/Classes/ViewHelpers/ContainsObjectWithUidViewHelper.php b/Classes/ViewHelpers/ContainsObjectWithUidViewHelper.php index a1f2d71..6b06886 100755 --- a/Classes/ViewHelpers/ContainsObjectWithUidViewHelper.php +++ b/Classes/ViewHelpers/ContainsObjectWithUidViewHelper.php @@ -5,6 +5,16 @@ use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; +/** + * This file is part of the "Participants" Extension for TYPO3 CMS. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * (c) 2024 C. Gogolin + * + * @package Cylancer\Participants\ViewHelpers + */ class ContainsObjectWithUidViewHelper extends AbstractViewHelper { diff --git a/Classes/ViewHelpers/IcsBlankLineEncoderViewHelper.php b/Classes/ViewHelpers/IcsBlankLineEncoderViewHelper.php new file mode 100644 index 0000000..5592fd8 --- /dev/null +++ b/Classes/ViewHelpers/IcsBlankLineEncoderViewHelper.php @@ -0,0 +1,40 @@ + + * + * @package Cylancer\Participants\ViewHelpers + */ +class IcsBlankLineEncoderViewHelper extends AbstractViewHelper +{ + + public function initializeArguments() + { + $this->registerArgument('value', '*', 'The value ', true); + } + + /** + * Escapes special characters with their escaped counterparts as needed using PHPs htmlspecialchars() function. + * + * @return string the altered string + * @see http://www.php.net/manual/function.htmlspecialchars.php + * @api + */ + public function render() + { + $value = $this->arguments['value']; + if ($value === null) { + $value = $this->renderChildren(); + } + return str_replace("\\n\\n", "\\n \\n", str_replace(["\r\n","\r","\n"], "\\n", strip_tags($value))); + } + +} diff --git a/Classes/ViewHelpers/InArrayViewHelper.php b/Classes/ViewHelpers/InArrayViewHelper.php index 4041035..cf9d3c7 100755 --- a/Classes/ViewHelpers/InArrayViewHelper.php +++ b/Classes/ViewHelpers/InArrayViewHelper.php @@ -4,6 +4,16 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; +/** + * This file is part of the "Participants" Extension for TYPO3 CMS. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * (c) 2024 C. Gogolin + * + * @package Cylancer\Participants\ViewHelpers + */ class InArrayViewHelper extends AbstractViewHelper { diff --git a/Resources/Private/Layouts/ICS.html b/Resources/Private/Layouts/ICS.html new file mode 100644 index 0000000..8d5af18 --- /dev/null +++ b/Resources/Private/Layouts/ICS.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/Private/Layouts/ICS.txt b/Resources/Private/Layouts/ICS.txt new file mode 100644 index 0000000..8d5af18 --- /dev/null +++ b/Resources/Private/Layouts/ICS.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Resources/Private/Partials/DutyRoster/DefaultICalendarEntries.html b/Resources/Private/Partials/DutyRoster/DefaultICalendarEntries.html index 0a4427d..d7c730c 100755 --- a/Resources/Private/Partials/DutyRoster/DefaultICalendarEntries.html +++ b/Resources/Private/Partials/DutyRoster/DefaultICalendarEntries.html @@ -30,6 +30,6 @@ DTSTART;VALUE=DATETZID=Europe/Berlin:{event.date}{event.time} DTEND;VALUE=DATETZID=Europe/Berlin: +1 day +{event.duration} hours SUMMARY:🚒 {event.eventType.title -> f:format.htmlspecialchars()} -DESCRIPTION:{ug.title}, ( {event.description -> f:format.stripTags()} ) +DESCRIPTION:{ug.title}, ( {event.description -> c:icsBlankLineEncoder()} ) END:VEVENT END:VCALENDAR diff --git a/Resources/Private/Partials/PersonalDutyRoster/DefaultICalendarEntries.html b/Resources/Private/Partials/PersonalDutyRoster/DefaultICalendarEntries.html index 63648fe..7378030 100755 --- a/Resources/Private/Partials/PersonalDutyRoster/DefaultICalendarEntries.html +++ b/Resources/Private/Partials/PersonalDutyRoster/DefaultICalendarEntries.html @@ -30,6 +30,6 @@ DTSTART;VALUE=DATETZID=Europe/Berlin:{commitment.event.date}{commitment.event.time} DTEND;VALUE=DATETZID=Europe/Berlin: +1 day +{commitment.event.duration} hours SUMMARY:🚒 {commitment.event.eventType.title -> f:format.htmlspecialchars()} -DESCRIPTION:{ug.title}, ( {commitment.event.description -> f:format.stripTags()} ) +DESCRIPTION:{ug.title}, ( {commitment.event.description -> c:icsBlankLineEncoder()} ) END:VEVENT END:VCALENDAR diff --git a/Resources/Private/Templates/DutyRoster/DownloadIcs.html b/Resources/Private/Templates/DutyRoster/DownloadIcs.html index 073b1ed..8b68e31 100755 --- a/Resources/Private/Templates/DutyRoster/DownloadIcs.html +++ b/Resources/Private/Templates/DutyRoster/DownloadIcs.html @@ -1 +1,12 @@ - \ No newline at end of file + + + + + + + + + \ No newline at end of file diff --git a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedCalendarEntries.html b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedCalendarEntries.html index 78ca2de..e1682be 100755 --- a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedCalendarEntries.html +++ b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedCalendarEntries.html @@ -1 +1,12 @@ - + + + + + + + + + \ No newline at end of file diff --git a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedVisibleCalendarEntries.html b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedVisibleCalendarEntries.html index 78ca2de..e1682be 100755 --- a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedVisibleCalendarEntries.html +++ b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedVisibleCalendarEntries.html @@ -1 +1,12 @@ - + + + + + + + + + \ No newline at end of file diff --git a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllVisibleCalendarEntries.html b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllVisibleCalendarEntries.html index 78ca2de..e1682be 100755 --- a/Resources/Private/Templates/PersonalDutyRoster/DownloadAllVisibleCalendarEntries.html +++ b/Resources/Private/Templates/PersonalDutyRoster/DownloadAllVisibleCalendarEntries.html @@ -1 +1,12 @@ - + + + + + + + + + \ No newline at end of file diff --git a/ext_emconf.php b/ext_emconf.php index cb8b6e3..539f84b 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -14,7 +14,7 @@ 'uploadfolder' => 0, 'createDirs' => '', 'clearCacheOnLoad' => 1, - 'version' => '3.7.9', + 'version' => '3.7.10', 'constraints' => [ 'depends' => [ 'typo3' => '11.5.0-11.5.99', @@ -30,6 +30,7 @@ * Change log: * +3.7.10 :: Fix : Repair the (personal) duty roster iCal export file: simple blank lines are not allowed. iCal needs a special coding. 3.7.9 :: Fix : Fix the default user setting for automatic apply commitments. 3.7.8 :: Fix : Fix the return value type in the frontend user service. 3.7.7 :: Fix : Adapts the personal duty roster folter column counts.