-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repair the (personal) duty roster iCal export file: simple blank line…
…s are not allowed. iCal needs a special coding.
- Loading branch information
Clemens Gogoljn
committed
Jan 5, 2024
1 parent
3ad1a8b
commit 1c984cd
Showing
12 changed files
with
114 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
* | ||
* @package Cylancer\Participants\ViewHelpers | ||
*/ | ||
class ContainsObjectWithUidViewHelper extends AbstractViewHelper | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
namespace Cylancer\Participants\ViewHelpers; | ||
|
||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; | ||
|
||
/** | ||
* 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 <[email protected]> | ||
* | ||
* @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))); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
* | ||
* @package Cylancer\Participants\ViewHelpers | ||
*/ | ||
class InArrayViewHelper extends AbstractViewHelper | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<f:render section="content" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<f:render section="content" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<f:render partial="DutyRoster/DefaultICalendarEntries" arguments="{_all}" /> | ||
<!DOCTYPE html PUBLIC "-//WC//DTD XHTML . Strict//EN" | ||
"http://www.w.org/TR/xhtml/DTD/xhtml-strict.dtd"> | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:c="http://typo3.org/ns/Cylancer/Participants/ViewHelpers" | ||
data-namespace-typo3-fluid="true" xmlns="http://www.w.org//xhtml" xml:lang="en" lang="en" | ||
> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
</head> | ||
<body> | ||
<f:layout name="ICS" /> | ||
<f:section name="content"><f:render partial="DutyRoster/DefaultICalendarEntries" arguments="{_all}" /></f:section> | ||
</body></html> |
13 changes: 12 additions & 1 deletion
13
Resources/Private/Templates/PersonalDutyRoster/DownloadAllPromisedCalendarEntries.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /> | ||
<!DOCTYPE html PUBLIC "-//WC//DTD XHTML . Strict//EN" | ||
"http://www.w.org/TR/xhtml/DTD/xhtml-strict.dtd"> | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:c="http://typo3.org/ns/Cylancer/Participants/ViewHelpers" | ||
data-namespace-typo3-fluid="true" xmlns="http://www.w.org//xhtml" xml:lang="en" lang="en" | ||
> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
</head> | ||
<body> | ||
<f:layout name="ICS" /> | ||
<f:section name="content"><f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /></f:section> | ||
</body></html> |
13 changes: 12 additions & 1 deletion
13
...urces/Private/Templates/PersonalDutyRoster/DownloadAllPromisedVisibleCalendarEntries.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /> | ||
<!DOCTYPE html PUBLIC "-//WC//DTD XHTML . Strict//EN" | ||
"http://www.w.org/TR/xhtml/DTD/xhtml-strict.dtd"> | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:c="http://typo3.org/ns/Cylancer/Participants/ViewHelpers" | ||
data-namespace-typo3-fluid="true" xmlns="http://www.w.org//xhtml" xml:lang="en" lang="en" | ||
> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
</head> | ||
<body> | ||
<f:layout name="ICS" /> | ||
<f:section name="content"><f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /></f:section> | ||
</body></html> |
13 changes: 12 additions & 1 deletion
13
Resources/Private/Templates/PersonalDutyRoster/DownloadAllVisibleCalendarEntries.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
<f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /> | ||
<!DOCTYPE html PUBLIC "-//WC//DTD XHTML . Strict//EN" | ||
"http://www.w.org/TR/xhtml/DTD/xhtml-strict.dtd"> | ||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:c="http://typo3.org/ns/Cylancer/Participants/ViewHelpers" | ||
data-namespace-typo3-fluid="true" xmlns="http://www.w.org//xhtml" xml:lang="en" lang="en" | ||
> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> | ||
</head> | ||
<body> | ||
<f:layout name="ICS" /> | ||
<f:section name="content"><f:render partial="personalDutyRoster/DefaultICalendarEntries" arguments="{_all}" /></f:section> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters