course supprime le titre long
nom du module Workshop
This commit is contained in:
parent
0371fae301
commit
b231450ff5
@ -904,7 +904,7 @@ class layout extends common
|
||||
$leftItems .= '<li><select id="barSelectCourse" >';
|
||||
$leftItems .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
|
||||
foreach ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group')) as $key => $value) {
|
||||
$leftItems .= '<option name="' . $value['shortTitle'] . '" value="' . helper::baseUrl(true) . 'course/swap/' . $key . '" ' . ($key === self::$siteContent ? 'selected' : '') . '>' . $value['shortTitle'] . '</option>';
|
||||
$leftItems .= '<option name="' . $value['title'] . '" value="' . helper::baseUrl(true) . 'course/swap/' . $key . '" ' . ($key === self::$siteContent ? 'selected' : '') . '>' . $value['title'] . '</option>';
|
||||
}
|
||||
$leftItems .= '</select></li>';
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class course extends common
|
||||
|
||||
public function index()
|
||||
{
|
||||
$courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'shortTitle');
|
||||
$courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'title');
|
||||
ksort($courseIdShortTitle);
|
||||
foreach ($courseIdShortTitle as $courseId => $courseTitle) {
|
||||
$categorieUrl = helper::baseUrl(!helper::checkRewrite()) . 'course/swap/' . $courseId;
|
||||
@ -146,7 +146,7 @@ class course extends common
|
||||
$courseId,
|
||||
[
|
||||
'title' => $this->getInput('courseAddTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'shortTitle' => $this->getInput('courseAddShortTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'title' => $this->getInput('courseAddShortTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'author' => $this->getInput('courseAddAuthor'),
|
||||
'homePageId' => 'accueil',
|
||||
'category' => $this->getInput('courseAddCategories'),
|
||||
@ -201,8 +201,7 @@ class course extends common
|
||||
'course',
|
||||
$courseId,
|
||||
[
|
||||
'title' => $this->getInput('courseEditTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'shortTitle' => $this->getInput('courseEditShortTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'title' => $this->getInput('courseEditShortTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'author' => $this->getInput('courseEditAuthor'),
|
||||
'homePageId' => $this->getInput('courseEditHomePageId'),
|
||||
'category' => $this->getInput('courseEditCategories'),
|
||||
@ -601,7 +600,7 @@ class course extends common
|
||||
$to = helper::dateUTF8('%d %B %Y', $this->getData(['course', $courseId, 'closingDate']), self::$i18nUI) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $this->getData(['course', $courseId, 'closingDate']), self::$i18nUI);
|
||||
$message = sprintf(helper::translate('Ce cours ferme le %s'), $to);
|
||||
} else {
|
||||
$message = sprintf(helper::translate('Bienvenue dans le cours %s'), $this->getData(['course', $courseId, 'shortTitle']));
|
||||
$message = sprintf(helper::translate('Bienvenue dans le cours %s'), $this->getData(['course', $courseId, 'title']));
|
||||
}
|
||||
$_SESSION['ZWII_SITE_CONTENT'] = $courseId;
|
||||
}
|
||||
@ -676,7 +675,7 @@ class course extends common
|
||||
foreach ($history['history'] as $pageId => $time) {
|
||||
self::$userHistory[$pageId] = [
|
||||
helper::dateUTF8('%d %B %Y - %H:%M:%S', $time),
|
||||
$pages['page'][$pageId]['shortTitle'],
|
||||
$pages['page'][$pageId]['title'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -764,7 +763,7 @@ class course extends common
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'shortTitle'])),
|
||||
'title' => sprintf(helper::translate('Accéder au cours %s'), $this->getData(['course', $this->getUrl(2), 'title'])),
|
||||
'view' => 'enrol',
|
||||
'display' => self::DISPLAY_LAYOUT_LIGHT,
|
||||
]);
|
||||
|
@ -17,19 +17,11 @@
|
||||
<h4>
|
||||
<?php echo helper::translate('Paramètres'); ?>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::text('courseEditTitle', [
|
||||
'label' => 'Titre',
|
||||
'value' => $this->getdata(['course', $this->getUrl(2), 'title'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col7">
|
||||
<?php echo template::text('courseEditShortTitle', [
|
||||
'label' => 'Titre court',
|
||||
'value' => $this->getdata(['course', $this->getUrl(2), 'shortTitle'])
|
||||
'label' => 'Titre',
|
||||
'value' => $this->getdata(['course', $this->getUrl(2), 'title'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="col1">
|
||||
<?php echo template::button('coursesConfigBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
@ -19,18 +19,11 @@
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('coursesConfigShowTitle', true, 'Titre', [
|
||||
<?php echo template::checkbox('coursesConfigShowTitle', true, 'Titre Long', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'title'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('coursesConfigShowShortTitle', true, 'Titre court', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'shortTitle'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('coursesConfigShowAuthor', true, 'Nom de l\'auteur', [
|
||||
@ -52,14 +45,14 @@
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('coursesConfigShowOpening', true, 'Date d\'ouverture', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'opening']),
|
||||
<?php echo template::checkbox('coursesConfigShowOpeningDate', true, 'Date d\'ouverture', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'openingdate']),
|
||||
'help' => 'Affiché si l\'accès est limité dans le temps',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::checkbox('coursesConfigShowClosing', true, 'Date de fermeture', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'closing']),
|
||||
<?php echo template::checkbox('coursesConfigShowClosingDate', true, 'Date de fermeture', [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'closingdate']),
|
||||
'help' => 'Affiché si l\'accès est limité dans le temps',
|
||||
]); ?>
|
||||
</div>
|
@ -9,12 +9,8 @@
|
||||
<h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Insère le titre ou le titre court dans tous les cas -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'title']) === true): ?>
|
||||
<?php echo $courseValue['title']; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $courseValue['shortTitle']; ?>
|
||||
<?php endif; ?>
|
||||
<!-- Insère le titre court dans tous les cas -->
|
||||
<?php echo $courseValue['title']; ?>
|
||||
|
||||
<!-- Fin du bloc et bordure titre 4 -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
||||
@ -29,18 +25,26 @@
|
||||
<!-- Author -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
|
||||
<p>
|
||||
<?php echo 'AUtuer : ' . $this->signature($courseValue['author']); ?>
|
||||
<?php echo sprintf(helper::translate('Auteur : %s'), $this->signature($courseValue['author'])); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<!-- Modalité d'ouverture -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'access']) === true): ?>
|
||||
<p>
|
||||
<?php echo helper::translate('Disponibilité : ') . $module::$coursesAccess[$courseValue['access']]; ?>
|
||||
<!--Les dates d'ouverture et de fermeture -->
|
||||
<?php if ($courseValue['access'] === self::COURSE_ACCESS_DATE): ?>
|
||||
|
||||
<?php echo sprintf(helper::translate(' du %s au %s'), helper::dateUTF8('%d %B %Y', $courseValue['openingDate']), helper::dateUTF8('%d %B %Y', $courseValue['closingDate'])); ?>
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'openingdate']) === true): ?>
|
||||
<p>
|
||||
<?php echo sprintf(helper::translate('%s Ouvre le %s'), template::ico('calendar-empty'), helper::dateUTF8('%d %B %Y', $courseValue['openingDate'])); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'closingdate']) === true): ?>
|
||||
<p>
|
||||
<?php echo sprintf(helper::translate('%s Ferme le %s'), template::ico('calendar-empty'), helper::dateUTF8('%d %B %Y', $courseValue['closingDate'])); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
class courses extends common
|
||||
class workshop extends common
|
||||
{
|
||||
const VERSION = '1.0';
|
||||
const REALNAME = 'Liste des cours';
|
||||
@ -68,12 +68,11 @@ class courses extends common
|
||||
[
|
||||
'category' => $this->getInput('coursesConfigCategories'),
|
||||
'title' => $this->getInput('coursesConfigShowTitle', helper::FILTER_BOOLEAN),
|
||||
'shortTitle' => $this->getInput('coursesConfigShowShortTitle', helper::FILTER_BOOLEAN),
|
||||
'author' => $this->getInput('coursesConfigShowAuthor', helper::FILTER_BOOLEAN),
|
||||
'description' => $this->getInput('coursesConfigShowDescription', helper::FILTER_BOOLEAN),
|
||||
'access' => $this->getInput('coursesConfigShowAccess', helper::FILTER_BOOLEAN),
|
||||
'opening' => $this->getInput('coursesConfigShowOpening', helper::FILTER_BOOLEAN),
|
||||
'closing' => $this->getInput('coursesConfigShowClosing', helper::FILTER_BOOLEAN),
|
||||
'openingdate' => $this->getInput('coursesConfigShowOpeningDate', helper::FILTER_BOOLEAN),
|
||||
'closingdate' => $this->getInput('coursesConfigShowClosingDate', helper::FILTER_BOOLEAN),
|
||||
'enrolment' => $this->getInput('coursesConfigShowEnrolment', helper::FILTER_BOOLEAN),
|
||||
'urlText' => $this->getInput('coursesConfigUrlText', helper::FILTER_STRING_SHORT),
|
||||
'layout' => $this->getInput('coursesConfigLayout', helper::FILTER_INT),
|
Loading…
Reference in New Issue
Block a user