diff options
author | jwacalex <aboehm@dompfaffenweg.de> | 2016-11-30 23:23:49 +0100 |
---|---|---|
committer | jwacalex <aboehm@dompfaffenweg.de> | 2016-11-30 23:23:49 +0100 |
commit | 45cda10479a16c237f917b69dc24ab3f31bffa89 (patch) | |
tree | 5aa98a6504d7558b56b7777f04b87a3b976bbedf /includes/view/EventConfig_view.php | |
parent | 79b9f9448e4f3ad7abb8d795c1404b3221c95bf9 (diff) | |
parent | 53e12065c76af4e5a0a2690e92e6724eed9f2895 (diff) |
merged master and issue
Diffstat (limited to 'includes/view/EventConfig_view.php')
-rw-r--r-- | includes/view/EventConfig_view.php | 40 |
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); |