Fixes front page widgets
parent
c6e52df33a
commit
16b7627b60
|
@ -65,19 +65,13 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepare the widget
|
// prepare the widget
|
||||||
|
$widget['full'] = false;
|
||||||
$widget['name'] = 'LastDays';
|
$widget['name'] = 'LastDays';
|
||||||
$widget['title'] = 'Conferences for the last 2 days';
|
$widget['title'] = 'Conferences for the last 2 days';
|
||||||
if ($time_range_specified) {
|
|
||||||
$widget['time_period'] = "<p class=\"m-3\">time period: <strong>$from_time - $until_time</strong></p>";
|
|
||||||
} else {
|
|
||||||
$widget['time_period'] = '';
|
|
||||||
}
|
|
||||||
if (!empty($conferences['records'])) {
|
if (!empty($conferences['records'])) {
|
||||||
$widget['full'] = true;
|
$widget['full'] = true;
|
||||||
$widget['table_headers'] = array_keys($conferences['records'][0]);
|
$widget['table_headers'] = array_keys($conferences['records'][0]);
|
||||||
$widget['table_records'] = $conferences['records'];
|
$widget['table_records'] = $conferences['records'];
|
||||||
} else {
|
|
||||||
$widget['full'] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// display the widget
|
// display the widget
|
||||||
|
@ -141,19 +135,13 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepare the widget
|
// prepare the widget
|
||||||
|
$widget['full'] = false;
|
||||||
$widget['name'] = 'LastConferences';
|
$widget['name'] = 'LastConferences';
|
||||||
$widget['title'] = "The last $conference_number conferences";
|
$widget['title'] = 'The last ' . $conference_number . ' conferences';
|
||||||
if ($time_range_specified) {
|
|
||||||
$widget['time_period'] = "<p class=\"m-3\">time period: <strong>$from_time - $until_time</strong></p>";
|
|
||||||
} else {
|
|
||||||
$widget['time_period'] = '';
|
|
||||||
}
|
|
||||||
if (!empty($conferences['records'])) {
|
if (!empty($conferences['records'])) {
|
||||||
$widget['full'] = true;
|
$widget['full'] = true;
|
||||||
$widget['table_headers'] = array_keys($conferences['records'][0]);
|
$widget['table_headers'] = array_keys($conferences['records'][0]);
|
||||||
$widget['table_records'] = $conferences['records'];
|
$widget['table_records'] = $conferences['records'];
|
||||||
} else {
|
|
||||||
$widget['full'] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// display the widget
|
// display the widget
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
<div class="card bg-light card-body"><?= $widget['title'] ?></div></a>
|
<div class="card bg-light card-body"><?= $widget['title'] ?></div></a>
|
||||||
|
|
||||||
<div class="collapse show" id="collapse<?= $widget['name'] ?>">
|
<div class="collapse show" id="collapse<?= $widget['name'] ?>">
|
||||||
<?= $widget['time_period'] ?>
|
<?php if ($time_range_specified) { ?>
|
||||||
|
<p class="m-3">time period: <strong><?= $from_time ?> - <?= $until_time ?></strong></p>
|
||||||
|
<?php } ?>
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<?php if ($widget['full'] == true) { ?>
|
<?php if ($widget['full'] == true) { ?>
|
||||||
<table class="table table-striped table-hover table-bordered">
|
<table class="table table-striped table-hover table-bordered">
|
||||||
|
|
Loading…
Reference in New Issue