From 3f4e2ae4b894c1fe3d31bab1c4533e95897e75d2 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Tue, 7 Sep 2021 09:59:36 +0200 Subject: [PATCH] chg: [home] Added link to index for each panels --- plugins/Tags/config/routes.php | 2 +- templates/Instance/home.php | 16 +++- templates/element/charts/bar.php | 79 +++++++++---------- templates/element/widgets/highlight-panel.php | 3 +- webroot/css/main.css | 4 + 5 files changed, 57 insertions(+), 47 deletions(-) diff --git a/plugins/Tags/config/routes.php b/plugins/Tags/config/routes.php index 3fab36a..93223e1 100644 --- a/plugins/Tags/config/routes.php +++ b/plugins/Tags/config/routes.php @@ -13,7 +13,7 @@ $routes->plugin( ['controller' => 'Tags'] ); - // $routes->get('/', ['controller' => 'Tags']); + $routes->get('/', ['controller' => 'Tags', 'action' => 'index']); // $routes->get('/{id}', ['controller' => 'Tags', 'action' => 'view']); // $routes->put('/{id}', ['controller' => 'Tags', 'action' => 'edit']); } diff --git a/templates/Instance/home.php b/templates/Instance/home.php index 20e3460..b9c41a4 100644 --- a/templates/Instance/home.php +++ b/templates/Instance/home.php @@ -1,17 +1,25 @@ text($md); - ?> +

$statistics): ?>
Html->link( + h($modelForDisplay), + $this->Url->build([ + 'controller' => $modelForDisplay, + 'action' => 'index', + ]), + ['class' => 'text-white'] + ); echo $this->element('widgets/highlight-panel', [ - 'title' => $modelName, + 'titleHtml' => $panelTitle, 'number' => $statistics['amount'], 'variation' => $statistics['variation'] ?? '', 'chartData' => $statistics['timeline'] ?? [] diff --git a/templates/element/charts/bar.php b/templates/element/charts/bar.php index b53a44d..ea3f56a 100644 --- a/templates/element/charts/bar.php +++ b/templates/element/charts/bar.php @@ -14,51 +14,48 @@ foreach ($chartData as $i => $entry) {
- -