diff --git a/Kernel/Output/HTML/CustomerDashboard/TileServiceCatalog.pm b/Kernel/Output/HTML/CustomerDashboard/TileServiceCatalog.pm index 99ca98a..ac454d8 100644 --- a/Kernel/Output/HTML/CustomerDashboard/TileServiceCatalog.pm +++ b/Kernel/Output/HTML/CustomerDashboard/TileServiceCatalog.pm @@ -204,13 +204,30 @@ sub Run { } } } elsif ( $Needed eq 'Descriptions' ) { - $Service{DescriptionShort} = $ServiceRef->{$Needed}->{$LayoutObject->{UserLanguage}}->{DescriptionShort} || - $ServiceRef->{$Needed}->{$Kernel::OM->Get('Kernel::Config')->Get('DefaultLanguage')}->{DescriptionShort} || - $ServiceRef->{$Needed}->{'en'}->{DescriptionShort} || $LayoutObject->{LanguageObject}->Translate( 'Description not available.' ); + $Service{DescriptionShort} = $ServiceRef->{$Needed}->{$LayoutObject->{UserLanguage}}->{DescriptionShort} || + $ServiceRef->{$Needed}->{$Kernel::OM->Get('Kernel::Config')->Get('DefaultLanguage')}->{DescriptionShort} || + $ServiceRef->{$Needed}->{'en'}->{DescriptionShort} || $LayoutObject->{LanguageObject}->Translate( 'Description not available.' ); - $Service{DescriptionLong} = $ServiceRef->{$Needed}->{$LayoutObject->{UserLanguage}}->{DescriptionLong} || - $ServiceRef->{$Needed}->{$Kernel::OM->Get('Kernel::Config')->Get('DefaultLanguage')}->{DescriptionLong} || - $ServiceRef->{$Needed}->{'en'}->{DescriptionLong} || $LayoutObject->{LanguageObject}->Translate( 'Description not available.' ); + my $DynamicFieldBackendObject = $Kernel::OM->Get('Kernel::System::DynamicField::Backend'); + + my $IconFieldConfig = $Kernel::OM->Get('Kernel::System::DynamicField')->DynamicFieldGet( + Name => 'ServiceIcon', + ); + + if ($IconFieldConfig) { + my $IconValue = $DynamicFieldBackendObject->ValueGet( + DynamicFieldConfig => $IconFieldConfig, + ObjectID => $Service{ServiceID}, + ); + + if ($IconValue) { + $Service{ServiceIconClass} = $IconValue; + } + } + + $Service{DescriptionLong} = $ServiceRef->{$Needed}->{$LayoutObject->{UserLanguage}}->{DescriptionLong} || + $ServiceRef->{$Needed}->{$Kernel::OM->Get('Kernel::Config')->Get('DefaultLanguage')}->{DescriptionLong} || + $ServiceRef->{$Needed}->{'en'}->{DescriptionLong} || $LayoutObject->{LanguageObject}->Translate( 'Description not available.' ); } else { $Service{$Needed} = $ServiceRef->{$Needed}; @@ -447,6 +464,24 @@ sub Run { } $Service{NotSelectable} = 1; + + my $DynamicFieldBackendObject = $Kernel::OM->Get('Kernel::System::DynamicField::Backend'); + + my $IconFieldConfig = $Kernel::OM->Get('Kernel::System::DynamicField')->DynamicFieldGet( + Name => 'ServiceIcon', + ); + + if ($IconFieldConfig) { + my $IconValue = $DynamicFieldBackendObject->ValueGet( + DynamicFieldConfig => $IconFieldConfig, + ObjectID => $Service{ServiceID}, + ); + + if ($IconValue) { + $Service{ServiceIconClass} = $IconValue; + } + } + $ServiceList{ $Service{ServiceID} } = \%Service; $ParentID = $Service{ParentID}; diff --git a/Kernel/Output/HTML/Templates/Standard/Dashboard/TileServiceCatalog.tt b/Kernel/Output/HTML/Templates/Standard/Dashboard/TileServiceCatalog.tt index a401d17..dc90302 100644 --- a/Kernel/Output/HTML/Templates/Standard/Dashboard/TileServiceCatalog.tt +++ b/Kernel/Output/HTML/Templates/Standard/Dashboard/TileServiceCatalog.tt @@ -17,15 +17,20 @@