glpi / src / inc / computer.class.php @ 077e4de7
History | View | Annotate | Download (1.52 KB)
1 |
<?php
|
---|---|
2 |
|
3 |
class PluginVigiloComputer extends Computer |
4 |
{ |
5 |
public static function showComputerInfo($item) |
6 |
{ |
7 |
global $CFG_GLPI; |
8 |
$templates = PluginVigiloVigiloTemplate::getAllTemplates(); |
9 |
$value = $item->getField('vigilo_template'); |
10 |
if ($value === 'NULL') { |
11 |
$value = '-----'; |
12 |
} |
13 |
echo '<table class="tab_cadre_fixe tab_glpi" width="100%">'; |
14 |
echo '<tr class="tab_bg_1"><th colspan="4">Vigilo Template</th></tr>'; |
15 |
echo '<tr class="tab_bg_1">'; |
16 |
echo '<td>Vigilo Template</td>'; |
17 |
echo '<td>'; |
18 |
Dropdown::show(
|
19 |
'PluginVigiloComputer',
|
20 |
array(
|
21 |
"name" => "vigilo_template", |
22 |
"emptylabel" => $value, |
23 |
"url" => $CFG_GLPI["root_doc"] . "/plugins/vigilo/ajax/getVTValue.php" |
24 |
) |
25 |
); |
26 |
$ret = array(); |
27 |
$tmp = PluginVigiloVigiloTemplate::getAllTemplates(); |
28 |
echo '</td></tr>'; |
29 |
echo '</table>'; |
30 |
return true; |
31 |
} |
32 |
|
33 |
public function getSearchOptions() |
34 |
{ |
35 |
global $CFG_GLPI; |
36 |
|
37 |
$computer = new Computer(); |
38 |
$options = $computer->getSearchOptions(); |
39 |
|
40 |
$options['vigilo'] = 'Vigilo Template'; |
41 |
|
42 |
$options['7007']['table'] = 'glpi_computers'; |
43 |
$options['7007']['field'] = 'vigilo_template'; |
44 |
$options['7007']['name'] = 'vigilo_template'; |
45 |
//$options['7007']['searchtype'] = 'equals';
|
46 |
$options['7007']['datatype'] = 'dropdown'; |
47 |
|
48 |
return $options; |
49 |
} |
50 |
} |