This commit is contained in:
Dennis Eichhorn 2022-12-10 22:17:54 +01:00
parent 68d4678fe7
commit affb0cab6a
8 changed files with 17 additions and 17 deletions

View File

@ -5,7 +5,7 @@
"type": 2,
"subtype": 1,
"name": "News",
"uri": "{/prefix}news/dashboard?u={?u}",
"uri": "{/lang}/{/app}/news/dashboard?u={?u}",
"target": "self",
"icon": null,
"order": 40,
@ -19,7 +19,7 @@
"type": 3,
"subtype": 1,
"name": "News",
"uri": "{/prefix}news/dashboard?u={?u}",
"uri": "{/lang}/{/app}/news/dashboard?u={?u}",
"target": "self",
"icon": null,
"order": 1,
@ -34,7 +34,7 @@
"type": 3,
"subtype": 1,
"name": "Archive",
"uri": "{/prefix}news/archive?u={?u}",
"uri": "{/lang}/{/app}/news/archive?u={?u}",
"target": "self",
"icon": null,
"order": 5,
@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/prefix}news/create?{?}",
"uri": "{/lang}/{/app}/news/create?{?}",
"target": "self",
"icon": null,
"order": 10,
@ -64,7 +64,7 @@
"type": 3,
"subtype": 1,
"name": "Draft",
"uri": "{/prefix}news/draft/list?u={?u}",
"uri": "{/lang}/{/app}/news/draft/list?u={?u}",
"target": "self",
"icon": null,
"order": 15,
@ -79,7 +79,7 @@
"type": 3,
"subtype": 1,
"name": "Analysis",
"uri": "{/prefix}news/analysis",
"uri": "{/lang}/{/app}/news/analysis",
"target": "self",
"icon": null,
"order": 15,

View File

@ -35,7 +35,7 @@ $newsList = $this->getData('news') ?? [];
<?php
$count = 0;
foreach ($newsList as $key => $news) : ++$count;
$url = UriFactory::build('news/article?{?}&id=' . $news->getId());
$url = UriFactory::build('{/lang}/{/app}/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('news/dashboard?{?}'); ?>"><?= $this->getHtml('More', '0', '0'); ?></a>
<a class="button" href="<?= UriFactory::build('{/lang}/{/app}/news/dashboard?{?}'); ?>"><?= $this->getHtml('More', '0', '0'); ?></a>
</div>
</div>
</div>

View File

@ -84,12 +84,12 @@ echo $this->getData('nav')->render(); ?>
$count = 0;
foreach ($newsList as $key => $news) : ++$count;
$url = UriFactory::build('news/article?{?}&id=' . $news->getId());
$url = UriFactory::build('{/lang}/{/app}/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('profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
<td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/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) : ?>

View File

@ -87,7 +87,7 @@ echo $this->getData('nav')->render(); ?>
<tr>
<td>
<?php if ($isNewArticle) : ?>
<a href="<?= UriFactory::build('/news/dashboard'); ?>" class="button"><?= $this->getHtml('Delete', '0', '0'); ?></a>
<a href="<?= UriFactory::build('{/lang}/{/app}//news/dashboard'); ?>" class="button"><?= $this->getHtml('Delete', '0', '0'); ?></a>
<?php else : ?>
<input type="submit" name="deleteButton" id="iDeleteButton" value="<?= $this->getHtml('Delete', '0', '0'); ?>">
<?php endif; ?>

View File

@ -27,7 +27,7 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<?php foreach ($newsList as $news) :
$url = UriFactory::build('news/article?id=' . $news->getId());
$url = UriFactory::build('{/lang}/{/app}/news/article?id=' . $news->getId());
$profile = UriFactory::build('profile/single?{?}&id=' . $news->createdBy->getId());
?>
<div class="portlet">

View File

@ -84,12 +84,12 @@ echo $this->getData('nav')->render(); ?>
$count = 0;
foreach ($newsList as $key => $news) : ++$count;
$url = UriFactory::build('news/edit?{?}&id=' . $news->getId());
$url = UriFactory::build('{/lang}/{/app}/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('profile/single?{?}&for=' . $news->createdBy->getId()); ?>"><?= $this->printHtml($news->createdBy->name2 . ', ' . $news->createdBy->name1); ?></a>
<td><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/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) : ?>

View File

@ -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('media/single?id=' . $file->getId());?>"><?= $file->name; ?></a></span>
<span><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/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('news/edit?id=' . $news->getId()); ?>"><?= $this->getHtml('Edit'); ?></a>
<a tabindex="0" class="button" href="<?= UriFactory::build('{/lang}/{/app}/news/edit?id=' . $news->getId()); ?>"><?= $this->getHtml('Edit'); ?></a>
</div>
<?php endif; ?>
</div>

View File

@ -12,7 +12,7 @@
},
"creator": {
"name": "Karaka",
"website": "www.spl1nes.com"
"website": "jingga.app"
},
"description": "News module.",
"directory": "News",