Conception/Developemment vue et core pour les `permissions` + Gestion `css` + Gestion `twig` + création des `repo` + création des méthodes `api`

This commit is contained in:
xdrm-brackets 2017-01-15 17:27:02 +01:00
parent 9c4471e452
commit 6defe40122
22 changed files with 416 additions and 205 deletions

View File

@ -314,6 +314,109 @@
}
/* AJOUTE UNE PERMISSION
*
* @id_target<int> UID du groupe de machine cible
* @id_source<int> UID du groupe d'utilisateur source
* @id_action<int> 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<int> UID du groupe de machine cible
* @id_source<int> UID du groupe d'utilisateur source
* @id_action<int> 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<int> UID du groupe machine en question
*
* @return permissions<Array> 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<int> UID du groupe de machine
* @id_action<int> UID de l'action
*
* @return clusters<Array> 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];
}
}

View File

@ -19,7 +19,7 @@
* @id_source<int> UID d'un groupe UTILISATEUR
* @id_action<int> UID d'une ACTION
*
* @return error<Error> Retourne l'erreur 'Error' associée
* @return error<Error> Retourne l'erreur 'Error' associée
*
*/
public static function addPermission($id_target, $id_source, $id_action){
@ -110,7 +110,7 @@
*
* @id_target<int> UID d'un groupe MACHINE
* @id_source<int> UID d'un groupe UTILISATEUR
* @id_action<int> UID d'une PERMISSION
* @id_action<int> UID d'une PERMISSION
*
* @return error<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<int> UID de l'entrepot
* @id_machine<int> UID de la machine
* @id_machine<int> UID de la machine
*
* @return permissions<Array> Liste des accès des utilisateurs à cette machine
* @return permissions<Array> 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<Array> 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<int> UID de l'entrepot
* @id_target<int> UID du groupe de machine
* @id_action<int> UID de l'action
*
* @return clusters<Array> 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();
}
}

View File

@ -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;
}

View File

@ -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']
]);

View File

@ -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'],

View File

@ -0,0 +1,104 @@
<?php
namespace viewer\view\group;
use \viewer\core\Viewer;
use \api\core\ModuleRequest;
use \api\core\Authentification;
use \error\core\Error;
class permission{
public static function render(){
debug();
/* [1] Init Twig
=========================================================*/
$loader = new \Twig_Loader_Filesystem(__BUILD__.'/viewer/view');
$twig = new \Twig_Environment($loader, []);
/* [2] Store variables
=========================================================*/
$variables = [
'p_icon' => [
'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']
]);
}
}
?>

View File

@ -0,0 +1,47 @@
<input type='text' class='searchbar' placeholder='Recherche'>
{% for machine_cluster in f_clusters() %}
<article class='inline-box' id='{{ machine_cluster.id_machine_cluster }}'>
{% set nbmachines = f_nbmachines(machine_cluster.id_machine_cluster) %}
<span class='title' style='color: {{ p_theme }}'>{{ machine_cluster.name }}</span>
{# <span class='link_remove' data-cluster='{{ machine_cluster.id_machine_cluster }}'>{{ p_icon.remove | raw }}</span>
<span class='link_edit' data-cluster='{{ machine_cluster.id_machine_cluster }}'>{{ p_icon.edit | raw }}</span> #}
<span class='code'>
{{ p_icon.device | raw }}
<span>{{ nbmachines }} machines</span>
</span>
{% for permission in f_permissions() %}
<span class='groups'>
<span style='border-color: #ddd; background-color: #eee;'>
{{ permission.name }}
<span class='icon-permission'></span>
</span>
{% for user_cluster in f_userclusters(machine_cluster.id_machine_cluster,permission.id_permission) %}
<span>
{{ user_cluster.name }}
<span class='rem-permission' data-permission='{{ permission.id_permission }}' data-source='{{ user_cluster.id_user_cluster }}' data-target='{{ machine_cluster.id_machine_cluster }}'></span>
</span>
{% endfor %}
<span class='add-permission' data-target='{{ machine_cluster.id_machine_cluster }}' data-permission='{{ permission.id_permission }}'>+</span>
</span>
{% endfor %}
</article>
{# if no result #}
{% else %}
<article class='inline-box'>
<span>Aucun groupe trouvé.</span>
</article>
{% endfor %}

View File

@ -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 ]);
}
}

View File

@ -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" }
}
}
},

View File

@ -107,7 +107,10 @@
"action_merge": [
"addPermission",
"removePermission",
"getPermissions",
"getAccess",
"getAuthenticatedClusters",
"getAll",
"getById",

View File

@ -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');
}
}

View File

@ -1,2 +1,7 @@
/* COULEUR DU THEME */
/* COULEUR DU SOUS-MENU */
/* COULEUR DES ERREURS */
/* FORMULAIRES */
/* GESTION DES LONGUEURS */
/*# sourceMappingURL=data:application/json;base64,ewoJInZlcnNpb24iOiAzLAoJImZpbGUiOiAiY29uc3RhbnRzLmNzcyIsCgkic291cmNlcyI6IFsKCQkiLi4vY29uc3RhbnRzLnNjc3MiCgldLAoJInNvdXJjZXNDb250ZW50IjogWwoJCSIvKiBDT1VMRVVSIERVIFRIRU1FICovXG4kdGhlbWUtY29sb3I6ICNmNDRmMDY7XG5cbi8qIENPVUxFVVIgRFUgU09VUy1NRU5VICovXG4kc3ViLW1lbnUtY29sb3I6ICM1YjVlNjM7XG5cbi8qIENPVUxFVVIgREVTIEVSUkVVUlMgKi9cbiRlcnJvci1jb2xvcjogI2NjNTg1NztcblxuLyogRk9STVVMQUlSRVMgKi9cbiRmb3JtLXZhbGlkLWNvbG9yOiAgICMyN2E1NjA7XG4kZm9ybS1uZXV0cmFsLWNvbG9yOiAjMjE5M2U2O1xuJGZvcm0tc2VhcmNoLWNvbG9yOiAgIzU2MzBlZDtcbiRmb3JtLWludmFsaWQtY29sb3I6ICNkNTI5MTg7XG5cblxuLyogR0VTVElPTiBERVMgTE9OR1VFVVJTICovXG4kbWVudS1zaWRlLXdpZHRoOiA0ZW07XG5cblxuLy8gUE9VUiBSRVNPVVJDRV9ESVNQQVRDSEVSXG4kcmQtZm9ybS12YWxpZC1jb2xvcjogICAnMjdhNTYwJztcbiRyZC1mb3JtLW5ldXRyYWwtY29sb3I6ICcyMTkzZTYnO1xuJHJkLWZvcm0tc2VhcmNoLWNvbG9yOiAgJzU2MzBlZCc7XG4kcmQtZm9ybS1pbnZhbGlkLWNvbG9yOiAnZDUyOTE4JztcbiIKCV0sCgkibWFwcGluZ3MiOiAiIiwKCSJuYW1lcyI6IFtdCn0= */
/*# sourceMappingURL=constants.css.map */

View File

@ -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 */

View File

@ -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 .= "</style></svg>";
// On récupère le fichier

75
public_html/src/static/container/checkbox.svg Executable file → Normal file
View File

@ -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">
<metadata
id="metadata4244">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="960"
inkscape:window-height="1028"
id="namedview4242"
showgrid="false"
inkscape:zoom="24.05"
inkscape:cx="10"
inkscape:cy="10"
inkscape:window-x="960"
inkscape:window-y="24"
inkscape:window-maximized="0"
inkscape:current-layer="svg4230"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<desc
id="desc4234" />
<defs
id="defs4236" />
<g
id="Page-1"
transform="scale(1.6,1.6)"
style="fill:#909090;fill-rule:evenodd;stroke:none;stroke-width:1;fill-opacity:1">
<g
id="Core"
transform="translate(-170,-86)"
style="fill:#909090;fill-opacity:1">
<g
id="check-circle-outline-blank"
transform="translate(170,86)"
style="fill:#909090;fill-opacity:1">
<path
d="M 10,0 C 4.5,0 0,4.5 0,10 0,15.5 4.5,20 10,20 15.5,20 20,15.5 20,10 20,4.5 15.5,0 10,0 l 0,0 z m 0,18 C 5.6,18 2,14.4 2,10 2,5.6 5.6,2 10,2 c 4.4,0 8,3.6 8,8 0,4.4 -3.6,8 -8,8 l 0,0 z"
id="Shape"
inkscape:connector-curvature="0"
style="fill:#909090;fill-opacity:1" />
</g>
</g>
</g>
</svg>
xml:space="preserve"><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" /><path
d="M 16,0 C 7.163636,0 0,7.163273 0,16 0,24.836727 7.163636,32 16,32 24.836364,32 32,24.836727 32,16 32,7.163273 24.836364,0 16,0 Z m 0,29.090909 C 8.770182,29.090909 2.9090909,23.229818 2.9090909,16 2.9090909,8.770182 8.770182,2.909091 16,2.909091 c 7.229818,0 13.090909,5.861091 13.090909,13.090909 0,7.229818 -5.861091,13.090909 -13.090909,13.090909 z"
id="stylisable" /></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

83
public_html/src/static/container/checkbox@checked.svg Executable file → Normal file
View File

@ -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">
<metadata
id="metadata4260">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1056"
id="namedview4258"
showgrid="false"
inkscape:zoom="11.8"
inkscape:cx="10"
inkscape:cy="10"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg4246"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<desc
id="desc4250" />
<defs
id="defs4252" />
<g
id="Page-1"
transform="scale(1.6,1.6)"
style="fill:#007dd8;fill-rule:evenodd;stroke:none;stroke-width:1;fill-opacity:1">
<g
id="Core"
transform="translate(-128,-86)"
style="fill:#007dd8;fill-opacity:1">
<g
id="check-circle-outline"
transform="translate(128,86)"
style="fill:#007dd8;fill-opacity:1">
<path
d="M 5.9,8.1 4.5,9.5 9,14 19,4 17.6,2.6 9,11.2 5.9,8.1 l 0,0 z M 18,10 c 0,4.4 -3.6,8 -8,8 -4.4,0 -8,-3.6 -8,-8 0,-4.4 3.6,-8 8,-8 0.8,0 1.5,0.1 2.2,0.3 L 13.8,0.7 C 12.6,0.3 11.3,0 10,0 4.5,0 0,4.5 0,10 c 0,5.5 4.5,10 10,10 5.5,0 10,-4.5 10,-10 l -2,0 0,0 z"
id="Shape"
inkscape:connector-curvature="0"
style="fill:#007dd8;fill-opacity:1" />
</g>
</g>
</g>
</svg>
viewBox="0 0 32 32"
version="1.1"
id="circle_check"
height="32"
enable-background="new 0 0 96 96"><metadata
id="metadata22"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs20" /><path
id="stylisable"
d="M 16,0 C 7.163636,0 0,7.163273 0,16 0,24.836727 7.163636,32 16,32 24.836364,32 32,24.836727 32,16 32,7.163273 24.836364,0 16,0 Z m 0,29.090909 C 8.770182,29.090909 2.9090909,23.229818 2.9090909,16 2.9090909,8.770182 8.770182,2.909091 16,2.909091 c 7.229818,0 13.090909,5.861091 13.090909,13.090909 0,7.229818 -5.861091,13.090909 -13.090909,13.090909 z" /><path
id="stylisable"
d="m 21.921455,12.061818 c -0.568,-0.567636 -1.489091,-0.567636 -2.057091,0 l -5.142546,5.142909 -2.057091,-2.057091 c -0.568,-0.568 -1.488727,-0.568 -2.057091,0 -0.568,0.568 -0.568,1.489091 0,2.057455 l 3.085091,3.084727 c 0.568,0.568 1.489455,0.568 2.057455,0 l 6.170909,-6.170909 c 0.568364,-0.568 0.569091,-1.488727 3.64e-4,-2.057091 z" /></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -44,5 +44,5 @@
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" /><path
d="M 11.2,0 C 4.96,0 0,4.96 0,11.2 c 0,6.24 4.96,11.2 11.2,11.2 1.433766,0 2.792902,-0.274046 4.046875,-0.753125 L 17.6,24 l 3.2,0 0,3.2 3.2,0 0,3.2 1.11875,1.11875 C 25.43875,31.83875 25.760626,32 26.240626,32 L 30.4,32 c 0.96,0 1.6,-0.64 1.6,-1.6 l 0,-4.159374 c 0,-0.48 -0.16125,-0.801876 -0.48125,-1.121876 L 21.646875,15.246875 C 22.125954,13.992902 22.4,12.633766 22.4,11.2 22.4,4.96 17.44,0 11.2,0 Z M 8.8,4.8 c 2.24,0 4,1.76 4,4 0,2.24 -1.76,4 -4,4 -2.24,0 -4,-1.76 -4,-4 0,-2.24 1.76,-4 4,-4 z"
id="path4235"
id="stylisable"
inkscape:connector-curvature="0" /></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -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 "<section data-sublink='permissions'>";
$clusterView = new Viewer('group.permission', []);
$clusterView->view();
echo '</section>';