mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
allow rooms to be forced to full-width
This commit is contained in:
parent
83d4c7d017
commit
cfecaf7734
2 changed files with 11 additions and 2 deletions
|
@ -72,6 +72,10 @@ class Room extends ModelBase
|
|||
return $this->get('ROOMS.'.$this->getSlug().'.PREVIEW');
|
||||
}
|
||||
|
||||
public function requestsWide() {
|
||||
return $this->get('ROOMS.'.$this->getSlug().'.WIDE');
|
||||
}
|
||||
|
||||
public function hasSchedule() {
|
||||
return $this->get('ROOMS.'.$this->getSlug().'.SCHEDULE') && $this->has('SCHEDULE');
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
<? endif ?>
|
||||
<div class="row room-group room-group-n<?=h($i++)?>">
|
||||
|
||||
<? $count = count($rooms); ?>
|
||||
<? foreach($rooms as $idx => $room): ?>
|
||||
<? $count = count($rooms); $idx = 0 ?>
|
||||
<? foreach($rooms as $room): ?>
|
||||
<div class="
|
||||
room
|
||||
room-<?=h($room->getSlug())?>
|
||||
|
@ -28,6 +28,10 @@
|
|||
<? if( ($count % 2 == 1) && ($idx == $count - 1) ): ?>
|
||||
wide
|
||||
col-xs-12
|
||||
<? elseif($room->requestsWide()): ?>
|
||||
<? $count++; $idx++ ?>
|
||||
wide
|
||||
col-xs-12
|
||||
<? else: ?>
|
||||
narrow
|
||||
<? if($room->hasPreview() && $room->hasSchedule()): ?>
|
||||
|
@ -89,6 +93,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? $idx++ ?>
|
||||
<? endforeach ?>
|
||||
</div>
|
||||
<? endforeach ?>
|
||||
|
|
Loading…
Reference in a new issue