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;
// Numéro de version
const ZWII_VERSION = '1.0.55';
const ZWII_VERSION = '1.0.56';
// URL autoupdate
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'
]); ?>
</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 class="row">
<div class="col12">
@ -120,7 +108,9 @@
<div class="col4">
<?php echo template::text('coursesCaptionAccessDate', [
'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>

View File

@ -36,7 +36,7 @@
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
<p>
<span class="workshopAuthor">
<?php echo sprintf(helper::translate('Auteur : %s'), $this->signature($courseValue['author'])); ?>
<?php echo $this->signature($courseValue['author']); ?>
</span>
</p>
<?php endif; ?>
@ -45,25 +45,8 @@
<div class="workshopAccessContainer">
<p>
<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>
<!--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>
</div>
<?php endif; ?>

View File

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