diff --git a/front/familylist.php b/front/familylist.php index 6300c44a..e53e0842 100644 --- a/front/familylist.php +++ b/front/familylist.php @@ -43,7 +43,7 @@ echo "
".$family->getField("name")." |
---|
".Dropdown::getDropdownName("glpi_plugin_genericobject_typefamilies", $_GET['id'])." |
"; diff --git a/inc/object.class.php b/inc/object.class.php index 0b29aa76..749b5bec 100644 --- a/inc/object.class.php +++ b/inc/object.class.php @@ -1099,11 +1099,12 @@ static function getMenuContent() { if ($type['plugin_genericobject_typefamilies_id'] > 0 && (!isset($_GET['itemtype']) || !preg_match("/itemtype=".$_GET['itemtype']."/", $_GET['itemtype']))) { - $family = new PluginGenericobjectTypeFamily(); - $family->getFromDB($type['plugin_genericobject_typefamilies_id']); - $menu[strtolower($family->getName())]['title'] = $family->getName(); - $menu[strtolower($family->getName())]['page'] = '/plugins/genericobject/front/familylist.php?id='.$family->getID(); - $menu[strtolower($family->getName())]['options'][strtolower($itemtype)] = + $family_id = $type['plugin_genericobject_typefamilies_id']; + $name = Dropdown::getDropdownName("glpi_plugin_genericobject_typefamilies", $family_id, 0, false); + $str_name = strtolower($name); + $menu[$str_name]['title'] = Dropdown::getDropdownName("glpi_plugin_genericobject_typefamilies", $family_id); + $menu[$str_name]['page'] = '/plugins/genericobject/front/familylist.php?id='.$family_id; + $menu[$str_name]['options'][strtolower($itemtype)] = array('title' => $type['itemtype']::getMenuName(), 'page' => $itemtype::getSearchUrl(false), 'links' => $links); @@ -1123,4 +1124,4 @@ static function getMenuContent() { return $menu; } -} \ No newline at end of file +} diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 2a10ddd4..b5b3a03c 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -30,6 +30,7 @@ } class PluginGenericobjectTypeFamily extends CommonDropdown { + var $can_be_translated = true; static function getTypeName($nb=0) { return __('Family of type of objects', 'genericobject'); |