2023-10-22 17:34:27 +02:00
|
|
|
<?php $startRow = 0; ?>
|
|
|
|
<?php foreach ($this->getData(['course']) as $courseId => $courseValue): ?>
|
2023-11-08 15:06:32 +01:00
|
|
|
<!-- Filtre de catégorie -->
|
|
|
|
<?php if ($courseValue['category'] !== $this->getData(['module', $this->getUrl(0), 'config', 'category'])):?>
|
|
|
|
<?php continue; ?>
|
|
|
|
<?php endif; ?>
|
2023-10-22 17:34:27 +02:00
|
|
|
<?php if ($startRow === 0): ?>
|
|
|
|
<div class="row workshopRowContainer">
|
|
|
|
<?php endif; ?>
|
|
|
|
<!-- Layout en colonnes -->
|
|
|
|
<div class="workshopItemContainer col<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>">
|
|
|
|
<!-- Affchage par bloc et bordure -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
|
|
|
<div class="block">
|
|
|
|
<h4>
|
2023-10-22 11:36:26 +02:00
|
|
|
<?php else: ?>
|
|
|
|
<p>
|
2023-10-22 17:34:27 +02:00
|
|
|
<?php endif; ?>
|
2023-10-19 11:41:54 +02:00
|
|
|
|
2023-10-22 17:34:27 +02:00
|
|
|
<!-- Insère le titre court dans tous les cas -->
|
|
|
|
<span class="workshopTitle">
|
|
|
|
<?php echo $courseValue['title']; ?>
|
|
|
|
</span>
|
2023-10-19 11:41:54 +02:00
|
|
|
|
2023-10-22 17:34:27 +02:00
|
|
|
<!-- Fin du bloc et bordure titre 4 -->
|
2023-10-22 11:36:26 +02:00
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
2023-10-22 17:34:27 +02:00
|
|
|
</h4>
|
|
|
|
<?php else: ?>
|
|
|
|
<p>
|
2023-10-19 13:47:36 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<!-- Description -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'description']) === true): ?>
|
2023-10-22 11:36:26 +02:00
|
|
|
<p>
|
|
|
|
<span class="workshopDescription">
|
2023-10-19 13:47:36 +02:00
|
|
|
<?php echo $courseValue['description']; ?>
|
2023-10-22 11:36:26 +02:00
|
|
|
</span>
|
|
|
|
</p>
|
2023-10-22 17:34:27 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<!-- Author -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
|
|
|
|
<p>
|
|
|
|
<span class="workshopAuthor">
|
2023-10-22 21:21:06 +02:00
|
|
|
<?php echo $this->signature($courseValue['author']); ?>
|
2023-10-22 17:34:27 +02:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
<!-- Modalité d'ouverture -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'access']) === true): ?>
|
|
|
|
<div class="workshopAccessContainer">
|
2023-10-19 13:47:36 +02:00
|
|
|
<p>
|
2023-10-22 17:34:27 +02:00
|
|
|
<span class="workshopAccess">
|
2023-10-22 21:21:06 +02:00
|
|
|
<?php echo sprintf(helper::translate($module::$coursesAccess[$courseValue['access']] ), helper::dateUTF8('%d %B %Y', $courseValue['openingDate']), helper::dateUTF8('%d %B %Y', $courseValue['closingDate'])) ?>
|
2023-10-22 11:36:26 +02:00
|
|
|
</span>
|
2023-10-19 15:40:24 +02:00
|
|
|
</p>
|
2023-10-22 17:34:27 +02:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<!-- Modalité d'inscription -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'enrolment']) === true): ?>
|
|
|
|
<p>
|
|
|
|
<span class="workshopEnrolment">
|
2023-10-22 17:39:52 +02:00
|
|
|
<?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
|
2023-10-22 17:34:27 +02:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<?php endif; ?>
|
2023-10-19 15:40:24 +02:00
|
|
|
|
2023-10-22 17:34:27 +02:00
|
|
|
<!-- Lien accès au cours-->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col6 workshopLinkContainer">
|
|
|
|
<?php if (
|
|
|
|
$courseValue['access'] === self::COURSE_ACCESS_OPEN
|
|
|
|
||
|
|
|
|
($courseValue['access'] === self::COURSE_ACCESS_DATE && time() >= $courseValue['openingDate'] && time() <= $courseValue['closingDate'])
|
|
|
|
): ?>
|
|
|
|
<span class="workshopSuscribe">
|
2023-10-22 11:36:26 +02:00
|
|
|
<a href="<?php echo helper::baseUrl(); ?>course/swap/<?php echo $courseId; ?>">
|
|
|
|
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'url']); ?>
|
|
|
|
</a>
|
|
|
|
</span>
|
2023-10-22 17:34:27 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="col6 textAlignRight">
|
|
|
|
<!-- Lien désinscription-->
|
|
|
|
<?php if ($this->getData(['enrolment', $courseId, $this->getUser('id')])): ?>
|
|
|
|
<span class="workshopUnsuscribe">
|
2023-10-22 11:36:26 +02:00
|
|
|
<a href="<?php echo helper::baseUrl(); ?>course/unsuscribe/<?php echo $courseId; ?>">
|
|
|
|
<?php echo $this->getData(['module', $this->getUrl(0), 'caption', 'unsuscribe']); ?>
|
|
|
|
</a>
|
2023-10-22 17:34:27 +02:00
|
|
|
</span>
|
|
|
|
<?php endif; ?>
|
2023-10-19 13:47:36 +02:00
|
|
|
</div>
|
2023-10-22 17:34:27 +02:00
|
|
|
</div>
|
|
|
|
<!-- Fin du bloc et bordure -->
|
|
|
|
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php $startRow = $startRow + $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>
|
|
|
|
<?php if ($startRow === 12): ?>
|
2023-10-19 13:47:36 +02:00
|
|
|
</div>
|
2023-10-22 17:34:27 +02:00
|
|
|
<?php $startRow = 0; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endforeach; ?>
|