From 2063a534e653042f7d4cf0dc667f7a2ee621b0ef Mon Sep 17 00:00:00 2001 From: Jared Dillard Date: Wed, 16 Dec 2015 17:54:07 -0600 Subject: fixed issue where if all widgets were in col2, no col1 was created --- src/usr/local/www/index.php | 85 +++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 41 deletions(-) (limited to 'src/usr/local/www/index.php') diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index a1f3565..7ae8f9b 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -377,54 +377,57 @@ foreach ($widgets as $widgetname => $widgetconfig) { ?>
- - $columnWidgets):?> -
- $widgetconfig): - - // Compose the widget title and include the title link if available - $widgetlink = ${$widgetname . '_title_link'}; - if ((strlen($widgetlink) > 0)) { - $wtitle = ' ' . $widgetconfig['name'] . ''; + for($i=1; $i<=$numColumns; $i++) { + echo '
'; + + //if col$i exists + if(isset($widgetColumns['col'.$i])) { + + $columnWidgets = $widgetColumns['col'.$i]; + + foreach ($columnWidgets as $widgetname => $widgetconfig) { + // Compose the widget title and include the title link if available + $widgetlink = ${$widgetname . '_title_link'}; + + if ((strlen($widgetlink) > 0)) { + $wtitle = ' ' . $widgetconfig['name'] . ''; + } else { + $wtitle = $widgetconfig['name']; + } + ?> +
+
+ + + + + + + + + + + +
+
+ +
+
+
'; } - -?> -
-
- - - - - - - - - - - -
-
- -
-
- -
- -
'; + echo ""; } ?> +