From 16b7627b605b865749e14517019ef572aec31dd8 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Sat, 27 Jul 2024 12:36:49 +0300 Subject: [PATCH] Fixes front page widgets --- public_html/pages/front.php | 18 +++--------------- public_html/templates/widget.php | 4 +++- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/public_html/pages/front.php b/public_html/pages/front.php index 01a0cab..0323b55 100644 --- a/public_html/pages/front.php +++ b/public_html/pages/front.php @@ -65,19 +65,13 @@ try { } // prepare the widget +$widget['full'] = false; $widget['name'] = 'LastDays'; $widget['title'] = 'Conferences for the last 2 days'; -if ($time_range_specified) { - $widget['time_period'] = "

time period: $from_time - $until_time

"; -} else { - $widget['time_period'] = ''; -} if (!empty($conferences['records'])) { $widget['full'] = true; $widget['table_headers'] = array_keys($conferences['records'][0]); $widget['table_records'] = $conferences['records']; -} else { - $widget['full'] = false; } // display the widget @@ -141,19 +135,13 @@ try { } // prepare the widget +$widget['full'] = false; $widget['name'] = 'LastConferences'; -$widget['title'] = "The last $conference_number conferences"; -if ($time_range_specified) { - $widget['time_period'] = "

time period: $from_time - $until_time

"; -} else { - $widget['time_period'] = ''; -} +$widget['title'] = 'The last ' . $conference_number . ' conferences'; if (!empty($conferences['records'])) { $widget['full'] = true; $widget['table_headers'] = array_keys($conferences['records'][0]); $widget['table_records'] = $conferences['records']; -} else { - $widget['full'] = false; } // display the widget diff --git a/public_html/templates/widget.php b/public_html/templates/widget.php index b967379..527367d 100644 --- a/public_html/templates/widget.php +++ b/public_html/templates/widget.php @@ -3,7 +3,9 @@
- + +

time period: -

+