Skip to content

Commit

Permalink
refs #5192 display category name in menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed May 20, 2014
1 parent 307ec31 commit 056e8ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Expand Up @@ -12,6 +12,7 @@
* <a class="item disabled">Disabled</a>
* <a class="item active">Active item</a>
* <hr class="item separator"/>
* <a class="item disabled category">Category</a>
* <a class="item" href="/url"></a>
* </div>
*/
Expand Down
5 changes: 5 additions & 0 deletions plugins/CoreHome/angularjs/menudropdown/menudropdown.less
Expand Up @@ -53,6 +53,11 @@
cursor: default;
}

&.category {
font-size: 11px;
color: @theme-color-text-light !important
}

&.separator {
padding: 0px !important;
border-bottom: 0px;
Expand Down
4 changes: 3 additions & 1 deletion plugins/CoreHome/templates/_topBarHelloMenu.twig
Expand Up @@ -9,7 +9,7 @@

{% macro userMenuItem(label, menu, currentModule, currentAction) %}
{% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}
<a class="active item"
<a class="item active"
{% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
>{{ label|translate }}</a>
{% else %}
Expand Down Expand Up @@ -41,6 +41,8 @@
{% endif %}

{% if lev1UserMenu._hasSubmenu is defined and lev1UserMenu._hasSubmenu %}
<a class="item disabled category">{{ lev1UserLabel|translate }}</a>

{% for lev2Label,lev2Menu in lev1UserMenu if lev2Label|slice(0,1) != '_' %}
{{ _self.userMenuItem(lev2Label, lev2Menu, currentModule, currentAction) }}
{% endfor %}
Expand Down

0 comments on commit 056e8ef

Please sign in to comment.