Skip to content

Commit 7445898

Browse files
stonebuzzflegastelois
authored andcommitted
fix breadcrump for config page
1 parent 7e5e355 commit 7445898

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

front/config.form.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,31 @@
2929

3030
include ('../../../inc/includes.php');
3131

32+
3233
$config = new PluginTreeviewConfig();
3334
if (isset($_POST["update"])) {
3435
$config->update($_POST);
3536
Html::back();
3637

3738
} else {
39+
3840
$plugin = new Plugin();
3941
if ($plugin->isInstalled("treeview") && $plugin->isActivated("treeview")) {
40-
Html::header(__('Tree view', 'treeview'), $_SERVER["PHP_SELF"], "config", "plugins");
41-
$config->showForm(1);
42+
43+
Html::header(PluginTreeviewConfig::getTypeName(),
44+
$_SERVER['PHP_SELF'],
45+
"plugins",
46+
"plugintreeviewpreference",
47+
"config"); $config->showForm(1);
4248

4349
} else {
44-
Html::header(__('Setup'), $_SERVER['PHP_SELF'], "config", "plugins");
50+
51+
Html::header(__('Setup'),
52+
$_SERVER['PHP_SELF'],
53+
"plugins",
54+
"plugintreeviewpreference",
55+
"config");
56+
4557
// Get the configuration from the database and show it
4658
echo " <script type='text/javascript'>
4759
if (top != self)

inc/config.class.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ class PluginTreeviewConfig extends CommonDBTM {
3838

3939
static $types = array('Computer', 'Monitor', 'NetworkEquipment', 'Peripheral', 'Phone', 'Printer',
4040
'Software');
41+
42+
/**
43+
* Display name of itemtype
44+
*
45+
* @return value name of this itemtype
46+
**/
47+
public static function getTypeName($nb = 0) {
48+
49+
return __('Tree view', 'treeview');
50+
}
51+
52+
4153
/**
4254
* Configuration form
4355
**/

0 commit comments

Comments
 (0)