diff --git a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml index b542a9fe4..c436eb272 100755 --- a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml +++ b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml @@ -1209,24 +1209,22 @@ parent::DisplayBareRelations($oPage, $bEditMode); $sKnownErrorClass = 'KnownError'; + $sTabCode = 'Class:UserRequest:KnownErrorList'; if (MetaModel::IsValidClass($sKnownErrorClass)) { //Search for known errors - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); $iTicketID = $this->GetKey();; $oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT KnownError AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID")); $iNumberKE=$oKnownErrorSet->count(); - if ($iNumberKE > 0) - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)"); - } - else - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); - } + if ($iNumberKE > 0) { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode)." ($iNumberKE)", Dict::S($sTabCode."+")); + } else { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode), Dict::S($sTabCode."+")); + } self::DisplaySet($oPage, $oKnownErrorSet, [ 'menu' => false, - 'panel_title' => Dict::S('Class:UserRequest:KnownErrorList'), + 'panel_title' => Dict::S($sTabCode), 'panel_icon' => MetaModel::GetClassIcon($sKnownErrorClass, false), + 'panel_title_tooltip' => Dict::S($sTabCode."+"), ]); } }]]> diff --git a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml index 0281f453d..b07c6b6ba 100755 --- a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml +++ b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml @@ -1366,24 +1366,22 @@ parent::DisplayBareRelations($oPage, $bEditMode); $sKnownErrorClass = 'KnownError'; + $sTabCode = 'Class:UserRequest:KnownErrorList'; if (MetaModel::IsValidClass($sKnownErrorClass)) { //Search for known errors - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); $iTicketID = $this->GetKey();; $oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT $sKnownErrorClass AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID")); $iNumberKE = $oKnownErrorSet->count(); - if ($iNumberKE > 0) - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)"); - } - else - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); - } + if ($iNumberKE > 0) { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode)." ($iNumberKE)", Dict::S($sTabCode."+")); + } else { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode), Dict::S($sTabCode."+")); + } self::DisplaySet($oPage, $oKnownErrorSet, [ 'menu' => false, - 'panel_title' => Dict::S('Class:UserRequest:KnownErrorList'), + 'panel_title' => Dict::S($sTabCode), 'panel_icon' => MetaModel::GetClassIcon($sKnownErrorClass, false), + 'panel_title_tooltip' => Dict::S($sTabCode."+"), ]); } }]]> diff --git a/datamodels/2.x/itop-request-mgmt-itil/dictionaries/en.dict.itop-request-mgmt-itil.php b/datamodels/2.x/itop-request-mgmt-itil/dictionaries/en.dict.itop-request-mgmt-itil.php index f8ff3c03f..e09e0d3d4 100644 --- a/datamodels/2.x/itop-request-mgmt-itil/dictionaries/en.dict.itop-request-mgmt-itil.php +++ b/datamodels/2.x/itop-request-mgmt-itil/dictionaries/en.dict.itop-request-mgmt-itil.php @@ -35,6 +35,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI-RequestManagementOverview-OpenRequestByType' => 'Open requests by type', 'UI-RequestManagementOverview-OpenRequestByCustomer' => 'Open requests by customer', 'Class:UserRequest:KnownErrorList' => 'Known Errors', + 'Class:UserRequest:KnownErrorList+' => 'Known Errors related to Functional CI linked to the current ticket', )); // Dictionnay conventions diff --git a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml index a05ba7f8b..9531732e7 100755 --- a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml +++ b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml @@ -1409,24 +1409,22 @@ parent::DisplayBareRelations($oPage, $bEditMode); $sKnownErrorClass = 'KnownError'; + $sTabCode = 'Class:UserRequest:KnownErrorList'; if (MetaModel::IsValidClass($sKnownErrorClass)) { //Search for known errors - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); $iTicketID = $this->GetKey();; $oKnownErrorSet = new CMDBObjectSet(DBObjectSearch::FromOQL("SELECT $sKnownErrorClass AS ke JOIN lnkErrorToFunctionalCI AS l1 ON l1.error_id=ke.id JOIN FunctionalCI AS ci ON l1.functionalci_id=ci.id JOIN lnkFunctionalCIToTicket AS l2 ON l2.functionalci_id=ci.id WHERE l2.ticket_id=$iTicketID")); $iNumberKE = $oKnownErrorSet->count(); - if ($iNumberKE > 0) - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList', Dict::S('Class:UserRequest:KnownErrorList')." ($iNumberKE)"); - } - else - { - $oPage->SetCurrentTab('Class:UserRequest:KnownErrorList'); + if ($iNumberKE > 0) { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode)." ($iNumberKE)", Dict::S($sTabCode."+")); + } else { + $oPage->SetCurrentTab($sTabCode, Dict::S($sTabCode), Dict::S($sTabCode."+")); } self::DisplaySet($oPage, $oKnownErrorSet, [ 'menu' => false, - 'panel_title' => Dict::S('Class:UserRequest:KnownErrorList'), + 'panel_title' => Dict::S($sTabCode), 'panel_icon' => MetaModel::GetClassIcon($sKnownErrorClass, false), + 'panel_title_tooltip' => Dict::S($sTabCode."+"), ]); } }]]> diff --git a/datamodels/2.x/itop-request-mgmt/dictionaries/en.dict.itop-request-mgmt.php b/datamodels/2.x/itop-request-mgmt/dictionaries/en.dict.itop-request-mgmt.php index 52170e761..a4ab5ceeb 100644 --- a/datamodels/2.x/itop-request-mgmt/dictionaries/en.dict.itop-request-mgmt.php +++ b/datamodels/2.x/itop-request-mgmt/dictionaries/en.dict.itop-request-mgmt.php @@ -35,6 +35,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI-RequestManagementOverview-OpenRequestByType' => 'Open requests by type', 'UI-RequestManagementOverview-OpenRequestByCustomer' => 'Open requests by organization', 'Class:UserRequest:KnownErrorList' => 'Known Errors', + 'Class:UserRequest:KnownErrorList+' => 'Known Errors related to Functional CI linked to the current ticket', 'Menu:UserRequest:MyWorkOrders' => 'Work orders assigned to me', 'Menu:UserRequest:MyWorkOrders+' => 'All work orders assigned to me', 'Class:Problem:KnownProblemList' => 'Known problems',