mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°6154 Fix some classes names hardcoded in dict entries and calls MetaModel GetName instead of hardcoded dict entry
This commit is contained in:
@@ -17,6 +17,7 @@ use Dict;
|
||||
use DictExceptionMissingString;
|
||||
use DisplayBlock;
|
||||
use Exception;
|
||||
use MetaModel;
|
||||
use MySQLException;
|
||||
use UserRights;
|
||||
use Utils;
|
||||
@@ -135,10 +136,10 @@ abstract class AbstractBlockLinkSetViewTable extends UIContentBlock
|
||||
public function GetDictionaryEntry(string $sKey, DBObject $oDBObject = null)
|
||||
{
|
||||
return $this->oAttDef->SearchSpecificLabel($sKey, '', true,
|
||||
Dict::S("Class:{$this->sObjectClass}"),
|
||||
MetaModel::GetName($this->sObjectClass),
|
||||
$this->oDbObject->Get('friendlyname'),
|
||||
$this->oAttDef->GetLabel(),
|
||||
Dict::S("Class:{$this->sTargetClass}"),
|
||||
MetaModel::GetName($this->sTargetClass),
|
||||
$oDBObject !== null ? $oDBObject->Get('friendlyname') : '{item}');
|
||||
}
|
||||
|
||||
|
||||
@@ -307,16 +307,16 @@ class BlockDirectLinkSetEditTable extends UIContentBlock
|
||||
$aRowActions = array();
|
||||
|
||||
$sDeleteButtonTooltip = $this->oAttributeLinkedSet->SearchSpecificLabel('UI:Links:Delete:Button+', '', true,
|
||||
Dict::S("Class:{$this->oAttributeLinkedSet->GetHostClass()}"),
|
||||
MetaModel::GetName($this->oAttributeLinkedSet->GetHostClass()),
|
||||
$oHostObject->Get('friendlyname'),
|
||||
$this->oAttributeLinkedSet->GetLabel(),
|
||||
Dict::S("Class:{$this->oUILinksDirectWidget->GetLinkedClass()}"));
|
||||
MetaModel::GetName($this->oUILinksDirectWidget->GetLinkedClass()));
|
||||
|
||||
$sRemoveButtonTooltip = $this->oAttributeLinkedSet->SearchSpecificLabel('UI:Links:Remove:Button+', '', true,
|
||||
Dict::S("Class:{$this->oAttributeLinkedSet->GetHostClass()}"),
|
||||
MetaModel::GetName($this->oAttributeLinkedSet->GetHostClass()),
|
||||
$oHostObject->Get('friendlyname'),
|
||||
$this->oAttributeLinkedSet->GetLabel(),
|
||||
Dict::S("Class:{$this->oUILinksDirectWidget->GetLinkedClass()}"));
|
||||
MetaModel::GetName($this->oUILinksDirectWidget->GetLinkedClass()));
|
||||
|
||||
// until a full link set refactoring (continue using edit_mode property)
|
||||
switch ($this->oAttributeLinkedSet->GetEditMode()) {
|
||||
|
||||
@@ -492,10 +492,10 @@ JS
|
||||
$aRowActions = array();
|
||||
|
||||
$sRemoveButtonTooltip = $this->oAttributeLinkedSetIndirect->SearchSpecificLabel('UI:Links:Remove:Button+', '', true,
|
||||
Dict::S("Class:{$this->oAttributeLinkedSetIndirect->GetHostClass()}"),
|
||||
MetaModel::GetName($this->oAttributeLinkedSetIndirect->GetHostClass()),
|
||||
$oHostObject->Get('friendlyname'),
|
||||
$this->oAttributeLinkedSetIndirect->GetLabel(),
|
||||
Dict::S("Class:{$this->oUILinksWidget->GetRemoteClass()}"));
|
||||
MetaModel::GetName($this->oUILinksWidget->GetRemoteClass()));
|
||||
|
||||
if ($this->bIsAllowDelete) {
|
||||
$aRowActions[] = array(
|
||||
|
||||
@@ -208,10 +208,10 @@ JS;
|
||||
$oLinksetDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
|
||||
$oHostObj = MetaModel::GetObject($sClass, $sId);
|
||||
$sFormTitle = $oLinksetDef->SearchSpecificLabel('UI:Links:Add:Modal:Title', '', true,
|
||||
Dict::S("Class:{$sClass}"),
|
||||
MetaModel::GetName($sClass),
|
||||
$oHostObj->Get('friendlyname'),
|
||||
$oLinksetDef->GetLabel(),
|
||||
LinkSetModel::GetTargetClass($oLinksetDef));
|
||||
MetaModel::GetName(LinkSetModel::GetTargetClass($oLinksetDef)));
|
||||
|
||||
$aExtraParams = [
|
||||
'noRelations' => true,
|
||||
|
||||
Reference in New Issue
Block a user