From 90fa5e229c8e25b0371cfd916f3463f9ea50d881 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 30 Dec 2015 23:08:19 +0100 Subject: show last conference & relive on startpage --- assets/css/_closed.less | 6 ++++++ model/Conferences.php | 17 +++++++++++++++++ template/allclosed.phtml | 29 ++++++++++++++++++++++++++--- view/allclosed.php | 1 + 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/assets/css/_closed.less b/assets/css/_closed.less index ff55b75..e66f080 100644 --- a/assets/css/_closed.less +++ b/assets/css/_closed.less @@ -8,6 +8,12 @@ body.not-started { text-align: center; } + .well { + text-align: center; + padding: 25px 5px; + margin-top: 25px; + } + .countdown { display: block; text-align: center; diff --git a/model/Conferences.php b/model/Conferences.php index 9396a48..ab7fe0e 100644 --- a/model/Conferences.php +++ b/model/Conferences.php @@ -33,6 +33,20 @@ class Conferences extends ModelBase return count(Conferences::getActiveConferences()); } + public static function getConferencesSorted() { + $sorted = Conferences::getConferences(); + + usort($sorted, function($a, $b) { + return @$b['CONFIG']['CONFERENCE']['STARTS_AT'] - @$a['CONFIG']['CONFERENCE']['STARTS_AT']; + }); + + return $sorted; + } + + public static function getLastConference() { + return Conferences::getConferencesSorted()[0]; + } + public static function exists($mandator) { return array_key_exists($mandator, Conferences::getConferences()); } @@ -50,6 +64,9 @@ class Conferences extends ModelBase 'title' => $conf->getTitle(), 'description' => $conf->getDescription(), + 'relive' => forceslash($mandator).$conf->getReliveUrl(), + 'releases' => $conf->getReleasesUrl(), + 'CONFIG' => $GLOBALS['CONFIG'], ]; unset($GLOBALS['CONFIG']); diff --git a/template/allclosed.phtml b/template/allclosed.phtml index f999ddc..4d4ff38 100644 --- a/template/allclosed.phtml +++ b/template/allclosed.phtml @@ -1,9 +1,32 @@
-

- You can watch most of our Recordings at getReleasesUrl())?>. -

+ + +
+ +

is over!

+ + + Recordings will be released at . + + + + + Until all recordings are released, ReLive remains available. + + You can still watch stream dumps here. + + +
+ + + +

+ You can watch most of our Recordings at getReleasesUrl())?>. +

+ +


diff --git a/view/allclosed.php b/view/allclosed.php index 869cbc1..3e0cb0d 100644 --- a/view/allclosed.php +++ b/view/allclosed.php @@ -9,4 +9,5 @@ echo $tpl->render(array( 'next' => @$events[0], 'events' => $events, + 'last' => Conferences::getLastConference(), )); -- cgit v1.2.3