2016-02-19 12:42:28 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(__FILE__)) );
|
|
|
|
require_once __ROOT__.'/manager/autoloader.php';
|
2016-07-12 10:06:46 +00:00
|
|
|
use \manager\View;
|
2016-02-19 12:42:28 +00:00
|
|
|
use \manager\ModuleRequest;
|
|
|
|
use \manager\ManagerError;
|
|
|
|
use \manager\Repo;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
|
|
|
|
<nav class='sub-menu-side'>
|
|
|
|
<span data-sublink='view'>
|
2016-07-08 15:04:41 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __ROOT__.'/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-07-08 15:04:41 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __ROOT__.'/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-07-08 15:04:41 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __ROOT__.'/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-07-08 15:04:41 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/edit.svg' ); ?></span>
|
2016-02-19 12:42:28 +00:00
|
|
|
<span>Modification</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='filter' >
|
2016-07-08 15:04:41 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __ROOT__.'/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>
|
|
|
|
|
|
|
|
</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
|
|
|
=========================================================*/
|
2016-07-08 18:28:44 +00:00
|
|
|
$request = new ModuleRequest('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
|
|
|
|
2016-07-12 10:06:46 +00:00
|
|
|
$clusterView = new View('group.view', []);
|
|
|
|
$clusterView->view();
|
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] Creation d'utilisateur
|
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='create'>";
|
|
|
|
|
|
|
|
echo "<form class='valid'>";
|
2016-07-12 10:06:46 +00:00
|
|
|
echo "<input id='create_name' type='text' placeholder='Nom'><br>";
|
|
|
|
|
|
|
|
echo "<select id='create_class'>
|
|
|
|
<option value='-' selected disabled>Type de groupe</option>
|
|
|
|
<option value='0'>utilisateurs</option>
|
|
|
|
<option value='1'>machines</option>
|
|
|
|
</select>";
|
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<button id='create_submit'>Créer</button>";
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
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'>";
|
|
|
|
|
|
|
|
echo "<form class='invalid'>";
|
2016-07-13 14:58:39 +00:00
|
|
|
// Recherche de groupe
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<input id='remove_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
|
|
|
|
echo "<input id='remove_search_id' type='hidden' value=''>";
|
|
|
|
// Indice du resultat
|
2016-07-13 14:58:39 +00:00
|
|
|
echo "<span class='remove_search_view'>groupe <span class='remove_search_num'>0</span> sur <span class='remove_search_sum'>0</span></span><br><br>";
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<button id='remove_search_submit' class='search'>Trouver</button><br>";
|
|
|
|
|
2016-07-08 15:04:41 +00:00
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
|
2016-07-08 15:04:41 +00:00
|
|
|
|
2016-07-13 14:58:39 +00:00
|
|
|
// Suppression de groupe
|
|
|
|
echo "<input id='remove_name' type='text' placeholder='Nom'><br>";
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<button id='remove_submit' disabled>Supprimer</button>";
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
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'>";
|
|
|
|
|
|
|
|
echo "<form class='neutral'>";
|
|
|
|
echo "<input id='edit_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
|
|
|
|
echo "<input id='edit_search_id' type='hidden' value=''>";
|
|
|
|
// Indice du resultat
|
2016-07-13 14:58:39 +00:00
|
|
|
echo "<span class='edit_search_view'>groupe <span class='edit_search_num'>0</span> sur <span class='edit_search_sum'>0</span></span><br><br>";
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<button id='edit_search_submit' class='search'>Trouver</button><br>";
|
2016-07-08 15:04:41 +00:00
|
|
|
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
|
|
|
|
|
2016-07-13 14:58:39 +00:00
|
|
|
echo "<input id='edit_name' type='text' placeholder='Nom'><br>";
|
2016-02-19 12:42:28 +00:00
|
|
|
echo "<button id='edit_submit' disabled>Modifier</button>";
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* [4] Gestion de filtrage
|
|
|
|
=========================================================*/
|
|
|
|
echo "<section data-sublink='filter'>";
|
|
|
|
|
2016-07-12 15:40:40 +00:00
|
|
|
debug();
|
|
|
|
|
2016-07-14 08:16:11 +00:00
|
|
|
$userForGroup = new View('group.membersChoice', [
|
|
|
|
'id_cluster' => 202 // groupe "b" de type MACHINE
|
2016-07-12 13:16:07 +00:00
|
|
|
]);
|
2016-07-08 15:04:41 +00:00
|
|
|
|
2016-07-12 13:16:07 +00:00
|
|
|
$userForGroup->view();
|
2016-02-19 12:42:28 +00:00
|
|
|
|
2016-07-08 15:04:41 +00:00
|
|
|
echo '</section>';
|