mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-01-11 16:18:41 +00:00
fix l11n call
This commit is contained in:
parent
b753404db5
commit
015802e069
|
|
@ -17,7 +17,7 @@ use phpOMS\Uri\UriFactory;
|
|||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
||||
$articles = $this->getData('news') ?? [];
|
||||
$newsList = $this->getData('news') ?? [];
|
||||
|
||||
$previous = empty($newsList) ? '{/prefix}news/archive' : '{/prefix}news/archive?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? '{/prefix}news/archive' : '{/prefix}news/archive?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
|
|
@ -83,7 +83,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php
|
||||
$count = 0;
|
||||
|
||||
foreach ($articles as $key => $news) : ++$count;
|
||||
foreach ($newsList as $key => $news) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="portlet-foot">
|
||||
<div class="overflowfix">
|
||||
<?php $tags = $news->getTags(); foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
<a tabindex="0" href="<?= $url; ?>" class="button floatRight"><?= $this->getHtml('More', '0', '0'); ?></a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use phpOMS\Uri\UriFactory;
|
|||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
||||
$articles = $this->getData('news') ?? [];
|
||||
$newsList = $this->getData('news') ?? [];
|
||||
|
||||
$previous = empty($newsList) ? '{/prefix}news/draft/list' : '{/prefix}news/draft/list?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? '{/prefix}news/draft/list' : '{/prefix}news/draft/list?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
|
|
@ -80,8 +80,11 @@ echo $this->getData('nav')->render(); ?>
|
|||
<i class="filter fa fa-filter"></i>
|
||||
</label>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($articles as $key => $news) : ++$count; $url = UriFactory::build('{/prefix}news/edit?{?}&id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
<?php $count = 0;
|
||||
foreach ($newsList as $key => $news) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}news/edit?{?}&id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
|
||||
if ($news->getType() === NewsType::ARTICLE) { $color = 'green'; }
|
||||
elseif ($news->getType() === NewsType::HEADLINE) { $color = 'purple'; }
|
||||
elseif ($news->getType() === NewsType::LINK) { $color = 'yellow'; }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $news = $this->getData('news');
|
|||
/** @var bool $editable */
|
||||
$editable = $this->getData('editable');
|
||||
|
||||
/** @var \Modules\Tag\Models\Tag[] $tag */
|
||||
/** @var \Modules\Tag\Models\Tag[] $tags */
|
||||
$tags = $news->getTags();
|
||||
|
||||
$profile = UriFactory::build('{/prefix}profile/single?{?}&id=' . $news->createdBy->getId());
|
||||
|
|
@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-6 overflowfix">
|
||||
<?php foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php if ($editable) : ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user