forked from ZwiiCMS-Team/ZwiiCampus
Fixe nouveau cours vide
This commit is contained in:
parent
5597449ddc
commit
0181843682
@ -48,7 +48,7 @@ class course extends common
|
|||||||
|
|
||||||
public static $swapMessage = [];
|
public static $swapMessage = [];
|
||||||
|
|
||||||
public static $pagesList = [];
|
public static $pagesList = ['accueil'=> 'Accueil'];
|
||||||
|
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
@ -152,18 +152,6 @@ class course extends common
|
|||||||
// Liste des catégories de cours
|
// Liste des catégories de cours
|
||||||
self::$courseCategories = $this->getData(['category']);
|
self::$courseCategories = $this->getData(['category']);
|
||||||
|
|
||||||
// Liste des pages disponibles
|
|
||||||
$this->initDB('page', $this->getUrl(2));
|
|
||||||
self::$pagesList = $this->getData(['page']);
|
|
||||||
foreach (self::$pagesList as $page => $pageId) {
|
|
||||||
if (
|
|
||||||
$this->getData(['page', $page, 'block']) === 'bar' ||
|
|
||||||
$this->getData(['page', $page, 'disable']) === true
|
|
||||||
) {
|
|
||||||
unset(self::$pagesList[$page]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => helper::translate('Ajouter un cours'),
|
'title' => helper::translate('Ajouter un cours'),
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('courseaDDHomePageId', helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC'), [
|
<?php echo template::select('courseaDDHomePageId', $module::$pagesList, [
|
||||||
'label' => 'Accueil du cours',
|
'label' => 'Accueil du cours',
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="col1">
|
<div class="col1">
|
||||||
<?php echo template::button('courseCategoryModulesBack', [
|
<?php echo template::button('courseCategoryModulesBack', [
|
||||||
'class' => 'buttonGrey',
|
'class' => 'buttonGrey',
|
||||||
'href' => helper::baseUrl() . $this->getUrl(2),
|
'href' => helper::baseUrl() . 'course',
|
||||||
'value' => template::ico('left')
|
'value' => template::ico('left')
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user