diff options
author | MaZderMind | 2015-12-02 18:17:18 +0100 |
---|---|---|
committer | MaZderMind | 2015-12-02 18:17:18 +0100 |
commit | 9d434af7f2ce972a65043d5fa3c7f476b91c1fda (patch) | |
tree | 984d0a33e8b61a3b2b3c2bd847a551c5f8bc3a6e /template | |
parent | 8a4fc337510ddaeb8ea3f27b7b5e807416c001ae (diff) |
generate closed-page countdown on server-side
Diffstat (limited to 'template')
-rw-r--r-- | template/allclosed.phtml | 5 | ||||
-rw-r--r-- | template/assemblies/countdown.phtml | 4 | ||||
-rw-r--r-- | template/closed.phtml | 5 | ||||
-rw-r--r-- | template/page.phtml | 1 |
4 files changed, 6 insertions, 9 deletions
diff --git a/template/allclosed.phtml b/template/allclosed.phtml index 31947a7..f999ddc 100644 --- a/template/allclosed.phtml +++ b/template/allclosed.phtml @@ -1,8 +1,5 @@ <div class="container about"> - <? if($next): ?> - <h2>See you soon at <?=h($next['name'])?></h2> - <span class="countdown" data-dt="<?=h($next['start_date'])?>"></span> - <? endif ?> + <? include("$assemblies/countdown.phtml") ?> <p> You can watch most of our Recordings at <a href="<?=h($conference->getReleasesUrl())?>"><?=h($conference->getReleasesUrl())?></a>. diff --git a/template/assemblies/countdown.phtml b/template/assemblies/countdown.phtml new file mode 100644 index 0000000..e72079b --- /dev/null +++ b/template/assemblies/countdown.phtml @@ -0,0 +1,4 @@ +<? if($next): ?> + <h2>See you soon at <?=h($next['name'])?></h2> + <span class="countdown"><?=h(days_diff_readable($next['start_date']))?></span> +<? endif ?> diff --git a/template/closed.phtml b/template/closed.phtml index 0b56e74..3e6ebf0 100644 --- a/template/closed.phtml +++ b/template/closed.phtml @@ -3,10 +3,7 @@ <h1><?=h($conference->getTitle())?> is over!</h1> <? endif ?> - <? if($next): ?> - <h2>See you soon at <?=h($next['name'])?></h2> - <span class="countdown" data-dt="<?=h($next['start_date'])?>"></span> - <? endif ?> + <? include("$assemblies/countdown.phtml") ?> <p> <? if($conference->hasReleases()): ?> diff --git a/template/page.phtml b/template/page.phtml index ac639a2..ae797c0 100644 --- a/template/page.phtml +++ b/template/page.phtml @@ -39,7 +39,6 @@ <script type="text/javascript" src="<?=h($assets)?>js/lib/jquery.scrollTo.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>js/lib/bootstrap.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>js/lib/bootstrap-datepicker.min.js"></script> - <script type="text/javascript" src="<?=h($assets)?>js/lib/moment.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>mejs/mediaelement-and-player.min.js"></script> <script type="text/javascript" src="<?=h($assets)?>js/lustiges-script.js"></script> |