minmod CSS + divers
This commit is contained in:
parent
1beb9053cb
commit
465799ce23
|
@ -375,7 +375,8 @@
|
||||||
"description": "Recherche d'un groupe par mots-clés.",
|
"description": "Recherche d'un groupe par mots-clés.",
|
||||||
"permissions": ["warehouse", "admin"],
|
"permissions": ["warehouse", "admin"],
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"keywords": { "description": "Mots-clés de la recherche.", "type": "text" }
|
"keywords": { "description": "Mots-clés de la recherche.", "type": "text" },
|
||||||
|
"class": { "description": "Type de groupe.", "type": "int", "optional": true }
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
"clusters": { "description": "Liste des groupes correspondants aux mots-clés.", "type": "array<mixed>" }
|
"clusters": { "description": "Liste des groupes correspondants aux mots-clés.", "type": "array<mixed>" }
|
||||||
|
|
|
@ -221,7 +221,7 @@
|
||||||
left: 100%;
|
left: 100%;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: calc( 100% - .1em - 2px );
|
height: calc( 100% - .1em - 2px );
|
||||||
padding: .1em .5em;
|
padding: .12em .5em;
|
||||||
|
|
||||||
border-radius: 0 3px 3px 0;
|
border-radius: 0 3px 3px 0;
|
||||||
border: 1px solid #bdbdbd;
|
border: 1px solid #bdbdbd;
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -52,6 +52,7 @@
|
||||||
/* RENVOIE UN GROUPE EN FONCTION D'UN MOT CLE
|
/* RENVOIE UN GROUPE EN FONCTION D'UN MOT CLE
|
||||||
*
|
*
|
||||||
* @keywords<String> Element de recherche
|
* @keywords<String> Element de recherche
|
||||||
|
* @class<int> Type de groupe (0:user;1:machine) [OPTIONNEL]
|
||||||
*
|
*
|
||||||
* @return clusters<Array> Retourne la liste des groupes trouves
|
* @return clusters<Array> Retourne la liste des groupes trouves
|
||||||
*
|
*
|
||||||
|
@ -59,22 +60,34 @@
|
||||||
public static function search($params){
|
public static function search($params){
|
||||||
extract($params);
|
extract($params);
|
||||||
|
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
if( is_null($class) || $class == 0 ){
|
||||||
|
|
||||||
// On recupere les donnees des groupes utilisateurs
|
// On recupere les donnees des groupes utilisateurs
|
||||||
$userClusters = new Repo('user_cluster/search', [
|
$userClusters = new Repo('user_cluster/search', [
|
||||||
$_SESSION['WAREHOUSE']['id'],
|
$_SESSION['WAREHOUSE']['id'],
|
||||||
$keywords
|
$keywords
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$result = array_merge($result, $userClusters->answer());
|
||||||
|
|
||||||
// On recupere les donnees des groupes machines
|
}
|
||||||
|
|
||||||
|
if( is_null($class) || $class == 1 ){
|
||||||
|
|
||||||
|
// On recupere les donnees des groupes utilisateurs
|
||||||
$machineClusters = new Repo('machine_cluster/search', [
|
$machineClusters = new Repo('machine_cluster/search', [
|
||||||
$_SESSION['WAREHOUSE']['id'],
|
$_SESSION['WAREHOUSE']['id'],
|
||||||
$keywords
|
$keywords
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$merged = array_merge($userClusters->answer(), $machineClusters->answer());
|
$result = array_merge($result, $machineClusters->answer());
|
||||||
|
|
||||||
return [ 'clusters' => $merged ];
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return [ 'clusters' => $result ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue