Commit 08a4f56f authored by Johan Cwiklinski's avatar Johan Cwiklinski

Datacenter fixes; closes #3861

Fix itemtype name case
Translate types labels from enclosure link
Fix select2 search results display
parent 9c2bd67a
......@@ -36,6 +36,6 @@ Session::checkRight("datacenter", READ);
Html::header(Datacenter::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "management", "datacenter");
Search::show('datacenter');
Search::show('Datacenter');
Html::footer();
......@@ -36,6 +36,6 @@ Session::checkRight("datacenter", READ);
Html::header(DCRoom::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "management", "datacenter", "dcroom");
Search::show('dcroom');
Search::show('DCRoom');
Html::footer();
......@@ -36,6 +36,6 @@ Session::checkRight("datacenter", READ);
Html::header(Rack::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "rack");
Search::show('rack');
Search::show('Rack');
Html::footer();
......@@ -202,6 +202,9 @@ class Item_Enclosure extends CommonDBRelation {
echo "<td>";
$types = $CFG_GLPI['rackable_types'];
unset($types[array_search('Enclosure', $types)]);
foreach ($types as &$type) {
$type = $type::getTypeName(1);
}
Dropdown::showFromArray(
'itemtype',
array_combine($types, $types), [
......
......@@ -924,7 +924,8 @@ function markMatch (text, term) {
// If there is no match, move on
if (match < 0) {
return _result.text(text);
_result.append(text);
return _result.html();
}
// Put in whatever text is before the match
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment