minmod CSS + divers
This commit is contained in:
parent
6b8209a977
commit
a9b0f5b02e
|
@ -375,7 +375,8 @@
|
|||
"description": "Recherche d'un groupe par mots-clés.",
|
||||
"permissions": ["warehouse", "admin"],
|
||||
"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": {
|
||||
"clusters": { "description": "Liste des groupes correspondants aux mots-clés.", "type": "array<mixed>" }
|
||||
|
|
|
@ -221,7 +221,7 @@
|
|||
left: 100%;
|
||||
width: 1em;
|
||||
height: calc( 100% - .1em - 2px );
|
||||
padding: .1em .5em;
|
||||
padding: .12em .5em;
|
||||
|
||||
border-radius: 0 3px 3px 0;
|
||||
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
|
||||
*
|
||||
* @keywords<String> Element de recherche
|
||||
* @class<int> Type de groupe (0:user;1:machine) [OPTIONNEL]
|
||||
*
|
||||
* @return clusters<Array> Retourne la liste des groupes trouves
|
||||
*
|
||||
|
@ -59,22 +60,34 @@
|
|||
public static function search($params){
|
||||
extract($params);
|
||||
|
||||
$result = [];
|
||||
|
||||
if( is_null($class) || $class == 0 ){
|
||||
|
||||
// On recupere les donnees des groupes utilisateurs
|
||||
$userClusters = new Repo('user_cluster/search', [
|
||||
$_SESSION['WAREHOUSE']['id'],
|
||||
$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', [
|
||||
$_SESSION['WAREHOUSE']['id'],
|
||||
$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