v56 simplification libellé workshop

This commit is contained in:
Fred Tempez 2023-10-22 21:21:06 +02:00
parent d9fbd6d07a
commit 587d8d0be1
4 changed files with 12 additions and 41 deletions

View File

@ -50,7 +50,7 @@ class common
const ACCESS_TIMER = 1800; const ACCESS_TIMER = 1800;
// Numéro de version // Numéro de version
const ZWII_VERSION = '1.0.55'; const ZWII_VERSION = '1.0.56';
// URL autoupdate // URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/'; const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/';

View File

@ -56,18 +56,6 @@
'help' => 'Classes CSS de la division workshopAccessContainer, élément en ligne workshopAccess' 'help' => 'Classes CSS de la division workshopAccessContainer, élément en ligne workshopAccess'
]); ?> ]); ?>
</div> </div>
<div class="col4">
<?php echo template::checkbox('coursesConfigShowOpeningDate', true, 'Date d\'ouverture', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'openingdate']),
'help' => 'Affiché seulement si l\'accès est limité dans le temps. Classe CSS de l\'élément en ligne : workshopOpeningDate',
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('coursesConfigShowClosingDate', true, 'Date de fermeture', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'closingdate']),
'help' => 'Affiché seulement si l\'accès est limité dans le temps. Classe CSS de l\'élément en ligne : workshopClosingDate',
]); ?>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
@ -120,7 +108,9 @@
<div class="col4"> <div class="col4">
<?php echo template::text('coursesCaptionAccessDate', [ <?php echo template::text('coursesCaptionAccessDate', [
'label' => 'Période', 'label' => 'Période',
'value' => $this->getData(['module', $this->getUrl(0), 'caption', 'accessdate']) 'value' => $this->getData(['module', $this->getUrl(0), 'caption', 'accessdate']),
'help' => 'Insérer deux symboles %s pour placer les dates d\'ouverture et de fermeture',
'placeholder' => 'Ouvre le %s et ferme le %s'
]); ?> ]); ?>
</div> </div>

View File

@ -36,7 +36,7 @@
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?> <?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
<p> <p>
<span class="workshopAuthor"> <span class="workshopAuthor">
<?php echo sprintf(helper::translate('Auteur : %s'), $this->signature($courseValue['author'])); ?> <?php echo $this->signature($courseValue['author']); ?>
</span> </span>
</p> </p>
<?php endif; ?> <?php endif; ?>
@ -45,25 +45,8 @@
<div class="workshopAccessContainer"> <div class="workshopAccessContainer">
<p> <p>
<span class="workshopAccess"> <span class="workshopAccess">
<?php echo $module::$coursesAccess[$courseValue['access']]; ?> <?php echo sprintf(helper::translate($module::$coursesAccess[$courseValue['access']] ), helper::dateUTF8('%d %B %Y', $courseValue['openingDate']), helper::dateUTF8('%d %B %Y', $courseValue['closingDate'])) ?>
</span> </span>
<!--Les dates d'ouverture et de fermeture -->
<?php if ($courseValue['access'] === self::COURSE_ACCESS_DATE): ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'openingdate']) === true): ?>
<p>
<span class="workshopOpeningDate">
<?php echo sprintf(helper::translate('%s Ouvre le %s'), template::ico('calendar-empty'), helper::dateUTF8('%d %B %Y', $courseValue['openingDate'])); ?>
</span>
</p>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'closingdate']) === true): ?>
<p>
<span class="workshopClosingDate">
<?php echo sprintf(helper::translate('%s Ferme le %s'), template::ico('calendar-empty'), helper::dateUTF8('%d %B %Y', $courseValue['closingDate'])); ?>
</span>
</p>
<?php endif; ?>
<?php endif; ?>
</p> </p>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -47,19 +47,17 @@ class workshop extends common
"author" => true, "author" => true,
"description" => true, "description" => true,
"access" => true, "access" => true,
"openingdate" => true,
"closingdate" => true,
"enrolment" => true, "enrolment" => true,
"layout" => 6, "layout" => 6,
"template" => true "template" => true
), ),
"caption" => array( "caption" => array(
"accessopen" => "ouvert", "accessopen" => "Ouvert",
"accessdate" => "p&eacute;riode d&#039;ouverture", "accessdate" => "P&eacute;riode d&#039;ouverture du %s au %s",
"accessclose" => "ferm&eacute;", "accessclose" => "Ferm&eacute;",
"enrolguest" => "anonyme", "enrolguest" => "Anonyme",
"enrolself" => "membres", "enrolself" => "Membres",
"enrolselfkey" => "membres avec cl&eacute;", "enrolselfkey" => "Membres avec cl&eacute;",
"url" => "Acc&eacute;der au cours", "url" => "Acc&eacute;der au cours",
"unsuscribe" => "Me d&eacute;sinscrire" "unsuscribe" => "Me d&eacute;sinscrire"
) )