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