oms-Calendar/Theme/Backend/Components/Calendar/mini.tpl.php
Dennis Eichhorn b3cd6855ec
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
fix permissions
2025-04-02 14:15:04 +00:00

35 lines
1.7 KiB
PHP

<div id="calendar" class="m-calendar m-calendar-mini" data-action='[
{
"listener": "click", "selector": "#calendar span.tag", "action": [
{"key": 1, "type": "dom.popup", "tpl": "calendar-event-popup-tpl", "aniIn": "fadeIn"}
]
}
]'>
<ul class="weekdays green">
<li><?= $this->getHtml('Sunday', 'Calendar'); ?>
<li><?= $this->getHtml('Monday', 'Calendar'); ?>
<li><?= $this->getHtml('Tuesday', 'Calendar'); ?>
<li><?= $this->getHtml('Wednesday', 'Calendar'); ?>
<li><?= $this->getHtml('Thursday', 'Calendar'); ?>
<li><?= $this->getHtml('Friday', 'Calendar'); ?>
<li><?= $this->getHtml('Saturday', 'Calendar'); ?>
</ul>
<?php $current = $this->calendar->getDate()->getMonthCalendar(0); $isActiveMonth = false;
for ($i = 0; $i < 6; ++$i) : ?>
<ul class="days">
<?php for ($j = 0; $j < 7; ++$j) :
$isActiveMonth = ((int) $current[$i * 7 + $j]->format('d') === 1) ? !$isActiveMonth : $isActiveMonth;
?>
<?php if ($isActiveMonth) :?>
<li class="day<?= $this->calendar->hasEventOnDate($current[$i * 7 + $j]) ? ' has-event' : '';?>">
<div class="date"><?= $current[$i * 7 + $j]->format('d'); ?></div>
<?php else: ?>
<li class="day other-month<?= $this->calendar->hasEventOnDate($current[$i * 7 + $j]) ? ' has-event' : '';?>">
<div class="date"><?= $current[$i * 7 + $j]->format('d'); ?></div>
<?php endif; ?>
<?php endfor; ?>
</li>
</ul>
<?php endfor;?>
</section>
</div>