summaryrefslogtreecommitdiff
path: root/includes/view/EventConfig_view.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/view/EventConfig_view.php')
-rw-r--r--includes/view/EventConfig_view.php40
1 files changed, 28 insertions, 12 deletions
diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php
index d184166f..37a19839 100644
--- a/includes/view/EventConfig_view.php
+++ b/includes/view/EventConfig_view.php
@@ -6,33 +6,49 @@
*/
function EventConfig_countdown_page($event_config) {
if ($event_config == null) {
- return info(_("We got no information about the event right now."), true);
+ return div('col-md-12 text-center', [
+ heading(sprintf(_("Welcome to the %s!"), '<span class="icon-icon_angel"></span> ENGELSYSTEM'), 2)
+ ]);
}
$elements = [];
if ($event_config['event_name'] != null) {
- $elements[] = heading($event_config['event_name'], 2);
- }
-
- if ($event_config['event_start_date'] != null && $event_config['event_end_date'] != null) {
- $elements[] = sprintf(_("from %s to %s"), date("Y-m-d", $event_config['event_start_date']), date("Y-m-d", $event_config['event_end_date']));
+ $elements[] = div('col-sm-12 text-center', [
+ heading(sprintf(_("Welcome to the %s!"), $event_config['event_name'] . ' <span class="icon-icon_angel"></span> ENGELSYSTEM'), 2)
+ ]);
}
if ($event_config['buildup_start_date'] != null && time() < $event_config['buildup_start_date']) {
- $elements[] = '<h2 class="moment-countdown" data-timestamp="' . $event_config['buildup_start_date'] . '">' . _("Buildup starts in %c") . '</h2>';
+ $elements[] = div('col-sm-3 text-center hidden-xs', [
+ heading(_("Buildup starts"), 4),
+ '<span class="moment-countdown text-big" data-timestamp="' . $event_config['buildup_start_date'] . '">%c</span>',
+ '<small>' . date(_("Y-m-d"), $event_config['buildup_start_date']) . '</small>'
+ ]);
}
if ($event_config['event_start_date'] != null && time() < $event_config['event_start_date']) {
- $elements[] = '<h2 class="moment-countdown" data-timestamp="' . $event_config['event_start_date'] . '">' . _("Event starts in %c") . '</h2>';
+ $elements[] = div('col-sm-3 text-center hidden-xs', [
+ heading(_("Event starts"), 4),
+ '<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_start_date'] . '">%c</span>',
+ '<small>' . date(_("Y-m-d"), $event_config['event_start_date']) . '</small>'
+ ]);
}
- if ($event_config['event_end_date'] != null && time() < $event_config['event_end_date'] && ($event_config['event_start_date'] == null || time() > $event_config['event_start_date'])) {
- $elements[] = '<h2 class="moment-countdown" data-timestamp="' . $event_config['event_end_date'] . '">' . _("Event ends in %c") . '</h2>';
+ if ($event_config['event_end_date'] != null && time() < $event_config['event_end_date']) {
+ $elements[] = div('col-sm-3 text-center hidden-xs', [
+ heading(_("Event ends"), 4),
+ '<span class="moment-countdown text-big" data-timestamp="' . $event_config['event_end_date'] . '">%c</span>',
+ '<small>' . date(_("Y-m-d"), $event_config['event_end_date']) . '</small>'
+ ]);
}
- if ($event_config['teardown_end_date'] != null && time() < $event_config['teardown_end_date'] && ($event_config['event_start_date'] == null || time() > $event_config['event_start_date'])) {
- $elements[] = '<h2 class="moment-countdown" data-timestamp="' . $event_config['teardown_end_date'] . '">' . _("Teardown ends in %c") . '</h2>';
+ if ($event_config['teardown_end_date'] != null && time() < $event_config['teardown_end_date']) {
+ $elements[] = div('col-sm-3 text-center hidden-xs', [
+ heading(_("Teardown ends"), 4),
+ '<span class="moment-countdown text-big" data-timestamp="' . $event_config['teardown_end_date'] . '">%c</span>',
+ '<small>' . date(_("Y-m-d"), $event_config['teardown_end_date']) . '</small>'
+ ]);
}
return join("", $elements);