mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4852 - Navigation menu: Display "+" dict entries as a tooltip on sub-nodes (#380)
This commit is contained in:
@@ -291,7 +291,17 @@ class ApplicationMenu
|
||||
* @param string $sMenuGroupIdx
|
||||
* @param array $aExtraParams
|
||||
*
|
||||
* @return array
|
||||
* @return array {
|
||||
* array {
|
||||
* sId: string,
|
||||
* sTitle: string,
|
||||
* sLabel: string,
|
||||
* bHasCount: bolean,
|
||||
* sUrl: string url
|
||||
* bOpenInNewWindow: bolean
|
||||
* aSubMenuNodes: same structure recursively
|
||||
* }
|
||||
* } $aSubMenuNodes
|
||||
* @throws \DictExceptionMissingString
|
||||
* @throws \Exception
|
||||
* @since 3.0.0
|
||||
@@ -320,12 +330,13 @@ class ApplicationMenu
|
||||
}
|
||||
|
||||
$aSubMenuNodes[] = [
|
||||
'sId' => $oSubMenuNode->GetMenuId(),
|
||||
'sTitle' => $oSubMenuNode->GetTitle(),
|
||||
'bHasCount' => $oSubMenuNode->HasCount(),
|
||||
'sUrl' => $oSubMenuNode->GetHyperlink($aExtraParams),
|
||||
'sId' => $oSubMenuNode->GetMenuId(),
|
||||
'sTitle' => $oSubMenuNode->GetTitle(),
|
||||
'sLabel' => $oSubMenuNode->GetLabel(),
|
||||
'bHasCount' => $oSubMenuNode->HasCount(),
|
||||
'sUrl' => $oSubMenuNode->GetHyperlink($aExtraParams),
|
||||
'bOpenInNewWindow' => $oSubMenuNode->IsHyperLinkInNewWindow(),
|
||||
'aSubMenuNodes' => static::GetSubMenuNodes($sSubMenuItemIdx, $aExtraParams),
|
||||
'aSubMenuNodes' => static::GetSubMenuNodes($sSubMenuItemIdx, $aExtraParams),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -746,7 +757,7 @@ abstract class MenuNode
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return string The "+" dictionary entry for this menu if exists, otherwise the Title (if we have a parent title, will output parentTitle / currentTitle)
|
||||
*/
|
||||
public function GetLabel()
|
||||
{
|
||||
@@ -758,7 +769,6 @@ abstract class MenuNode
|
||||
} else {
|
||||
$sRet = $this->GetTitle();
|
||||
}
|
||||
//$sRet = $this->GetTitle();
|
||||
}
|
||||
return $sRet;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{% if aMenuNode.sUrl is not empty %}
|
||||
{% set sTarget = (aMenuNode.bOpenInNewWindow == true) ? 'target="_blank"' : '' %}
|
||||
<a class="ibo-navigation-menu--menu-node-title" data-role="ibo-navigation-menu--menu-node-title" href="{{ aMenuNode.sUrl }}" {{ sTarget|raw }}>
|
||||
<span class="ibo-navigation-menu--menu-node-label" data-role="ibo-navigation-menu--menu-node-label" title="{{ aMenuNode.sTitle }}">{{ aMenuNode.sTitle }}</span>
|
||||
<span class="ibo-navigation-menu--menu-node-label" data-role="ibo-navigation-menu--menu-node-label" title="{{ aMenuNode.sLabel }}">{{ aMenuNode.sTitle }}</span>
|
||||
{% if aMenuNode.bHasCount %}
|
||||
{# Counters will be shown once the background update is done (see JS widget) #}
|
||||
<span class="ibo-navigation-menu--menu-node-counter ibo-is-hidden" data-menu-id="{{ aMenuNode.sId }}"></span>
|
||||
@@ -10,7 +10,7 @@
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="ibo-navigation-menu--menu-node-title" data-role="ibo-navigation-menu--menu-node-title">
|
||||
<span class="ibo-navigation-menu--menu-node-label" data-role="ibo-navigation-menu--menu-node-label" title="{{ aMenuNode.sTitle }}">{{ aMenuNode.sTitle }}</span>
|
||||
<span class="ibo-navigation-menu--menu-node-label" data-role="ibo-navigation-menu--menu-node-label" title="{{ aMenuNode.sLabel }}">{{ aMenuNode.sTitle }}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if aMenuNode.aSubMenuNodes is defined and aMenuNode.aSubMenuNodes|length > 0 %}
|
||||
@@ -20,4 +20,4 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user