mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°9137 - Add a logo for each Network Device Type
This commit is contained in:
@@ -1283,7 +1283,39 @@
|
||||
</items>
|
||||
</summary>
|
||||
</presentation>
|
||||
<methods/>
|
||||
<methods>
|
||||
<method id="GetIcon">
|
||||
<comment> /**
|
||||
* Overrides the GetIcon method to return the logo of the associated NetworkDeviceType if any, otherwise the default icon of the class will be returned
|
||||
*
|
||||
*/</comment>
|
||||
<static>false</static>
|
||||
<access>public</access>
|
||||
<type>Custom</type>
|
||||
<code><![CDATA[ public function GetIcon($bImgTag = true)
|
||||
{
|
||||
$sIconClass = 'NetworkDeviceType'; // the class storing the image which will be used as icon for the current object
|
||||
$sExtKeyCode = 'networkdevicetype_id'; // the external key attribute code pointing to the class storing the image attribute
|
||||
$sIconAttCode = 'logo'; // the attribute code of the image in the IconClass
|
||||
|
||||
$iObj = $this->Get($sExtKeyCode);
|
||||
if ($iObj > 0) {
|
||||
$oObj = MetaModel::GetObject($sIconClass, $iObj, true, true);
|
||||
$oImage = $oObj->Get($sIconAttCode);
|
||||
$sIconUrl = $oImage->IsEmpty() ? '' : $oImage->GetDisplayURL($sIconClass, $iObj, $sIconAttCode);
|
||||
if (strlen($sIconUrl) > 0) {
|
||||
if ($bImgTag) {
|
||||
return "<img src=\"$sIconUrl\" alt=''/>";
|
||||
} else {
|
||||
return $sIconUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Return the default image
|
||||
return parent::GetIcon($bImgTag);
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
<relations>
|
||||
<relation id="impacts">
|
||||
<neighbours>
|
||||
@@ -5292,6 +5324,13 @@
|
||||
</reconciliation>
|
||||
</properties>
|
||||
<fields>
|
||||
<field id="logo" xsi:type="AttributeImage">
|
||||
<display_max_width>96</display_max_width>
|
||||
<display_max_height>96</display_max_height>
|
||||
<storage_max_width>128</storage_max_width>
|
||||
<storage_max_height>128</storage_max_height>
|
||||
<is_null_allowed>true</is_null_allowed>
|
||||
</field>
|
||||
<field id="networkdevicesdevices_list" xsi:type="AttributeLinkedSet">
|
||||
<linked_class>NetworkDevice</linked_class>
|
||||
<ext_key_to_me>networkdevicetype_id</ext_key_to_me>
|
||||
@@ -5308,6 +5347,9 @@
|
||||
<item id="name">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
<item id="logo">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
<item id="networkdevicesdevices_list">
|
||||
<rank>20</rank>
|
||||
</item>
|
||||
@@ -5322,7 +5364,7 @@
|
||||
</search>
|
||||
<list>
|
||||
<items>
|
||||
<item id="name">
|
||||
<item id="logo">
|
||||
<rank>10</rank>
|
||||
</item>
|
||||
</items>
|
||||
|
||||
@@ -1156,6 +1156,8 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
Dict::Add('CS CZ', 'Czech', 'Čeština', [
|
||||
'Class:NetworkDeviceType' => 'Typ síťového zařízení',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Síťová zařízení',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Všechna síťová zařízení odpovídající tomuto typu',
|
||||
]);
|
||||
|
||||
@@ -1155,6 +1155,8 @@ Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
Dict::Add('DA DA', 'Danish', 'Dansk', [
|
||||
'Class:NetworkDeviceType' => 'Netværksenhed type',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Netværks enheder',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'All the network devices corresponding to this type~~',
|
||||
]);
|
||||
|
||||
@@ -1155,6 +1155,8 @@ Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
Dict::Add('DE DE', 'German', 'Deutsch', [
|
||||
'Class:NetworkDeviceType' => 'Netzwerkgerätetyp',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Netzwerkgeräte',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Alle Netzwerkgeräte, die diesem Typ entsprechen',
|
||||
]);
|
||||
|
||||
@@ -1163,6 +1163,8 @@ Dict::Add('EN US', 'English', 'English', [
|
||||
Dict::Add('EN US', 'English', 'English', [
|
||||
'Class:NetworkDeviceType' => 'Network Device Type',
|
||||
'Class:NetworkDeviceType+' => 'Typology. The possible values for the "Type" of a Network Device (e.g. Router, Switch, Firewall, etc.).',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Network devices',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'All the network devices corresponding to this type',
|
||||
]);
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('EN GB', 'British English', 'British English', [
|
||||
Dict::Add('EN GB', 'British English', 'British English', [
|
||||
'Class:NetworkDeviceType' => 'Network Device Type',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Network devices',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'All the network devices corresponding to this type',
|
||||
]);
|
||||
|
||||
@@ -1152,6 +1152,8 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
Dict::Add('ES CR', 'Spanish', 'Español, Castellano', [
|
||||
'Class:NetworkDeviceType' => 'Tipo Dispositivo de Red',
|
||||
'Class:NetworkDeviceType+' => 'Tipo de Dispositivo de Red',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Dispositivos de Red',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Dispositivos de Red',
|
||||
]);
|
||||
|
||||
@@ -1308,6 +1308,8 @@ Dict::Add('FR FR', 'French', 'Français', [
|
||||
Dict::Add('FR FR', 'French', 'Français', [
|
||||
'Class:NetworkDeviceType' => 'Type d\'équipement réseau',
|
||||
'Class:NetworkDeviceType+' => 'Typologie. Valeurs possibles pour le type d’un équipement réseau (ex : Routeur, Switch, Firewall, etc.).',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Utilisé comme icône pour les équipement réseau de ce Type lors de leur affichage (détails, aperçu et graphe d\'analyse d\'impact)',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Equipements réseaux',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Tous les équipements réseaux correspondant à ce type',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list/UI:Links:Create:Button+' => 'Créer un %4$s',
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
Dict::Add('HU HU', 'Hungarian', 'Magyar', [
|
||||
'Class:NetworkDeviceType' => 'Hálózati eszköz típus',
|
||||
'Class:NetworkDeviceType+' => '~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Hálózati eszközök',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Ilyen típusú hálózati eszközök',
|
||||
]);
|
||||
|
||||
@@ -1175,6 +1175,8 @@ Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
Dict::Add('IT IT', 'Italian', 'Italiano', [
|
||||
'Class:NetworkDeviceType' => 'Tipo di Dispositivo di Rete',
|
||||
'Class:NetworkDeviceType+' => '~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Dispositivi di Rete',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Tutti i dispositivi di rete corrispondenti a questo tipo',
|
||||
]);
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
Dict::Add('JA JP', 'Japanese', '日本語', [
|
||||
'Class:NetworkDeviceType' => 'ネットワークデバイスタイプ',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'ネットワークデバイス',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'All the network devices corresponding to this type~~',
|
||||
]);
|
||||
|
||||
@@ -1156,6 +1156,8 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
Dict::Add('NL NL', 'Dutch', 'Nederlands', [
|
||||
'Class:NetworkDeviceType' => 'Soort netwerkapparaat',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Netwerkapparaten',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Alle netwerkapparaten van deze soort',
|
||||
]);
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
Dict::Add('PL PL', 'Polish', 'Polski', [
|
||||
'Class:NetworkDeviceType' => 'Typ urządzenia sieciowego',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Urządzenia sieciowe',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Wszystkie urządzenia sieciowe odpowiadające temu typowi',
|
||||
]);
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
Dict::Add('PT BR', 'Brazilian', 'Brazilian', [
|
||||
'Class:NetworkDeviceType' => 'Tipo de dispositivo de rede',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Dispositivos de rede',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Todos os Dispositivos de rede correspondentes a este Tipo',
|
||||
]);
|
||||
|
||||
@@ -1155,6 +1155,8 @@ Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
Dict::Add('RU RU', 'Russian', 'Русский', [
|
||||
'Class:NetworkDeviceType' => 'Тип сетевого устройства',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Устройства',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Все сетевые устройства этого типа',
|
||||
]);
|
||||
|
||||
@@ -1154,6 +1154,8 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
Dict::Add('SK SK', 'Slovak', 'Slovenčina', [
|
||||
'Class:NetworkDeviceType' => 'Typ sieťového zariadenia',
|
||||
'Class:NetworkDeviceType+' => '~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Sieťové zariadenia',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'All the network devices corresponding to this type~~',
|
||||
]);
|
||||
|
||||
@@ -1155,6 +1155,8 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
Dict::Add('TR TR', 'Turkish', 'Türkçe', [
|
||||
'Class:NetworkDeviceType' => 'Ağ Cihazı Tipi',
|
||||
'Class:NetworkDeviceType+' => '~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => 'Ağ Aygıtları',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => 'Bu türde karşılık gelen tüm ağ aygıtları',
|
||||
]);
|
||||
|
||||
@@ -1171,6 +1171,8 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
Dict::Add('ZH CN', 'Chinese', '简体中文', [
|
||||
'Class:NetworkDeviceType' => '网络设备类型',
|
||||
'Class:NetworkDeviceType+' => '',
|
||||
'Class:NetworkDeviceType/Attribute:logo' => 'Logo~~',
|
||||
'Class:NetworkDeviceType/Attribute:logo+' => 'Used as icon for all Network Device of this type, when displayed in console (details, summary card and impact analysis graphs)~~',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list' => '网络设备',
|
||||
'Class:NetworkDeviceType/Attribute:networkdevicesdevices_list+' => '此类型的所有网络设备',
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user