Revision 14b31af4
[#1700] Ajout du support de l'assignation en masse
Change-Id: Ic6109da0db14639f0970d39c9ad85f5ea0d28ab1
Refs: #1700
src/plugins/vigilo/inc/vigilo.function.php | ||
---|---|---|
137 | 137 |
'tinyproxy' => array("Proxy"), |
138 | 138 |
); |
139 | 139 |
} |
140 |
|
|
141 |
function plugin_vigilo_MassiveActionsFieldsDisplay($params) |
|
142 |
{ |
|
143 |
global $CFG_GLPI; |
|
144 |
|
|
145 |
$opts = array( |
|
146 |
"name" => "vigilo_template", |
|
147 |
"value" => 0, |
|
148 |
"url" => $CFG_GLPI["root_doc"] . "/plugins/vigilo/ajax/getTemplates.php" |
|
149 |
); |
|
150 |
|
|
151 |
Dropdown::show('PluginVigiloTemplate', $opts); |
|
152 |
return true; |
|
153 |
} |
src/plugins/vigilo/plugin.php | ||
---|---|---|
125 | 125 |
return $options; |
126 | 126 |
} |
127 | 127 |
|
128 |
// @HACK: pour que les actions en masse fonctionnent, |
|
129 |
// on doit utiliser le nom réel du champ dans "linkfield", |
|
130 |
// alors que pour les actions sur un objet, il faut utiliser |
|
131 |
// le nom faisant le lien avec le type de l'objet. |
|
132 |
if (strpos($_SERVER["SCRIPT_FILENAME"], "/ajax/dropdownMassiveAction.php") !== false) { |
|
133 |
$linkfield = 'vigilo_template'; |
|
134 |
} else { |
|
135 |
$linkfield = 'id'; |
|
136 |
} |
|
137 |
|
|
128 | 138 |
$options[7007]['table'] = 'glpi_plugin_vigilo_template'; |
129 | 139 |
$options[7007]['field'] = 'template'; |
130 |
$options[7007]['linkfield'] = 'id';
|
|
140 |
$options[7007]['linkfield'] = $linkfield;
|
|
131 | 141 |
$options[7007]['name'] = 'Template Vigilo'; |
132 | 142 |
$options[7007]['massiveaction'] = true; |
133 | 143 |
$options[7007]['datatype'] = 'dropdown'; |
Also available in: Unified diff