mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-14 23:58:39 +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 \phpOMS\Views\View $this */
|
||||||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
/** @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';
|
$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';
|
$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
|
<?php
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
|
||||||
foreach ($articles as $key => $news) : ++$count;
|
foreach ($newsList as $key => $news) : ++$count;
|
||||||
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
|
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
|
||||||
$color = 'darkred';
|
$color = 'darkred';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
<div class="overflowfix">
|
<div class="overflowfix">
|
||||||
<?php $tags = $news->getTags(); foreach ($tags as $tag) : ?>
|
<?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; ?>
|
<?php endforeach; ?>
|
||||||
<a tabindex="0" href="<?= $url; ?>" class="button floatRight"><?= $this->getHtml('More', '0', '0'); ?></a>
|
<a tabindex="0" href="<?= $url; ?>" class="button floatRight"><?= $this->getHtml('More', '0', '0'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/** @var \phpOMS\Views\View $this */
|
/** @var \phpOMS\Views\View $this */
|
||||||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
/** @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';
|
$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';
|
$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>
|
<i class="filter fa fa-filter"></i>
|
||||||
</label>
|
</label>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0; foreach ($articles as $key => $news) : ++$count; $url = UriFactory::build('{/prefix}news/edit?{?}&id=' . $news->getId());
|
<?php $count = 0;
|
||||||
$color = 'darkred';
|
foreach ($newsList as $key => $news) : ++$count;
|
||||||
|
$url = UriFactory::build('{/prefix}news/edit?{?}&id=' . $news->getId());
|
||||||
|
$color = 'darkred';
|
||||||
|
|
||||||
if ($news->getType() === NewsType::ARTICLE) { $color = 'green'; }
|
if ($news->getType() === NewsType::ARTICLE) { $color = 'green'; }
|
||||||
elseif ($news->getType() === NewsType::HEADLINE) { $color = 'purple'; }
|
elseif ($news->getType() === NewsType::HEADLINE) { $color = 'purple'; }
|
||||||
elseif ($news->getType() === NewsType::LINK) { $color = 'yellow'; }
|
elseif ($news->getType() === NewsType::LINK) { $color = 'yellow'; }
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ $news = $this->getData('news');
|
||||||
/** @var bool $editable */
|
/** @var bool $editable */
|
||||||
$editable = $this->getData('editable');
|
$editable = $this->getData('editable');
|
||||||
|
|
||||||
/** @var \Modules\Tag\Models\Tag[] $tag */
|
/** @var \Modules\Tag\Models\Tag[] $tags */
|
||||||
$tags = $news->getTags();
|
$tags = $news->getTags();
|
||||||
|
|
||||||
$profile = UriFactory::build('{/prefix}profile/single?{?}&id=' . $news->createdBy->getId());
|
$profile = UriFactory::build('{/prefix}profile/single?{?}&id=' . $news->createdBy->getId());
|
||||||
|
|
@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-6 overflowfix">
|
<div class="col-xs-6 overflowfix">
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<?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; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($editable) : ?>
|
<?php if ($editable) : ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user