Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Sep 30, 2015
2 parents 286ea85 + 27f242f commit d834916
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion front/familylist.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

echo "<table class='tab_cadre_fixe'>";
$types = PluginGenericobjectTypeFamily::getItemtypesByFamily($_GET['id']);
echo "<tr class='tab_bg_2'><th>".$family->getField("name")."</th></tr>";
echo "<tr class='tab_bg_2'><th>".Dropdown::getDropdownName("glpi_plugin_genericobject_typefamilies", $_GET['id'])."</th></tr>";
foreach ($types as $type) {
$itemtype = $type['itemtype'];
echo "<tr class='tab_bg_1'><td align='center'>";
Expand Down
13 changes: 7 additions & 6 deletions inc/object.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1123,4 +1124,4 @@ static function getMenuContent() {
return $menu;
}

}
}
1 change: 1 addition & 0 deletions inc/typefamily.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit d834916

Please sign in to comment.