aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assets/css/_closed.less6
-rw-r--r--model/Conferences.php17
-rw-r--r--template/allclosed.phtml29
-rw-r--r--view/allclosed.php1
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 @@
<div class="container about">
<? include("$assemblies/countdown.phtml") ?>
- <p>
- You can watch most of our Recordings at <a href="<?=h($conference->getReleasesUrl())?>"><?=h($conference->getReleasesUrl())?></a>.
- </p>
+ <? if($last): ?>
+
+ <div class="well">
+ <? // FIXME when $last would be a Conference object, this code could be shared with clodes.phtml ?>
+ <h1><?=h($last['title'])?> is over!</h1>
+
+ <? if($last['releases']): ?>
+ Recordings will be released at <a href="<?=h($last['releases'])?>"><?=h($last['releases'])?></a>.
+ <? endif ?>
+
+ <? if($last['relive']): ?>
+ <? if($last['releases']): ?>
+ Until all recordings are released, <a href="<?=h($last['relive'])?>">ReLive</a> remains available.
+ <? else: ?>
+ You can still watch stream dumps <a href="<?=h($last['relive'])?>">here</a>.
+ <? endif ?>
+ <? endif ?>
+ </div>
+
+ <? else: ?>
+
+ <p>
+ You can watch most of our Recordings at <a href="<?=h($conference->getReleasesUrl())?>"><?=h($conference->getReleasesUrl())?></a>.
+ </p>
+
+ <? endif ?>
<br><br><br>
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(),
));