mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-13 23:28:40 +00:00
permission changes & minor bug fixes
This commit is contained in:
parent
23077d8f62
commit
95c1172024
0
Admin/Install/Dashboard.install.json
Normal file → Executable file
0
Admin/Install/Dashboard.install.json
Normal file → Executable file
0
Admin/Install/Dashboard.php
Normal file → Executable file
0
Admin/Install/Dashboard.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ar.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ar.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.cs.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.cs.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.da.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.da.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.de.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.de.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.el.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.el.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.en.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.en.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.es.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.es.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.fi.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.fi.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.fr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.fr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.hu.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.hu.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.it.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.it.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ja.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ja.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ko.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ko.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.no.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.no.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.pl.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.pl.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.pt.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.pt.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ru.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.ru.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.sv.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.sv.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.th.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.th.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.tr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.tr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.uk.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.uk.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.zh.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/Navigation.zh.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ar.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ar.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/cs.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/cs.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/da.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/da.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/de.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/de.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/el.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/el.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/en.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/en.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/es.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/es.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/fi.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/fi.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/fr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/fr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/hu.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/hu.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/it.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/it.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ja.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ja.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ko.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ko.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/no.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/no.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/pl.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/pl.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/pt.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/pt.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ru.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/ru.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/sv.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/sv.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/th.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/th.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/tr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/tr.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/uk.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/uk.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/zh.lang.php
Normal file → Executable file
0
Theme/Backend/Lang/zh.lang.php
Normal file → Executable file
|
|
@ -35,7 +35,7 @@ $newsList = $this->getData('news') ?? [];
|
|||
<?php
|
||||
$count = 0;
|
||||
foreach ($newsList as $key => $news) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
|
||||
$url = UriFactory::build('news/article?{?}&id=' . $news->getId());
|
||||
$color = 'darkred';
|
||||
|
||||
if ($news->getType() === NewsType::ARTICLE) { $color = 'green'; }
|
||||
|
|
@ -66,7 +66,7 @@ $newsList = $this->getData('news') ?? [];
|
|||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
<a class="button" href="<?= UriFactory::build('{/prefix}news/dashboard?{?}'); ?>"><?= $this->getHtml('More', '0', '0'); ?></a>
|
||||
<a class="button" href="<?= UriFactory::build('news/dashboard?{?}'); ?>"><?= $this->getHtml('More', '0', '0'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -18,8 +18,8 @@ use phpOMS\Uri\UriFactory;
|
|||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
||||
$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';
|
||||
$previous = empty($newsList) ? 'news/archive' : 'news/archive?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? 'news/archive' : 'news/archive?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
|
|
@ -84,12 +84,12 @@ echo $this->getData('nav')->render(); ?>
|
|||
$count = 0;
|
||||
|
||||
foreach ($newsList as $key => $news) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}news/article?{?}&id=' . $news->getId());
|
||||
$url = UriFactory::build('news/article?{?}&id=' . $news->getId());
|
||||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td><span class="tag"><?= $this->getHtml('TYPE' . $news->getType()); ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($news->title); ?></a>
|
||||
<td><a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
|
||||
<td><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($news->publish->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
|
|||
$newsList = $this->getData('news');
|
||||
$seen = $this->getData('seen') ?? [];
|
||||
|
||||
$previous = empty($newsList) ? '{/prefix}news/dashboard' : '{/prefix}news/dashboard?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? '{/prefix}news/dashboard' : '{/prefix}news/dashboard?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
$previous = empty($newsList) ? 'news/dashboard' : 'news/dashboard?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? 'news/dashboard' : 'news/dashboard?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<?php foreach ($newsList as $news) :
|
||||
$url = UriFactory::build('{/prefix}news/article?id=' . $news->getId());
|
||||
$profile = UriFactory::build('{/prefix}profile/single?{?}&id=' . $news->createdBy->getId());
|
||||
$url = UriFactory::build('news/article?id=' . $news->getId());
|
||||
$profile = UriFactory::build('profile/single?{?}&id=' . $news->createdBy->getId());
|
||||
?>
|
||||
<div class="portlet">
|
||||
<div class="portlet-head">
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ use phpOMS\Uri\UriFactory;
|
|||
/** @var \Modules\News\Models\NewsArticle[] $newsList */
|
||||
$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';
|
||||
$previous = empty($newsList) ? 'news/archive' : 'news/archive?{?}&id=' . \reset($newsList)->getId() . '&ptype=p';
|
||||
$next = empty($newsList) ? 'news/archive' : 'news/archive?{?}&id=' . \end($newsList)->getId() . '&ptype=n';
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
|
|
@ -84,12 +84,12 @@ echo $this->getData('nav')->render(); ?>
|
|||
$count = 0;
|
||||
|
||||
foreach ($newsList as $key => $news) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}news/edit?{?}&id=' . $news->getId());
|
||||
$url = UriFactory::build('news/edit?{?}&id=' . $news->getId());
|
||||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td><span class="tag"><?= $this->getHtml('TYPE' . $news->getType()); ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($news->title); ?></a>
|
||||
<td><a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
|
||||
<td><a class="content" href="<?= UriFactory::build('profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($news->publish->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ $editable = $this->getData('editable');
|
|||
/** @var \Modules\Tag\Models\Tag[] $tags */
|
||||
$tags = $news->getTags();
|
||||
|
||||
$profile = UriFactory::build('{/prefix}profile/single?{?}&id=' . $news->createdBy->getId());
|
||||
$profile = UriFactory::build('profile/single?{?}&id=' . $news->createdBy->getId());
|
||||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
|
@ -44,12 +44,12 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php endforeach; ?>
|
||||
|
||||
<?php $files = $news->getMedia(); foreach ($files as $file) : ?>
|
||||
<span><a class="content" href="<?= UriFactory::build('{/prefix}media/single?id=' . $file->getId());?>"><?= $file->name; ?></a></span>
|
||||
<span><a class="content" href="<?= UriFactory::build('media/single?id=' . $file->getId());?>"><?= $file->name; ?></a></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php if ($editable) : ?>
|
||||
<div class="col-xs-6 end-xs plain-grid">
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('{/prefix}news/edit?id=' . $news->getId()); ?>"><?= $this->getHtml('Edit'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build('news/edit?id=' . $news->getId()); ?>"><?= $this->getHtml('Edit'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
|||
0
tests/Controller/Api/test.md
Normal file → Executable file
0
tests/Controller/Api/test.md
Normal file → Executable file
0
tests/Models/NewsSeenTest.php
Normal file → Executable file
0
tests/Models/NewsSeenTest.php
Normal file → Executable file
0
tests/Models/NullNewsSeenTest.php
Normal file → Executable file
0
tests/Models/NullNewsSeenTest.php
Normal file → Executable file
Loading…
Reference in New Issue
Block a user