From a44027bdb5cc1bd672f97869b6c9f64c0d8d8170 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 18 Nov 2015 09:37:36 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20input=20pour=20ajouter=20un=20mod?= =?UTF-8?q?ule=20=C3=A0=20un=20UE=20d'un=20Semestre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/global.css | 18 +++++++++++++++--- manager/database.php | 8 ++++++-- manager/repo/module.php | 14 ++++++++++++++ page/modules.php | 18 +++++++++++++++++- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/css/global.css b/css/global.css index ea808f2..c3acbd8 100755 --- a/css/global.css +++ b/css/global.css @@ -205,6 +205,12 @@ select{ appearance:none; } +/* select grisé => selection modules existants par exemple */ +tr.grayscale select{ + border-color: #bdbdbd; + color: #4e4e4e; +} + /* pour déplacement d'élève */ td select{ margin: -1em; padding: .5em; } @@ -257,7 +263,8 @@ td select > option{ padding: 0; } /* @all */ -.confirm.all{ margin-top: -.7em; } +.confirm.all, +tr.grayscale .confirm{ margin-top: -.7em; } @@ -280,7 +287,8 @@ body.trHoverActivated tr:hover td .confirm.active{ } /* saisie note */ -.saisie_note{ +.saisie_note, +tr.grayscale input{ /* position */ margin: -.5em; width: 4em; @@ -292,7 +300,11 @@ body.trHoverActivated tr:hover td .confirm.active{ } /* @focus */ -.saisie_note:focus{ border-color: #999; } +.saisie_note:focus, +tr.grayscale input:focus{ + border-color: #999; +} + diff --git a/manager/database.php b/manager/database.php index 638134f..6d526f2 100755 --- a/manager/database.php +++ b/manager/database.php @@ -355,8 +355,12 @@ class DataBase{ - - + /**********************************************************/ + /*** retourne la liste exhaustive des MODULES de la BDD ***/ + /**********************************************************/ + public function getExhaustiveModuleList(){ + return moduleRepo::exhaustiveList(); + } diff --git a/manager/repo/module.php b/manager/repo/module.php index fec1ca8..a5c4125 100755 --- a/manager/repo/module.php +++ b/manager/repo/module.php @@ -171,4 +171,18 @@ class moduleRepo extends DBAccess{ + + /* retourne la liste de tous les modules existants + * + * @return modules retourne la liste de tous les modules existant + * + */ + public static function exhaustiveList(){ + $getModuleList = DataBase::getPDO()->query("SELECT id_module as id, nom, libelle FROM module ORDER BY nom, libelle"); + + return DataBase::delNumeric( $getModuleList->fetchAll() ); + } + + + } \ No newline at end of file diff --git a/page/modules.php b/page/modules.php index c50c537..44f826c 100755 --- a/page/modules.php +++ b/page/modules.php @@ -432,7 +432,23 @@ if( permission('admin') ){ // si l'utilisateur est un admin echo ''.$UE['nom'].' - '.$UE['libelle'].''; echo ''; } - + + require_once __ROOT__.'/manager/database.php'; + debug(); + $completeModuleList = DataBase::getInstance()->getExhaustiveModuleList(); + // saisie d'un nouveau module + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
Ajouter le module
"; + echo ""; + echo ''; echo '';