From ebf4f5a829165e7bef85a5fc47a5938f5975de4e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 23 Apr 2023 19:06:54 +0200 Subject: [PATCH] showNavigationListWithBadges() skips badge if not set, fix creating link --- views/bootstrap/class.Bootstrap.php | 5 +++-- views/bootstrap4/class.Bootstrap4.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 81dc2f34b..b06ba26bf 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -600,13 +600,14 @@ background-image: linear-gradient(to bottom, #882222, #111111);; foreach($menuitems as $menuitem) { $content .= "
  • \n"; $content .= ' "; + if(!empty($menuitem['badge'])) + $content .= ''.$menuitem['badge'].""; $content .= ' '."\n"; $content .= "
  • \n"; } diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index aa31deaac..ac611ffef 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -605,14 +605,15 @@ background-image: linear-gradient(to bottom, #882222, #111111);; foreach($menuitems as $menuitem) { $content .= "
  • \n"; $content .= ' "; + if(!empty($menuitem['badge'])) + $content .= ''.$menuitem['badge'].""; $content .= "
  • \n"; }