show al categories

This commit is contained in:
Fred Tempez 2023-11-19 17:52:02 +01:00
parent b92944e8e3
commit 42a228a689

View File

@ -1,7 +1,10 @@
<?php $startRow = 0; ?> <?php $startRow = 0; ?>
<?php foreach ($this->getData(['course']) as $courseId => $courseValue): ?> <?php foreach ($this->getData(['course']) as $courseId => $courseValue): ?>
<!-- Filtre de catégorie --> <!-- Filtre de catégorie -->
<?php if ($courseValue['category'] !== $this->getData(['module', $this->getUrl(0), 'config', 'category'])): ?> <?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'category']) !== 'all' &&
$courseValue['category'] !== $this->getData(['module', $this->getUrl(0), 'config', 'category'])
): ?>
<?php continue; ?> <?php continue; ?>
<?php endif; ?> <?php endif; ?>
<?php if ($startRow === 0): ?> <?php if ($startRow === 0): ?>
@ -63,39 +66,43 @@
<?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?> <?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
</span> </span>
</p> </p>
<?php if ($this->getData(['course', $courseId, 'limitEnrolment']) === true ):?> <?php if ($this->getData(['course', $courseId, 'limitEnrolment']) === true): ?>
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'enrolmentLimit']); ?> <p>
<?php echo helper::dateUTF8(' %d %B %Y', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI); ?> <span class="workshopEnrolmentLimit">
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'enrolmentLimit']); ?>
<?php echo helper::dateUTF8(' %d %B %Y', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $courseId, 'limitEnrolmentDate']), self::$i18nUI); ?>
</span>
</p>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<!-- Lien accès au contenu--> <!-- Lien accès au contenu-->
<div class="row"> <div class="row">
<div class="col6 workshopLinkContainer"> <div class="col6 workshopLinkContainer">
<?php if ( <?php if (
$courseValue['access'] === self::COURSE_ACCESS_OPEN $courseValue['access'] === self::COURSE_ACCESS_OPEN
|| ||
($courseValue['access'] === self::COURSE_ACCESS_DATE && time() >= $courseValue['openingDate'] && time() <= $courseValue['closingDate']) ($courseValue['access'] === self::COURSE_ACCESS_DATE && time() >= $courseValue['openingDate'] && time() <= $courseValue['closingDate'])
): ?> ): ?>
<span class="workshopSuscribe"> <span class="workshopSuscribe">
<a href="<?php echo helper::baseUrl(); ?>course/swap/<?php echo $courseId; ?>"> <a href="<?php echo helper::baseUrl(); ?>course/swap/<?php echo $courseId; ?>">
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'url']); ?> <?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'url']); ?>
</a> </a>
</span> </span>
<?php endif; ?> <?php endif; ?>
</div>
<div class="col6 textAlignRight">
<!-- Lien désinscription-->
<?php if ($this->getData(['enrolment', $courseId, $this->getUser('id')])): ?>
<span class="workshopUnsuscribe">
<a href="<?php echo helper::baseUrl(); ?>course/unsuscribe/<?php echo $courseId; ?>">
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'unsuscribe']); ?>
</a>
</span>
<?php endif; ?>
</div>
</div> </div>
<!-- Fin du bloc et bordure --> <div class="col6 textAlignRight">
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> <!-- Lien désinscription-->
<?php if ($this->getData(['enrolment', $courseId, $this->getUser('id')])): ?>
<span class="workshopUnsuscribe">
<a href="<?php echo helper::baseUrl(); ?>course/unsuscribe/<?php echo $courseId; ?>">
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'unsuscribe']); ?>
</a>
</span>
<?php endif; ?>
</div>
</div>
<!-- Fin du bloc et bordure -->
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>