From 73b8938a5d31ffcbfa28a1f615cff50ee83a1385 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 19 Oct 2023 13:47:36 +0200 Subject: [PATCH] courses config okay --- core/module/course/course.php | 2 +- core/module/course/view/edit/edit.php | 2 +- module/courses/courses.php | 25 +++++++-- module/courses/view/config/config.php | 2 +- module/courses/view/index/index.php | 81 ++++++++++++++++++--------- 5 files changed, 77 insertions(+), 35 deletions(-) diff --git a/core/module/course/course.php b/core/module/course/course.php index 1fdce63..c963284 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -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' diff --git a/core/module/course/view/edit/edit.php b/core/module/course/view/edit/edit.php index 2be3892..dd8b74c 100644 --- a/core/module/course/view/edit/edit.php +++ b/core/module/course/view/edit/edit.php @@ -64,7 +64,7 @@
'Modalités d\'ouverture', + 'label' => 'Disponibilité', 'selected' => $this->getdata(['course', $this->getUrl(2), 'access']) ]); ?>
diff --git a/module/courses/courses.php b/module/courses/courses.php index 56ef3bf..5a1ee18 100644 --- a/module/courses/courses.php +++ b/module/courses/courses.php @@ -29,14 +29,27 @@ 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 = []; /** * Configuration diff --git a/module/courses/view/config/config.php b/module/courses/view/config/config.php index 6fa45f7..2d56970 100644 --- a/module/courses/view/config/config.php +++ b/module/courses/view/config/config.php @@ -3,7 +3,7 @@
'buttonGrey', - 'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0), + 'href' => helper::baseUrl() . $this->getUrl(0), 'value' => template::ico('left') ]); ?>
diff --git a/module/courses/view/index/index.php b/module/courses/view/index/index.php index 40cd822..323e545 100644 --- a/module/courses/view/index/index.php +++ b/module/courses/view/index/index.php @@ -1,30 +1,59 @@ -getData(['course']) as $courseId => $courseValue): ?> - -
+
+ getData(['course']) as $courseId => $courseValue): ?> + +
- - getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> -
-

- + + getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> +
+

+ - - getData(['module', $this->getUrl(0), 'config', 'title']) === true): ?> - - - - + + getData(['module', $this->getUrl(0), 'config', 'title']) === true): ?> + + + + - - getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> -

- + + getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> +

+ + + getData(['module', $this->getUrl(0), 'config', 'description']) === true): ?> +

+ +

+ + + getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?> +

+ signature($courseValue['author']); ?> +

+ + + getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?> +

+ + + - - - - getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> -

- -
- \ No newline at end of file + + +

+ + + + getData(['module', $this->getUrl(0), 'config', 'author']) === true): ?> +

+ +

+ + + getData(['module', $this->getUrl(0), 'config', 'template']) === true): ?> +
+ +
+ +
\ No newline at end of file