mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8533 - Impact Analysis, add icons and tooltips in shortcut_actions (#767)
* N°8533 - Impact Analysis, add icons and tooltips in shortcut_actions
This commit is contained in:
@@ -2000,13 +2000,13 @@ class MenuBlock extends DisplayBlock
|
|||||||
$this->AddMenuSeparator($aRegularActions);
|
$this->AddMenuSeparator($aRegularActions);
|
||||||
foreach ($aRelations as $sRelationCode => $aRelationInfo) {
|
foreach ($aRelations as $sRelationCode => $aRelationInfo) {
|
||||||
if (array_key_exists('down', $aRelationInfo)) {
|
if (array_key_exists('down', $aRelationInfo)) {
|
||||||
$aRegularActions[$sRelationCode.'_down'] = [
|
$aRegularActions['UI:Menu:'.$sRelationCode.'_down'] = [
|
||||||
'label' => $aRelationInfo['down'],
|
'label' => $aRelationInfo['down'],
|
||||||
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=down&class=$sClass&id=$id{$sContext}",
|
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=down&class=$sClass&id=$id{$sContext}",
|
||||||
] + $aActionParams;
|
] + $aActionParams;
|
||||||
}
|
}
|
||||||
if (array_key_exists('up', $aRelationInfo)) {
|
if (array_key_exists('up', $aRelationInfo)) {
|
||||||
$aRegularActions[$sRelationCode.'_up'] = [
|
$aRegularActions['UI:Menu:'.$sRelationCode.'_up'] = [
|
||||||
'label' => $aRelationInfo['up'],
|
'label' => $aRelationInfo['up'],
|
||||||
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=up&class=$sClass&id=$id{$sContext}",
|
'url' => "{$sRootUrl}pages/$sUIPage?operation=view_relations&relation=$sRelationCode&direction=up&class=$sClass&id=$id{$sContext}",
|
||||||
] + $aActionParams;
|
] + $aActionParams;
|
||||||
@@ -2251,6 +2251,16 @@ class MenuBlock extends DisplayBlock
|
|||||||
$sIconClass = 'fas fa-file-pdf fa-lg';
|
$sIconClass = 'fas fa-file-pdf fa-lg';
|
||||||
$sLabel = '';
|
$sLabel = '';
|
||||||
break;
|
break;
|
||||||
|
case 'UI:Menu:impacts_up':
|
||||||
|
$sIconClass = 'fas fa-sitemap fa-rotate-180';
|
||||||
|
$sLabel = '';
|
||||||
|
$aAction['tooltip'] = Dict::S('Relation:impacts/UpStream');
|
||||||
|
break;
|
||||||
|
case 'UI:Menu:impacts_down':
|
||||||
|
$sIconClass = 'fas fa-sitemap';
|
||||||
|
$sLabel = '';
|
||||||
|
$aAction['tooltip'] = Dict::S('Relation:impacts/DownStream');
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (isset($aAction['icon_class']) && (strlen($aAction['icon_class']) > 0)) {
|
if (isset($aAction['icon_class']) && (strlen($aAction['icon_class']) > 0)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user