This commit is contained in:
Dennis Eichhorn 2017-10-02 09:49:15 +02:00
parent 7f327fad53
commit d397a8cea3

View File

@ -8,30 +8,32 @@ $calendar = $this->getData('calendar');
] ]
} }
]'> ]'>
<ul class="weekdays green"> <div class="box wf-100">
<li><?= $this->getHtml('Sunday'); ?> <ul class="weekdays green">
<li><?= $this->getHtml('Monday'); ?> <li><?= $this->getHtml('Sunday'); ?>
<li><?= $this->getHtml('Tuesday'); ?> <li><?= $this->getHtml('Monday'); ?>
<li><?= $this->getHtml('Wednesday'); ?> <li><?= $this->getHtml('Tuesday'); ?>
<li><?= $this->getHtml('Thursday'); ?> <li><?= $this->getHtml('Wednesday'); ?>
<li><?= $this->getHtml('Friday'); ?> <li><?= $this->getHtml('Thursday'); ?>
<li><?= $this->getHtml('Saturday'); ?> <li><?= $this->getHtml('Friday'); ?>
</ul> <li><?= $this->getHtml('Saturday'); ?>
<?php $current = $calendar->getDate()->getMonthCalendar(0); $isActiveMonth = false; </ul>
for($i = 0; $i < 6; $i++) : ?> <?php $current = $calendar->getDate()->getMonthCalendar(0); $isActiveMonth = false;
<ul class="days"> for($i = 0; $i < 6; $i++) : ?>
<?php for($j = 0; $j < 7; $j++) : <ul class="days">
$isActiveMonth = ((int) $current[$i*7+$j]->format('d') === 1) ? !$isActiveMonth : $isActiveMonth; <?php for($j = 0; $j < 7; $j++) :
?> $isActiveMonth = ((int) $current[$i*7+$j]->format('d') === 1) ? !$isActiveMonth : $isActiveMonth;
<?php if($isActiveMonth) :?> ?>
<li class="day<?= $calendar->hasEventOnDate($current[$i*7+$j]) ? ' has-event' : '';?>"> <?php if($isActiveMonth) :?>
<div class="date"><?= $current[$i*7+$j]->format('d'); ?></div> <li class="day<?= $calendar->hasEventOnDate($current[$i*7+$j]) ? ' has-event' : '';?>">
<?php else: ?> <div class="date"><?= $current[$i*7+$j]->format('d'); ?></div>
<li class="day other-month<?= $calendar->hasEventOnDate($current[$i*7+$j]) ? ' has-event' : '';?>"> <?php else: ?>
<div class="date"><?= $current[$i*7+$j]->format('d'); ?></div> <li class="day other-month<?= $calendar->hasEventOnDate($current[$i*7+$j]) ? ' has-event' : '';?>">
<?php endif; ?> <div class="date"><?= $current[$i*7+$j]->format('d'); ?></div>
<?php endfor; ?> <?php endif; ?>
</li> <?php endfor; ?>
</ul> </li>
<?php endfor;?> </ul>
<?php endfor;?>
</div>
</div> </div>