diff --git a/build/api/module/clusterDefault.php b/build/api/module/clusterDefault.php index 0497c70..d54a3d8 100755 --- a/build/api/module/clusterDefault.php +++ b/build/api/module/clusterDefault.php @@ -314,6 +314,109 @@ } + + /* AJOUTE UNE PERMISSION + * + * @id_target UID du groupe de machine cible + * @id_source UID du groupe d'utilisateur source + * @id_action UID de l'action en question + * + */ + public static function addPermission($params){ + extract($params); + + /* [1] On crée la relation via le repo + =========================================================*/ + /* (1) On rédige la requête */ + $req = new Repo('action_merge/addPermission', [$id_target, $id_source, $id_action]); + + /* (2) On éxecute + récupère la réponse (code erreur) */ + $res = $req->answer(); + + + /* [2] On propage l'erreur retournée + =========================================================*/ + return [ 'ModuleError' => $res ]; + } + + /* SUPPRIME UNE PERMISSION + * + * @id_target UID du groupe de machine cible + * @id_source UID du groupe d'utilisateur source + * @id_action UID de l'action en question + * + */ + public static function remPermission($params){ + extract($params); + + /* [1] On supprime la relation via le repo + =========================================================*/ + /* (1) On rédige la requête */ + $req = new Repo('action_merge/removePermission', [$id_target, $id_source, $id_action]); + + /* (2) On exécute + récupère la réponse (code erreur) */ + $res = $req->answer(); + + + /* [2] On propage l'erreur retournée + =========================================================*/ + return [ 'ModuleError' => $res ]; + } + + + /* RETOURNE LES PERMISSIONS POUR UN GROUPE DE MACHINE + * + * @id_cluster UID du groupe machine en question + * + * @return permissions Liste des permissions du groupe + * + */ + public static function getPermissions($params){ + extract($params); + + /* [1] On propage au repo + =========================================================*/ + /* (1) On rédige la requête */ + $req = new Repo('action_merge/getPermissions', []); + + /* (2) On exécute et récupère la réponse */ + $res = $req->answer(); + + // Gestion erreur + if( !is_array($res) ) + return ['ModuleError' => Error::NoMatchFound]; + + /* (3) On retourne le résultat */ + return [ 'permissions' => $res ]; + } + + + /* RETOURNE LES GROUPES D'UTILISATEURS AYANT UNE PERMISSION SUR UN GROUPE DE MACHINE + * + * @id_target UID du groupe de machine + * @id_action UID de l'action + * + * @return clusters Liste des user_cluster ayant la permission sur le groupe target + * + */ + public static function getAuthenticatedClusters($params){ + extract($params); + + /* [1] On propage au repo + =========================================================*/ + $req = new Repo('action_merge/getAuthenticatedClusters', [$_SESSION['WAREHOUSE']['id'], $id_target, $id_action]); + + $res = $req->answer(); + + // error + if( !is_array($res) ) + return ['ModuleError' => Error::NoMatchFound]; + + return ['clusters' => $res]; + } + + + } diff --git a/build/database/repo/action_merge.php b/build/database/repo/action_merge.php index 6512a3a..046a53b 100755 --- a/build/database/repo/action_merge.php +++ b/build/database/repo/action_merge.php @@ -19,7 +19,7 @@ * @id_source UID d'un groupe UTILISATEUR * @id_action UID d'une ACTION * - * @return error Retourne l'erreur 'Error' associée + * @return error Retourne l'erreur 'Error' associée * */ public static function addPermission($id_target, $id_source, $id_action){ @@ -110,7 +110,7 @@ * * @id_target UID d'un groupe MACHINE * @id_source UID d'un groupe UTILISATEUR - * @id_action UID d'une PERMISSION + * @id_action UID d'une PERMISSION * * @return error Retourne l'erreur 'Error' associée * @@ -165,15 +165,15 @@ - /* RETOURNE LA LISTE D'ACCES POUR UNE MACHINE D'ID DONNE + /* RETOURNE LA LISTE DES UTILISATEURS AYANT LES PERMISSIONS POUR UNE MACHINE D'ID DONNE * * @id_warehouse UID de l'entrepot - * @id_machine UID de la machine + * @id_machine UID de la machine * - * @return permissions Liste des accès des utilisateurs à cette machine + * @return permissions Liste des accès des utilisateurs à cette machine * */ - public static function getPermissions($id_warehouse, $id_machine){ + public static function getAccess($id_warehouse, $id_machine){ //TODO: GROUP_CONCAT(DISTINCT a.id_action ORDER BY a.id_action ASC) $u = Table::get('user') @@ -195,13 +195,55 @@ ->select('id_action', Rows::SEL_CONCAT, Rows::SEL_DISTINCT); return $am->fetch(); + } + + + + + /* RETOURNE LA LISTE DES PERMISSIONS EXISTANTES + * + * @return permissions Liste des permissions + * + */ + public static function getPermissions(){ + + /* (1) Liste des permissions existantes */ + $availablePermissions = Table::get('action') + ->select('id_action', null, null, 'id_permission') + ->select('name'); + + return $availablePermissions->fetch(); } + /* RETOURNE LES GROUPES D'UTILISATEURS AYANT UNE PERMISSION SUR UN GROUPE DE MACHINE + * + * @id_warehouse UID de l'entrepot + * @id_target UID du groupe de machine + * @id_action UID de l'action + * + * @return clusters Liste des user_cluster ayant la permission sur le groupe target + * + */ + public static function getAuthenticatedClusters($id_warehouse, $id_target, $id_action){ + + /* [1] On rédige la requête + =========================================================*/ + /* (1) On récupère les groupes (on construit le selecteur) */ + $clusters = Table::get('user_cluster') + ->whereIdWarehouse($id_warehouse) + ->select('id_user_cluster') + ->select('name'); - - + /* (2) On rédige le "fetcher" */ + $fetcher = Table::get('action_merge') + ->whereIdTarget($id_target) + ->whereIdAction($id_action) + ->join('id_source', $clusters); + + return $fetcher->fetch(); + } } diff --git a/build/viewer/core/Viewer.php b/build/viewer/core/Viewer.php index 8ee0564..00934ff 100755 --- a/build/viewer/core/Viewer.php +++ b/build/viewer/core/Viewer.php @@ -93,7 +93,7 @@ private function checkPath($template){ /* [1] On vérifie le format =========================================================*/ - if( !preg_match('/^([a-z]+)\.([a-z]+)$/i', $template, $match) ){ + if( !preg_match('/^(\w+)\.(\w+)$/i', $template, $match) ){ $this->error = Error::ParamError; return false; } diff --git a/build/viewer/view/group/.group_view.php.swp b/build/viewer/view/group/.group_view.php.swp deleted file mode 100644 index 3071318..0000000 Binary files a/build/viewer/view/group/.group_view.php.swp and /dev/null differ diff --git a/build/viewer/view/group/.group_view.twig.swp b/build/viewer/view/group/.group_view.twig.swp deleted file mode 100644 index 43ddb6f..0000000 Binary files a/build/viewer/view/group/.group_view.twig.swp and /dev/null differ diff --git a/build/viewer/view/group/groupChoice.php b/build/viewer/view/group/group_choice.php similarity index 94% rename from build/viewer/view/group/groupChoice.php rename to build/viewer/view/group/group_choice.php index d7b9456..7de3ec9 100755 --- a/build/viewer/view/group/groupChoice.php +++ b/build/viewer/view/group/group_choice.php @@ -5,7 +5,7 @@ use \error\core\Error; use \api\core\Authentification; - class groupChoice{ + class group_choice{ public static function render(){ /* [1] Init Twig @@ -38,7 +38,7 @@ /* [4] Build the whole stuff =========================================================*/ - return $twig->render('group/groupChoice.twig', [ + return $twig->render('group/group_choice.twig', [ 'p_icon' => $variables['p_icon'], 'p_theme' => $variables['p_theme'] ]); diff --git a/build/viewer/view/group/groupChoice.twig b/build/viewer/view/group/group_choice.twig similarity index 100% rename from build/viewer/view/group/groupChoice.twig rename to build/viewer/view/group/group_choice.twig diff --git a/build/viewer/view/group/membersChoice.php b/build/viewer/view/group/members_choice.php similarity index 98% rename from build/viewer/view/group/membersChoice.php rename to build/viewer/view/group/members_choice.php index 619192f..cbe1b56 100644 --- a/build/viewer/view/group/membersChoice.php +++ b/build/viewer/view/group/members_choice.php @@ -6,7 +6,7 @@ use \error\core\Error; use \api\core\Authentification; - class membersChoice{ + class members_choice{ public static function render($params){ /* [1] On vérifie le type de groupe (user/machine) @@ -122,7 +122,7 @@ /* [5] Build the whole stuff =========================================================*/ - return $twig->render('group/membersChoice.twig', [ + return $twig->render('group/members_choice.twig', [ 'p_class' => $variables['p_class'], 'p_name' => $variables['p_name'], 'p_id_cluster' => $variables['p_id_cluster'], diff --git a/build/viewer/view/group/membersChoice.twig b/build/viewer/view/group/members_choice.twig similarity index 100% rename from build/viewer/view/group/membersChoice.twig rename to build/viewer/view/group/members_choice.twig diff --git a/build/viewer/view/group/permission.php b/build/viewer/view/group/permission.php new file mode 100755 index 0000000..f3f9d55 --- /dev/null +++ b/build/viewer/view/group/permission.php @@ -0,0 +1,104 @@ + [ + 'remove' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ), + 'edit' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ), + 'device' => file_get_contents( __PUBLIC__.'/src/static/menu-side/device.svg' ), + 'permission' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/permission.svg') + ], + + 'p_theme' => $_SESSION['WAREHOUSE']['theme'] + ]; + + /* [3] Store functions + =========================================================*/ + $twig->addFunction(new \Twig_Function('f_clusters', function(){ + $request = new ModuleRequest('clusterDefault/getAll', [ + 'class' => 1 + ]); + + $answer = $request->dispatch(); + + // si erreur, on affiche rien par défaut + if( $answer->error != Error::Success ) + return []; + + return $answer->get('clusters'); + + })); + + $twig->addFunction(new \Twig_Function('f_nbmachines', function($id_cluster){ + $machineReq = new ModuleRequest('clusterDefault/getMembers', [ + 'id_cluster' => (int) $id_cluster, + 'class' => 1 + ]); + + $machineRes = $machineReq->dispatch(); + + // si erreur, on affiche rien par défaut + if( $machineRes->error != Error::Success ) + return []; + + return count($machineRes->get('members')); + })); + + $twig->addFunction(new \Twig_Function('f_permissions', function(){ + $permReq = new ModuleRequest('clusterDefault/getPermissions', []); + + $permRes = $permReq->dispatch(); + + // si erreur, on affiche rien par défaut + if( $permRes->error != Error::Success ) + return []; + + return $permRes->get('permissions'); + })); + + $twig->addFunction(new \Twig_Function('f_userclusters', function($id_cluster, $id_permission){ + $ucReq = new ModuleRequest('clusterDefault/getAuthenticatedClusters', [ + 'id_target' => $id_cluster, + 'id_action' => $id_permission + ]); + + $ucRes = $ucReq->dispatch(); + + // si erreur, on affiche rien par défaut + if( $ucRes->error != Error::Success ) + return []; + + return $ucRes->get('clusters'); + })); + + + /* [4] Build the whole stuff + =========================================================*/ + return $twig->render('group/permission.twig', [ + 'p_icon' => $variables['p_icon'], + 'p_theme' => $variables['p_theme'] + ]); + } + + + } + + +?> diff --git a/build/viewer/view/group/permission.twig b/build/viewer/view/group/permission.twig new file mode 100644 index 0000000..67e0d02 --- /dev/null +++ b/build/viewer/view/group/permission.twig @@ -0,0 +1,47 @@ + + +{% for machine_cluster in f_clusters() %} +
+ + {% set nbmachines = f_nbmachines(machine_cluster.id_machine_cluster) %} + + {{ machine_cluster.name }} + {# {{ p_icon.remove | raw }} + + {{ p_icon.edit | raw }} #} + + + {{ p_icon.device | raw }} + {{ nbmachines }} machines + + + + {% for permission in f_permissions() %} + + + + {{ permission.name }} + + + + {% for user_cluster in f_userclusters(machine_cluster.id_machine_cluster,permission.id_permission) %} + + {{ user_cluster.name }} + + + {% endfor %} + + + + + {% endfor %} + +
+ +{# if no result #} +{% else %} + +
+ Aucun groupe trouvé. +
+ +{% endfor %} diff --git a/build/viewer/view/machine/view.php b/build/viewer/view/machine/view.php index f21b8c9..d7ccfed 100755 --- a/build/viewer/view/machine/view.php +++ b/build/viewer/view/machine/view.php @@ -62,50 +62,6 @@ ]); } - public static function view($params){ - $view = ''; - - /* [1] On récupère la liste des machines - =========================================================*/ - - - foreach($MACHINELIST as $u=>$machine){ - $clustersReq = new ModuleRequest('machineDefault/getClusters', [ 'id_machine' => $machine['id_machine'] ]); - $clustersRes = $clustersReq->dispatch(); - - /* (2) Gestion si erreur */ - if( $clustersRes->error == Error::Success ) $clusters = $clustersRes->get('clusters'); - else $clusters = []; - - $MACHINELIST[$u]['grouplist'] = Viewer::replaceMultiple( - self::template('cluster'), - $clusters, - [ 'id_machine' => $machine['id_machine'] ] - ); - } - - - $view_machine = Viewer::replaceMultiple( - self::template('machine'), - $MACHINELIST, [ - 'icon_remove' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/remove.svg' ), - 'icon_edit' => file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/edit.svg' ), - 'icon_group' => file_get_contents( __PUBLIC__.'/src/static/container/group.svg' ), - ]); - - - - - - return Viewer::replaceSingle(self::template(), [ 'machinelist' => $view_machine ]); - } - - - - - - - } diff --git a/config/modules.json b/config/modules.json index 7200a1a..fe4d094 100755 --- a/config/modules.json +++ b/config/modules.json @@ -450,6 +450,49 @@ "output": { "status": { "description": "Status de la suppression.", "type": "boolean" } } + }, + + "addPermission": { + "description": "Ajout d'une permission", + "permissions": ["warehouse", "admin"], + "parameters": { + "id_source": { "description": "Groupe d'utilisateur source.", "type": "id" }, + "id_target": { "description": "Groupe de machine cible.", "type": "id" }, + "id_action": { "description": "Action en question.", "type": "id" } + }, + "output": {} + }, + + "remPermission": { + "description": "Suppression d'une permission", + "permissions": ["warehouse", "admin"], + "parameters": { + "id_source": { "description": "Groupe d'utilisateur source.", "type": "id" }, + "id_target": { "description": "Groupe de machine cible.", "type": "id" }, + "id_action": { "description": "Action en question.", "type": "id" } + }, + "output": {} + }, + + "getPermissions": { + "description": "Retourne la liste des permissions", + "permissions": ["warehouse","admin"], + "parameters": {}, + "output": { + "permissions": { "description": "Liste des permissions", "type": "array" } + } + }, + + "getAuthenticatedClusters": { + "description": "Retourne les groupes d'utilisateurs ayant une action sur un groupe de machine.", + "permissions": ["warehouse","admin"], + "parameters": { + "id_target": { "description": "Groupe de machine cible.", "type": "id" }, + "id_action": { "description": "Action en question.", "type": "id" } + }, + "output": { + "clusters": { "description": "Liste des groupes d'utilisateurs.", "type": "array" } + } } }, diff --git a/config/repositories.json b/config/repositories.json index c18d293..57929d9 100755 --- a/config/repositories.json +++ b/config/repositories.json @@ -107,7 +107,10 @@ "action_merge": [ "addPermission", "removePermission", + "getPermissions", + "getAccess", + "getAuthenticatedClusters", "getAll", "getById", diff --git a/public_html/css/container.scss b/public_html/css/container.scss index 7d1ca32..8601e66 100755 --- a/public_html/css/container.scss +++ b/public_html/css/container.scss @@ -207,6 +207,7 @@ cursor: default; + &.add-permission, &.add-group, &.add-member{ border-radius: 3px; @@ -215,6 +216,8 @@ } & > span.rem-group, + & > span.icon-permission, + & > span.rem-permission, & > span.rem-member{ display: block; position: absolute; @@ -243,6 +246,13 @@ } + & > span.icon-permission, + & > span.icon-permission:hover{ + border-color: #ddd; + background-color: #eee; + cursor: default; + background-image: url('/src/static/sub-menu-side/permission.svg'); + } } } @@ -703,7 +713,7 @@ article.check-table{ // border-radius: 50% / 50%; - background: url('/src/static/container/checkbox.svg') center center no-repeat; + background: url('/src/static/container/checkbox@999999.svg') center center no-repeat; background-size: 100% auto;; transition: box-shadow .2s ease-in-out; @@ -712,7 +722,7 @@ article.check-table{ } input[type='checkbox']:checked + label[for]{ - background-image: url('/src/static/container/checkbox@checked.svg'); + background-image: url('/src/static/container/checkbox@checked@007dd8.svg'); } } diff --git a/public_html/css/min/constants.css b/public_html/css/min/constants.css index 1b86939..7b51bcc 100755 --- a/public_html/css/min/constants.css +++ b/public_html/css/min/constants.css @@ -1,2 +1,7 @@ +/* COULEUR DU THEME */ +/* COULEUR DU SOUS-MENU */ +/* COULEUR DES ERREURS */ +/* FORMULAIRES */ +/* GESTION DES LONGUEURS */ -/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAiY29uc3RhbnRzLmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vY29uc3RhbnRzLnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIvKiBDT1VMRVVSIERVIFRIRU1FICovXG4kdGhlbWUtY29sb3I6ICNmNDRmMDY7XG5cbi8qIENPVUxFVVIgRFUgU09VUy1NRU5VICovXG4kc3ViLW1lbnUtY29sb3I6ICM1YjVlNjM7XG5cbi8qIENPVUxFVVIgREVTIEVSUkVVUlMgKi9cbiRlcnJvci1jb2xvcjogI2NjNTg1NztcblxuLyogRk9STVVMQUlSRVMgKi9cbiRmb3JtLXZhbGlkLWNvbG9yOiAgICMyN2E1NjA7XG4kZm9ybS1uZXV0cmFsLWNvbG9yOiAjMjE5M2U2O1xuJGZvcm0tc2VhcmNoLWNvbG9yOiAgIzU2MzBlZDtcbiRmb3JtLWludmFsaWQtY29sb3I6ICNkNTI5MTg7XG5cblxuLyogR0VTVElPTiBERVMgTE9OR1VFVVJTICovXG4kbWVudS1zaWRlLXdpZHRoOiA0ZW07XG5cblxuLy8gUE9VUiBSRVNPVVJDRV9ESVNQQVRDSEVSXG4kcmQtZm9ybS12YWxpZC1jb2xvcjogICAnMjdhNTYwJztcbiRyZC1mb3JtLW5ldXRyYWwtY29sb3I6ICcyMTkzZTYnO1xuJHJkLWZvcm0tc2VhcmNoLWNvbG9yOiAgJzU2MzBlZCc7XG4kcmQtZm9ybS1pbnZhbGlkLWNvbG9yOiAnZDUyOTE4JztcbiIKCV0sCgkibWFwcGluZ3MiOiAiIiwKCSJuYW1lcyI6IFtdCn0= */ \ No newline at end of file +/*# sourceMappingURL=constants.css.map */ diff --git a/public_html/css/min/container.css b/public_html/css/min/container.css index 436a5a2..19f51fc 100755 --- a/public_html/css/min/container.css +++ b/public_html/css/min/container.css @@ -144,10 +144,10 @@ background-color: #f9f9f9; color: #333; cursor: default; } - #WRAPPER > #CONTAINER > section > .inline-box .groups > span.add-group, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.add-member, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.add-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.add-member { + #WRAPPER > #CONTAINER > section > .inline-box .groups > span.add-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.add-group, #WRAPPER > #CONTAINER > section > .inline-box .groups > span.add-member, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.add-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.add-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span.add-member { border-radius: 3px; cursor: pointer; } - #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-group, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-member, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-member { + #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-group, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-member, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-group, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-member { display: block; position: absolute; top: -1px; @@ -163,8 +163,13 @@ background-color: #f9f9f9; color: inherit; cursor: pointer; } - #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-group:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-member:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-group:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-member:hover { + #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-group:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-permission:hover, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.rem-member:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-group:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.rem-member:hover { background-image: url("/src/static/sub-menu-side/remove@d52918.svg"); } + #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-box .groups > span > span.icon-permission:hover, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.icon-permission, #WRAPPER > #CONTAINER > section > .inline-row .groups > span > span.icon-permission:hover { + border-color: #ddd; + background-color: #eee; + cursor: default; + background-image: url("/src/static/sub-menu-side/permission.svg"); } #WRAPPER > #CONTAINER > section > .inline-box .link_edit, #WRAPPER > #CONTAINER > section > .inline-box .link_remove, #WRAPPER > #CONTAINER > section > .inline-row .link_edit, #WRAPPER > #CONTAINER > section > .inline-row .link_remove { @@ -470,11 +475,11 @@ article.check-table { position: absolute; width: 1.2em; height: 1.2em; - background: url("/src/static/container/checkbox.svg") center center no-repeat; + background: url("/src/static/container/checkbox@999999.svg") center center no-repeat; background-size: 100% auto; transition: box-shadow .2s ease-in-out; cursor: pointer; } article.check-table > div > span input[type='checkbox']:checked + label[for] { - background-image: url("/src/static/container/checkbox@checked.svg"); } + background-image: url("/src/static/container/checkbox@checked@007dd8.svg"); } /*# sourceMappingURL=container.css.map */ diff --git a/public_html/index.php b/public_html/index.php index 1076bc3..e5d1398 100755 --- a/public_html/index.php +++ b/public_html/index.php @@ -61,6 +61,10 @@ $stylesheet .= "\t\tfill: #".$matches[1]." !important;\n"; $stylesheet .= "\t\tfill-opacity: 1 !important;\n"; $stylesheet .= "\t}\n"; + $stylesheet .= "\t#stroke-stylisable{\n"; + $stylesheet .= "\t\tstroke: #".$matches[1]." !important;\n"; + $stylesheet .= "\t\tstroke-opacity: 1 !important;\n"; + $stylesheet .= "\t}\n"; $stylesheet .= ""; // On récupère le fichier diff --git a/public_html/src/static/container/checkbox.svg b/public_html/src/static/container/checkbox.svg old mode 100755 new mode 100644 index 78a7077..7fbb9a8 --- a/public_html/src/static/container/checkbox.svg +++ b/public_html/src/static/container/checkbox.svg @@ -5,73 +5,16 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + enable-background="new 0 0 96 96" height="32" + id="circle_check" version="1.1" viewBox="0 0 32 32" width="32" - id="svg4230" - inkscape:version="0.91 r13725" - sodipodi:docname="checkbox.svg"> - - - - image/svg+xml - - - - - - - - - - - - - - - - + xml:space="preserve">image/svg+xml \ No newline at end of file diff --git a/public_html/src/static/container/checkbox@checked.svg b/public_html/src/static/container/checkbox@checked.svg old mode 100755 new mode 100644 index 86e9023..a383508 --- a/public_html/src/static/container/checkbox@checked.svg +++ b/public_html/src/static/container/checkbox@checked.svg @@ -5,73 +5,18 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="32" - version="1.1" - viewBox="0 0 32 32" + xml:space="preserve" width="32" - id="svg4246" - inkscape:version="0.91 r13725" - sodipodi:docname="checkbox@checked.svg"> - - - - image/svg+xml - - - - - - - - - - - - - - - - + viewBox="0 0 32 32" + version="1.1" + id="circle_check" + height="32" + enable-background="new 0 0 96 96">image/svg+xml diff --git a/public_html/src/static/sub-menu-side/permission.svg b/public_html/src/static/sub-menu-side/permission.svg index 87aa564..983621c 100755 --- a/public_html/src/static/sub-menu-side/permission.svg +++ b/public_html/src/static/sub-menu-side/permission.svg @@ -44,5 +44,5 @@ inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /> \ No newline at end of file + id="stylisable" + inkscape:connector-curvature="0" /> diff --git a/public_html/view/groups.php b/public_html/view/groups.php index 94d13be..a97d816 100755 --- a/public_html/view/groups.php +++ b/public_html/view/groups.php @@ -179,7 +179,7 @@ ---------------------------------------------------------*/ if( isset($post[1]) && preg_match('/^(u|m)(\d+)$/', $post[1], $m) ){ - $membersChoice = new Viewer('group.membersChoice', [ + $membersChoice = new Viewer('group.members_choice', [ 'id_cluster' => (int) $m[2], 'class' => (int) ($m[1]=='u') ? 0 : 1 ]); @@ -187,7 +187,7 @@ }else{ - $groupChoice = new Viewer('group.groupChoice', []); + $groupChoice = new Viewer('group.group_choice', []); $groupChoice->view(); } @@ -203,6 +203,7 @@ =========================================================*/ echo "
"; - + $clusterView = new Viewer('group.permission', []); + $clusterView->view(); echo '
';