diff options
author | msquare <msquare@notrademark.de> | 2016-11-20 17:54:16 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-11-20 17:54:16 +0100 |
commit | 5ae328b2b1d46b25131e2755939bb326efcdc507 (patch) | |
tree | 65cc81107c92a44c786f5f08051b93ea4555fe61 /includes/view | |
parent | 409761ce4b2f919ca40aa8319a13473d9eb789ae (diff) |
hide event countdown for mobile clients
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/EventConfig_view.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/includes/view/EventConfig_view.php b/includes/view/EventConfig_view.php index bf3ad3a4..37a19839 100644 --- a/includes/view/EventConfig_view.php +++ b/includes/view/EventConfig_view.php @@ -14,39 +14,39 @@ function EventConfig_countdown_page($event_config) { $elements = []; if ($event_config['event_name'] != null) { - $elements[] = div('col-md-12 text-center', [ + $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) { - $elements[] = div('col-md-3 text-center', [ - heading(_("Buildup starts"), 3), - '<h2 class="moment-countdown" data-timestamp="' . $event_config['buildup_start_date'] . '">%c</h2>', + if ($event_config['buildup_start_date'] != null && time() < $event_config['buildup_start_date']) { + $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) { - $elements[] = div('col-md-3 text-center', [ - heading(_("Event starts"), 3), - '<h2 class="moment-countdown" data-timestamp="' . $event_config['event_start_date'] . '">%c</h2>', + if ($event_config['event_start_date'] != null && time() < $event_config['event_start_date']) { + $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) { - $elements[] = div('col-md-3 text-center', [ - heading(_("Event ends"), 3), - '<h2 class="moment-countdown" data-timestamp="' . $event_config['event_end_date'] . '">%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) { - $elements[] = div('col-md-3 text-center', [ - heading(_("Teardown ends"), 3), - '<h2 class="moment-countdown" data-timestamp="' . $event_config['teardown_end_date'] . '">%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>' ]); } |