mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-02-07 04:28:39 +00:00
make dashboard elements portlets
This commit is contained in:
parent
a224d30676
commit
67165b4cf7
|
|
@ -77,7 +77,9 @@ final class BackendController extends Controller implements DashboardElementInte
|
|||
$view = new View($this->app->l11nManager, $request, $response);
|
||||
$view->setTemplate('/Modules/News/Theme/Backend/dashboard-news');
|
||||
|
||||
$news = NewsArticleMapper::getNewest(5);
|
||||
$news = NewsArticleMapper::withConditional('language', $response->getHeader()->getL11n()->getLanguage())
|
||||
::getNewest(5);
|
||||
|
||||
$view->addData('news', $news);
|
||||
|
||||
return $view;
|
||||
|
|
|
|||
|
|
@ -16,12 +16,12 @@ declare(strict_types=1);
|
|||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$newsList = $this->getData('news');
|
||||
$newsList = $this->getData('news') ?? [];
|
||||
?>
|
||||
<div id="news-dashboard" class="col-xs-12 col-md-6" draggable="true">
|
||||
<div class="box wf-100">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('News', 'News'); ?></div>
|
||||
<table class="default">
|
||||
<caption><?= $this->getHtml('News', 'News'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user