Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
T
typo3.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
8
Merge Requests
8
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
services
T
t3o sites
typo3.org
typo3.org
Commits
0dcc1acd
Commit
0dcc1acd
authored
Oct 16, 2020
by
Jonas Götze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE] Enable multiple Authors for news in list view
parent
5991ad87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
149 additions
and
0 deletions
+149
-0
extensions/t3org_layout/Resources/Private/Partials/News/List/Item.html
...org_layout/Resources/Private/Partials/News/List/Item.html
+149
-0
No files found.
extensions/t3org_layout/Resources/Private/Partials/News/List/Item.html
0 → 100644
View file @
0dcc1acd
<html
xmlns:f=
"http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:n=
"http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
xmlns:t3o=
"http://typo3.org/ns/T3o/T3olayout/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<!--
=====================
Partials/List/Item.html
-->
<f:variable
name=
"breakpoints"
value=
"{
0:{media:'max-width', size:375, maxWidth:375, cropVariant:'mobilenews'},
1:{media:'max-width', size:480, maxWidth:480, cropVariant:'mobilenews'},
2:{media:'max-width', size:767, maxWidth:510, cropVariant:'tabletnews'},
3:{media:'max-width', size:991, maxWidth:300, cropVariant:'tabletnews'},
4:{media:'max-width', size:1199, maxWidth:360, cropVariant:'desktopnews'},
5:{media:'min-width', size:1200, maxWidth:360, cropVariant:'desktopnews'}
}"
/>
<div
class=
"article articletype-{newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')} news-list__item py-3"
data-category=
"{newsItem.firstCategory.title}"
data-datetime=
"{f:format.date(date:newsItem.datetime, format:'Y-m-d')}"
itemscope=
"itemscope"
itemtype=
"http://schema.org/Article"
>
<n:excludeDisplayedNews
newsItem=
"{newsItem}"
/>
<div
class=
"media"
>
<!-- media preview element -->
<f:if
condition=
"{newsItem.mediaPreviews}"
>
<f:then>
<n:link
newsItem=
"{newsItem}"
settings=
"{settings}"
title=
"{newsItem.title}"
class=
"news-media__preview"
>
<f:alias
map=
"{mediaElement: '{newsItem.mediaPreviews.0}'}"
>
<f:if
condition=
"{mediaElement.originalResource.type} == 2"
>
<f:render
partial=
"ContentElements/Media/Rendering/PictureSrcsetCols"
section=
"ImageRender"
arguments=
"{file: mediaElement, breakpoints: breakpoints}"
/>
</f:if>
<f:if
condition=
"{mediaElement.originalResource.type} == 4"
>
<f:render
partial=
"Detail/MediaVideo"
arguments=
"{mediaElement: mediaElement}"
/>
</f:if>
<f:if
condition=
"{mediaElement.originalResource.type} == 5"
>
<f:image
image=
"{mediaElement}"
title=
"{mediaElement.originalResource.title}"
alt=
"{mediaElement.originalResource.alternative}"
width=
"{settings.list.media.image.width}"
height=
"{settings.list.media.image.height}"
class=
"img-fluid"
/>
</f:if>
</f:alias>
</n:link>
</f:then>
<f:else>
<f:if
condition=
"{settings.displayDummyIfNoMedia}"
>
<n:link
newsItem=
"{newsItem}"
settings=
"{settings}"
title=
"{newsItem.title}"
class=
"news-media__no-image"
>
<f:if
condition=
"{newsItem.defaultImage}"
>
<f:then>
<f:variable
name=
"imageSrc"
value=
"typo3conf/ext/t3org_layout/Resources/Public/Images/NewsDefaultImages/{newsItem.defaultImage}"
/>
<f:image
src=
"{imageSrc}"
title=
""
alt=
""
width=
"540"
height=
"360c"
class=
"img-fluid"
/>
</f:then>
<f:else>
<f:image
src=
"{settings.list.media.dummyImage}"
title=
""
alt=
""
width=
"540"
height=
"360c"
class=
"img-fluid"
/>
</f:else>
</f:if>
</n:link>
</f:if>
</f:else>
</f:if>
<div
class=
"media-body"
>
<!-- date -->
<span
class=
"news-list__item-date small"
>
<time
datetime=
"{f:format.date(date:newsItem.datetime, format:'Y-m-d')}"
>
<f:format.date
format=
"D. jS F, Y"
>
{newsItem.datetime}
</f:format.date>
<meta
itemprop=
"datePublished"
content=
"{f:format.date(date:newsItem.datetime, format:'Y-m-d')}"
/>
</time>
</span>
<h2
class=
"mt-md-3 mb-0"
>
<n:link
newsItem=
"{newsItem}"
settings=
"{settings}"
title=
"{newsItem.title}"
>
{newsItem.title}
</n:link>
</h2>
<!-- Categories -->
<f:if
condition=
"{newsItem.categories -> f:count()} > 0"
>
<div
class=
"news-list__item-categories d-block small"
>
<span>
<f:translate
key=
"categories"
/>
:
</span>
<f:for
each=
"{newsItem.categories}"
as=
"category"
iteration=
"iterator"
>
<span>
{category.title}
<f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
</span>
</f:for>
</div>
</f:if>
<!-- Tags -->
<f:if
condition=
"{newsItem.tags -> f:count()} > 0"
>
<div
class=
"news-list__item-tags d-block small"
>
<f:for
each=
"{newsItem.tags}"
as=
"tag"
iteration=
"iterator"
>
<span><i
class=
"fas fa-tag mr-1"
aria-hidden=
"true"
></i>
{tag.title}
<f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
</span>
</f:for>
</div>
</f:if>
<!-- author -->
<f:if
condition=
"{newsItem.authorFeUser -> f:count()} > 0"
>
<f:then>
<span
class=
"news-list__item-author d-block small"
>
<f:translate
key=
"author"
arguments=
"{0:dd.authorFeUser.name}"
/>
<f:for
each=
"{newsItem.authorFeUser}"
as=
"authorFeUser"
iteration=
"authorFeUserIterator"
>
<f:if
condition=
"{authorFeUserIterator.isFirst} === false"
>
<f:if
condition=
"{authorFeUserIterator.isLast} === true"
>
<f:then>
and
</f:then>
<f:else>
,
</f:else>
</f:if>
</f:if>
{authorFeUser.name}
</f:for>
</span>
</f:then>
<f:else>
<f:if
condition=
"{newsItem.author}"
>
<span
class=
"news-list__item-author d-block small"
>
<f:translate
key=
"author"
arguments=
"{0:dd.author}"
/>
{newsItem.author}
</span>
</f:if>
</f:else>
</f:if>
<div
class=
"mt-3 mt-lg-4 small"
>
<n:removeMediaTags>
<f:if
condition=
"{newsItem.teaser}"
>
<f:then>
<div
itemprop=
"description"
>
{newsItem.teaser -> f:format.html()}
</div>
</f:then>
<f:else>
<div
itemprop=
"description"
>
{newsItem.bodytext -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()}
</div>
</f:else>
</f:if>
</n:removeMediaTags>
<n:link
newsItem=
"{newsItem}"
settings=
"{settings}"
class=
"btn btn-secondary"
title=
"{newsItem.title}"
>
<f:translate
key=
"more-link"
/>
</n:link>
</div>
</div>
</div>
</div>
</html>
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