Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ttree
News
Commits
9e2b6190
Commit
9e2b6190
authored
Feb 21, 2018
by
Dominique Feyer
Browse files
TASK: Better display for event date period
parent
05357926
Changes
3
Hide whitespace changes
Inline
Side-by-side
Resources/Private/Templates/Event/Event.html
View file @
9e2b6190
{namespace ts=TYPO3\TypoScript\ViewHelpers}
{namespace neos=TYPO3\Neos\ViewHelpers}
<div
{
attributes
-
>
f:format.raw()}>
<div>
<div
style=
"margin-bottom: 1em; border-bottom: 1px solid #CCC;"
>
<f:render
partial=
"DatePeriod"
arguments=
"{dateFormatType: dateFormatType, startDate: startDate, endDate: endDate, venue: venue}"
/>
</div>
{main -> f:format.raw()}
...
...
Resources/Private/Templates/Event/Partials/DatePeriod.html
View file @
9e2b6190
<f:if
condition=
"{startDate}"
>
<f:if
condition=
"{dateFormatType} == 'sameDay'"
>
<f:then>
<em><f:format.date
format=
"F j Y"
>
{startDate}
</f:format.date>
{venue}
</em>
</f:then>
<f:else>
<f:if
condition=
"{dateFormatType} == 'sameMonth'"
>
<f:then>
<em>
from
<f:format.date
format=
"j"
>
{startDate}
</f:format.date>
to
<f:format.date
format=
"F j Y"
>
{endDate}
</f:format.date>
{venue}
</em>
</f:then>
<f:else>
<f:if
condition=
"{dateFormatType} == 'sameYear'"
>
<f:then>
<em>
from
<f:format.date
format=
"F j"
>
{startDate}
</f:format.date>
to
<f:format.date
format=
"F j Y"
>
{endDate}
</f:format.date>
{venue}
</em>
</f:then>
<f:else>
<em>
from
<f:format.date
format=
"F j Y"
>
{startDate}
</f:format.date>
to
<f:format.date
format=
"F j Y"
>
{endDate}
</f:format.date>
{venue}
</em>
</f:else>
</f:if>
</f:else>
</f:if>
</f:else>
</f:if>
</f:if>
\ No newline at end of file
<f:if
condition=
"{dateFormatType} == 'sameDay'"
>
<f:then>
<f:format.date
format=
"F j, Y"
>
{startDate}
</f:format.date>
{venue}
</f:then>
<f:else>
<f:if
condition=
"{dateFormatType} == 'sameMonth'"
>
<f:then>
from
<f:format.date
format=
"F j"
>
{startDate}
</f:format.date>
-
<f:format.date
format=
"j, Y"
>
{endDate}
</f:format.date>
{venue}
</f:then>
<f:else>
<f:if
condition=
"{dateFormatType} == 'sameYear'"
>
<f:then>
from
<f:format.date
format=
"F j"
>
{startDate}
</f:format.date>
to
<f:format.date
format=
"F j, Y"
>
{endDate}
</f:format.date>
{venue}
</f:then>
<f:else>
from
<f:format.date
format=
"F j, Y"
>
{startDate}
</f:format.date>
to
<f:format.date
format=
"F j, Y"
>
{endDate}
</f:format.date>
{venue}
</f:else>
</f:if>
</f:else>
</f:if>
</f:else>
</f:if>
</f:if>
Resources/Private/TypoScript/Documents/Event.ts2
View file @
9e2b6190
...
...
@@ -21,6 +21,8 @@ prototype(Ttree.News:Event) < prototype(Ttree.News:AbstractNews) {
nodePath = 'main'
}
@process.contentElementWrapping >
@cache {
mode = 'cached'
entryIdentifier {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment