2016-10-18 14:03:03 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
2017-09-19 14:38:16 +00:00
|
|
|
require_once __ROOT__.'/vendor/autoload.php';
|
2017-01-30 17:39:21 +00:00
|
|
|
use \api\core\Request;
|
2016-10-18 14:03:03 +00:00
|
|
|
use \database\core\Repo;
|
2017-11-06 14:15:24 +00:00
|
|
|
use \generic\core\View;
|
|
|
|
?>
|
2016-02-19 12:42:28 +00:00
|
|
|
|
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
|
|
|
|
<nav class='sub-menu-side'>
|
|
|
|
<span data-sublink='view'>
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/view.svg' ); ?></span>
|
2016-02-19 12:42:28 +00:00
|
|
|
<span>Tout afficher</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='create' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/create.svg' ); ?></span>
|
2016-02-19 12:42:28 +00:00
|
|
|
<span>Creation</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='remove' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ); ?></span>
|
2016-02-19 12:42:28 +00:00
|
|
|
<span>Suppression</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='edit' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ); ?></span>
|
2016-02-19 12:42:28 +00:00
|
|
|
<span>Modification</span>
|
|
|
|
</span>
|
|
|
|
|
2016-07-20 14:50:41 +00:00
|
|
|
<span data-sublink='members' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
|
2016-07-12 15:40:40 +00:00
|
|
|
<span>Composition</span>
|
2016-02-19 12:42:28 +00:00
|
|
|
</span>
|
|
|
|
|
2016-07-15 14:48:53 +00:00
|
|
|
<span data-sublink='permissions' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/permission.svg' ); ?></span>
|
2016-07-15 14:48:53 +00:00
|
|
|
<span>Permissions</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
2016-07-04 13:45:29 +00:00
|
|
|
$post = [];
|
2016-02-19 12:42:28 +00:00
|
|
|
foreach($_POST as $k=>$v)
|
|
|
|
array_push($post, $k);
|
|
|
|
|
|
|
|
$sublink = $post[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-08 18:28:44 +00:00
|
|
|
/* [1] VIEW -> Liste des groupes
|
2016-02-19 12:42:28 +00:00
|
|
|
=========================================================*/
|
2017-01-30 17:39:21 +00:00
|
|
|
$request = new Request('clusterDefault/getAll'); // On utilise la methode 'getAll' du module 'groupDefault'
|
2016-02-19 12:42:28 +00:00
|
|
|
$answer = $request->dispatch(); // On recupere la reponse
|
|
|
|
|
|
|
|
echo "<section data-sublink='view' class='list'>";
|
2016-07-08 15:04:41 +00:00
|
|
|
|
2017-11-06 14:15:24 +00:00
|
|
|
$view = View::load('group.view');
|
|
|
|
echo $view->render();
|
2016-07-12 10:06:46 +00:00
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] Creation d'utilisateur
|
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='create'>";
|
|
|
|
|
2017-11-07 10:37:18 +00:00
|
|
|
$view = View::load('group.form.create');
|
|
|
|
echo $view->render();
|
2016-02-19 12:42:28 +00:00
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-13 14:58:39 +00:00
|
|
|
/* [3] Suppression de groupe
|
2016-02-19 12:42:28 +00:00
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='remove'>";
|
|
|
|
|
2017-11-07 10:37:18 +00:00
|
|
|
$view = View::load('group.form.remove');
|
|
|
|
echo $view->render();
|
2016-02-19 12:42:28 +00:00
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-13 14:58:39 +00:00
|
|
|
/* [4] Modification de groupe
|
2016-02-19 12:42:28 +00:00
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='edit'>";
|
|
|
|
|
2017-11-07 10:37:18 +00:00
|
|
|
$view = View::load('group.form.edit');
|
|
|
|
echo $view->render();
|
2016-02-19 12:42:28 +00:00
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [4] Gestion de filtrage
|
|
|
|
=========================================================*/
|
2017-09-23 13:05:51 +00:00
|
|
|
echo "<section data-sublink='members' class='contain-check-table'>";
|
2016-07-15 12:48:18 +00:00
|
|
|
|
2017-11-06 14:15:24 +00:00
|
|
|
/* (1) Si on a un ID_CLUSTER, on affiche la composition
|
|
|
|
---------------------------------------------------------*/
|
2017-11-07 10:31:56 +00:00
|
|
|
if( isset($post[1]) && preg_match('/^(u|m)(\d+)$/', $post[1], $m) ){
|
2016-07-15 12:48:18 +00:00
|
|
|
|
2017-11-07 10:31:56 +00:00
|
|
|
$view = View::load('group.member.choice');
|
|
|
|
echo $view->render([
|
|
|
|
(int) $m[2], // id_cluster
|
|
|
|
(int) ($m[1]=='u') ? 0 : 1 // class
|
|
|
|
]);
|
2016-07-16 10:41:21 +00:00
|
|
|
|
2017-11-07 10:31:56 +00:00
|
|
|
}else{
|
2016-07-16 10:41:21 +00:00
|
|
|
|
2017-11-07 10:31:56 +00:00
|
|
|
$view = View::load('group.member.group');
|
|
|
|
echo $view->render();
|
2016-07-15 12:48:18 +00:00
|
|
|
|
2017-11-07 10:31:56 +00:00
|
|
|
}
|
2016-02-19 12:42:28 +00:00
|
|
|
|
2016-07-08 15:04:41 +00:00
|
|
|
echo '</section>';
|
2016-07-15 14:48:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [5] Gestion des permissions
|
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='permissions'>";
|
|
|
|
|
2017-11-06 14:15:24 +00:00
|
|
|
$view = View::load('group.permission');
|
|
|
|
echo $view->render();
|
2016-07-15 14:48:53 +00:00
|
|
|
|
|
|
|
echo '</section>';
|