diff options
author | MaZderMind | 2018-05-12 17:46:22 +0200 |
---|---|---|
committer | MaZderMind | 2018-05-12 17:46:22 +0200 |
commit | 395f65837365fa960d22ab27c00db44ac1e337fc (patch) | |
tree | 83e06daa5667369b892587fc8ee932efff20f6eb /template | |
parent | da0cb4737b70340adee47c6cb283fa96d7ba103e (diff) | |
parent | ae11a5e875ae4c0aa443b918441d61f40eaf205b (diff) |
Merge branch 'dedeibel-sched-link-and-overview-wide-fixes'
Diffstat (limited to 'template')
-rw-r--r-- | template/assemblies/schedule.phtml | 6 | ||||
-rw-r--r-- | template/overview.phtml | 29 |
2 files changed, 27 insertions, 8 deletions
diff --git a/template/assemblies/schedule.phtml b/template/assemblies/schedule.phtml index 62eb077..461353c 100644 --- a/template/assemblies/schedule.phtml +++ b/template/assemblies/schedule.phtml @@ -17,7 +17,11 @@ <? if($scheduleRoom): ?> <a class="inner" - href="<?=h($scheduleRoom->createTabObject()->getLink($roomname))?>" + <? if (isset($stream)): ?> + href="<?=h($scheduleRoom->createTabObject($stream->getSelection())->getLink($roomname))?>" + <? else: ?> + href="<?=h($scheduleRoom->createTabObject()->getLink($roomname))?>" + <? endif ?> title="Switch to <?=h($scheduleRoom->getDisplay())?>" > <? else: ?> diff --git a/template/overview.phtml b/template/overview.phtml index 71414ec..e441112 100644 --- a/template/overview.phtml +++ b/template/overview.phtml @@ -13,17 +13,29 @@ <? $count = count($rooms); $idx = 0 ?> <? foreach($rooms as $room): ?> + <? + $is_wide = 0; + /* when the count is odd and this is the last item - make it full width */ + if (($count % 2 == 1) && ($idx == $count - 1)) { + $is_wide = 1; + } + elseif ($room->requestsWide()) { + $is_wide = 1; + $count++; + /* Increase the index if we are using a whole line, this means when the room is + * an even entry. Odd entries on the other hand steal one index from the + * "previous" row which they originally belong to. */ + if ($idx % 2 != 1) { + $idx++; + } + } + ?> + <div class=" room room-<?=h($room->getSlug())?> clearfix - - <? /* when the count is odd and this is the last item - make it full width */ ?> - <? if( ($count % 2 == 1) && ($idx == $count - 1) ): ?> - wide - col-xs-12 - <? elseif($room->requestsWide()): ?> - <? $count++; $idx++ ?> + <? if ($is_wide): ?> wide col-xs-12 <? else: ?> @@ -83,6 +95,9 @@ </a> </div> <? $idx++ ?> + <? if ($is_wide): ?> + <div class="clearfix"></div> + <? endif ?> <? endforeach ?> </div> <? endforeach ?> |