Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
typo3.org
typo3.org
Commits
0d4ad83f
Commit
0d4ad83f
authored
Dec 10, 2020
by
Thomas Löffler
Browse files
Change inconsistent methods, adapt it to templates and remove whitespace between commas
parent
d0782a22
Pipeline
#10173
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extensions/t3org_layout/Classes/Domain/Model/News.php
View file @
0d4ad83f
...
...
@@ -23,7 +23,7 @@ class News extends \GeorgRinger\News\Domain\Model\News
/**
* @var string
*/
protected
$authorFeUser
;
protected
$authorFeUser
=
''
;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\T3o\T3orgLayout\Domain\Model\Contributors>
...
...
@@ -51,10 +51,15 @@ class News extends \GeorgRinger\News\Domain\Model\News
$this
->
authorFeUser
=
$authorFeUser
;
}
public
function
getAuthorFeUser
():
string
{
return
$this
->
authorFeUser
;
}
/**
* @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser[]
*/
public
function
getAuthorFeUser
()
public
function
getAuthorFeUser
s
()
{
if
(
!
$this
->
authorFeUser
)
{
return
[];
...
...
extensions/t3org_layout/Resources/Private/Partials/News/List/Item.html
View file @
0d4ad83f
...
...
@@ -76,13 +76,10 @@
<f:if
condition=
"{newsItem.categories -> f:count()} > 0"
>
<div
class=
"news-list__item-categories d-block small"
>
<span>
<f:translate
key=
"categories"
/>
:
<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>
<span>
{category.title}
<f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if></span>
</f:for>
</div>
</f:if>
...
...
@@ -97,11 +94,11 @@
</div>
</f:if>
<!-- author -->
<f:if
condition=
"{newsItem.authorFeUser -> f:count()} > 0"
>
<f:if
condition=
"{newsItem.authorFeUser
s
-> 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:translate
key=
"author
_simple
"
/>
<f:for
each=
"{newsItem.authorFeUser
s
}"
as=
"authorFeUser"
iteration=
"authorFeUserIterator"
>
<f:if
condition=
"{authorFeUserIterator.isFirst} === false"
>
<f:if
condition=
"{authorFeUserIterator.isLast} === true"
>
<f:then>
...
...
@@ -119,7 +116,7 @@
<f:else>
<f:if
condition=
"{newsItem.author}"
>
<span
class=
"news-list__item-author d-block small"
>
<f:translate
key=
"author
"
arguments=
"{0:dd.author}
"
/>
<f:translate
key=
"author
_simple
"
/>
{newsItem.author}
</span>
</f:if>
...
...
extensions/t3org_layout/Resources/Private/Templates/News/News/Detail.html
View file @
0d4ad83f
...
...
@@ -115,21 +115,19 @@
<span>
<f:if
condition=
"{category.uid}=={settings.budgetCategoryID}"
>
<f:then>
<f:link.page
title=
"{category.title}"
class=
"active"
pageUid=
"{settings.budgetListPid}"
>
{category.title}
</f:link.page>
<f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
<f:link.page
title=
"{category.title}"
class=
"active"
pageUid=
"{settings.budgetListPid}"
>
{category.title}
</f:link.page><f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
</f:then>
<f:else>
<f:link.page
title=
"{category.title}"
class=
"active"
pageUid=
"{settings.listPid}"
additionalParams=
"{tx_news_pi1:{overwriteDemand:{categories: category.uid}}}"
>
{category.title}
</f:link.page>
<f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
<f:link.page
title=
"{category.title}"
class=
"active"
pageUid=
"{settings.listPid}"
additionalParams=
"{tx_news_pi1:{overwriteDemand:{categories: category.uid}}}"
>
{category.title}
</f:link.page><f:if
condition=
"{iterator.isLast} == false"
>
,
</f:if>
</f:else>
</f:if>
</span>
</f:for>
<f:if
condition=
"{newsItem.authorFeUser -> f:count()} > 0"
>
<f:if
condition=
"{newsItem.authorFeUser
s
-> 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:translate
key=
"author
_simple
"
/>
<f:for
each=
"{newsItem.authorFeUser
s
}"
as=
"authorFeUser"
iteration=
"authorFeUserIterator"
>
<f:if
condition=
"{authorFeUserIterator.isFirst} === false"
>
<f:if
condition=
"{authorFeUserIterator.isLast} === true"
>
<f:then>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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