From 46c95bde6f24bdfba9ad3a43b2c94e853bcfd2d5 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 3 Dec 2024 16:03:21 +0100 Subject: [PATCH] display counter if too many linkto in home table close #494 The limit is calculated depending on the number of hidden column. --- app/class/Controllerhome.php | 1 + app/view/templates/home.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index 63f5a84..d0cbde5 100644 --- a/app/class/Controllerhome.php +++ b/app/class/Controllerhome.php @@ -95,6 +95,7 @@ public function desktop() $vars['searchopt'] = $deepsearch['searchopt']; $vars['display'] = $display; $vars['urlchecker'] = Config::urlchecker(); + $vars['hiddencolumncount'] = count(User::HOME_COLUMNS) - count($this->user->columns()); if ($display === 'graph') { $vars['layout'] = $_GET['layout'] ?? 'cose-bilkent'; diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 2dad795..27a94d0 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -323,7 +323,15 @@ class="redirection" description('short') ?> - linktolink($item->linkto('array')) ?> + + linkto())) > ($hiddencolumncount - 5 )) : ?> + linkto()) ?>"> + + + + linktolink($item->linkto('array')) ?> + +