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');
|
return $this->get('ROOMS.'.$this->getSlug().'.PREVIEW');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function requestsWide() {
|
||||||
|
return $this->get('ROOMS.'.$this->getSlug().'.WIDE');
|
||||||
|
}
|
||||||
|
|
||||||
public function hasSchedule() {
|
public function hasSchedule() {
|
||||||
return $this->get('ROOMS.'.$this->getSlug().'.SCHEDULE') && $this->has('SCHEDULE');
|
return $this->get('ROOMS.'.$this->getSlug().'.SCHEDULE') && $this->has('SCHEDULE');
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<div class="row room-group room-group-n<?=h($i++)?>">
|
<div class="row room-group room-group-n<?=h($i++)?>">
|
||||||
|
|
||||||
<? $count = count($rooms); ?>
|
<? $count = count($rooms); $idx = 0 ?>
|
||||||
<? foreach($rooms as $idx => $room): ?>
|
<? foreach($rooms as $room): ?>
|
||||||
<div class="
|
<div class="
|
||||||
room
|
room
|
||||||
room-<?=h($room->getSlug())?>
|
room-<?=h($room->getSlug())?>
|
||||||
|
@ -28,6 +28,10 @@
|
||||||
<? if( ($count % 2 == 1) && ($idx == $count - 1) ): ?>
|
<? if( ($count % 2 == 1) && ($idx == $count - 1) ): ?>
|
||||||
wide
|
wide
|
||||||
col-xs-12
|
col-xs-12
|
||||||
|
<? elseif($room->requestsWide()): ?>
|
||||||
|
<? $count++; $idx++ ?>
|
||||||
|
wide
|
||||||
|
col-xs-12
|
||||||
<? else: ?>
|
<? else: ?>
|
||||||
narrow
|
narrow
|
||||||
<? if($room->hasPreview() && $room->hasSchedule()): ?>
|
<? if($room->hasPreview() && $room->hasSchedule()): ?>
|
||||||
|
@ -89,6 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<? $idx++ ?>
|
||||||
<? endforeach ?>
|
<? endforeach ?>
|
||||||
</div>
|
</div>
|
||||||
<? endforeach ?>
|
<? endforeach ?>
|
||||||
|
|
Loading…
Reference in a new issue