aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--model/Room.php4
-rw-r--r--template/overview.phtml9
2 files changed, 11 insertions, 2 deletions
diff --git a/model/Room.php b/model/Room.php
index b4fc1d1..7386c1d 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -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');
}
diff --git a/template/overview.phtml b/template/overview.phtml
index 45e2189..c23320e 100644
--- a/template/overview.phtml
+++ b/template/overview.phtml
@@ -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 ?>