Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Create dropdown on menuitems with submenus
Browse files Browse the repository at this point in the history
  • Loading branch information
netusco committed May 9, 2014
1 parent d0268ed commit 12e81fd
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions public/modules/core/views/header.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
</div>
<nav class="collapse navbar-collapse" collapse="!isCollapsed" role="navigation">
<ul class="nav navbar-nav" data-ng-if="menu.shouldRender(authentication.user);">
<li data-ng-repeat="item in menu.items" data-ng-if="item.shouldRender(authentication.user);" ui-route="{{item.uiRoute}}" ng-class="{active: $uiRoute}">
<a href="/#!/{{item.link}}">{{item.title}}</a>
<li data-ng-repeat="item in menu.items" data-ng-if="item.shouldRender(authentication.user);" ng-switch="item.class" class="{{item.class}}" ui-route="{{item.uiRoute}}" ng-class="{active: $uiRoute}">
<a ng-switch-when="dropdown" href="#" class="dropdown-toggle" data-toggle="dropdown">
{{item.title}}
<b class="caret"></b>
</a>
<ul ng-switch-when="dropdown" class="dropdown-menu">
<li data-ng-repeat="subitem in item.subitems">
<a href="/#!/{{subitem.link}}">{{subitem.title}}</a>
</li>
</ul>

<a ng-switch-default href="/#!/{{item.link}}">{{item.title}}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-hide="authentication.user">
Expand Down Expand Up @@ -46,4 +56,4 @@
</li>
</ul>
</nav>
</div>
</div>

0 comments on commit 12e81fd

Please sign in to comment.