forked from ZwiiCMS-Team/ZwiiCampus
courses config okay
This commit is contained in:
parent
93fc2f3aae
commit
73b8938a5d
@ -40,7 +40,7 @@ class course extends common
|
||||
];
|
||||
|
||||
public static $courseEnrolment = [
|
||||
self::COURSE_ENROLMENT_GUEST => 'Anonyme',
|
||||
self::COURSE_ENROLMENT_GUEST => 'Sans inscription',
|
||||
self::COURSE_ENROLMENT_SELF => 'Inscription libre',
|
||||
self::COURSE_ENROLMENT_SELF_KEY => 'Inscription avec clé',
|
||||
//self::COURSE_ENROLMENT_MANUAL => 'Manuelle'
|
||||
|
@ -64,7 +64,7 @@
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('courseEditAccess', $module::$courseAccess, [
|
||||
'label' => 'Modalités d\'ouverture',
|
||||
'label' => 'Disponibilité',
|
||||
'selected' => $this->getdata(['course', $this->getUrl(2), 'access'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -29,12 +29,25 @@ class courses extends common
|
||||
];
|
||||
|
||||
public static $coursesLayout = [
|
||||
1 => 'Une colonne',
|
||||
2 => 'Deux colonnes',
|
||||
3 => 'Trois colonnes',
|
||||
4 => 'Quatre colonnes',
|
||||
5 => 'Cinq colonnes',
|
||||
6 => 'Six colonnes',
|
||||
12 => 'Un cours par ligne',
|
||||
6 => 'Deux cours par ligne',
|
||||
4 => 'Trois cours par ligne',
|
||||
3 => 'Quatre cours par ligne',
|
||||
2 => 'Six cours par ligne',
|
||||
];
|
||||
|
||||
|
||||
public static $coursesAccess = [
|
||||
self::COURSE_ACCESS_OPEN => 'ouvert',
|
||||
self::COURSE_ACCESS_DATE => 'période d\'ouverture',
|
||||
self::COURSE_ACCESS_CLOSE => 'fermé',
|
||||
];
|
||||
|
||||
public static $coursesEnrolment = [
|
||||
self::COURSE_ENROLMENT_GUEST => 'sans inscription',
|
||||
self::COURSE_ENROLMENT_SELF => 'inscription libre',
|
||||
self::COURSE_ENROLMENT_SELF_KEY => 'inscription avec clé',
|
||||
//self::COURSE_ENROLMENT_MANUAL => 'Manuelle'
|
||||
];
|
||||
|
||||
public static $coursesDetails = [];
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="col1">
|
||||
<?php echo template::button('coursesConfigBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
|
||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<div class="row">
|
||||
<?php foreach ($this->getData(['course']) as $courseId => $courseValue): ?>
|
||||
<!-- Layout en colonnes -->
|
||||
<div class="col<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']) ?>">
|
||||
<div class="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): ?>
|
||||
@ -10,21 +11,49 @@
|
||||
|
||||
<!-- 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 echo $courseValue['title']; ?>
|
||||
<?php else: ?>
|
||||
<?php echo $courseValue['shortTitle'] ?>
|
||||
<?php echo $courseValue['shortTitle']; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Fin du bloc et bordure titre 4 -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
||||
</h4>
|
||||
<?php endif; ?>
|
||||
<!-- Description -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'description']) === true): ?>
|
||||
<p>
|
||||
<?php echo $courseValue['description']; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<!-- Author -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
|
||||
<p>
|
||||
<?php echo 'AUtuer : ' . $this->signature($courseValue['author']); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<!-- Modalité d'ouverture -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === 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 endif; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- Modalité d'inscription -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?>
|
||||
<p>
|
||||
<?php echo helper::translate('Inscription : ') . $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<!-- Fin du bloc et bordure -->
|
||||
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user