mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-16 04:12:19 +01:00
Many issues arise when using angular-bootstrap 0.13. Migration to 1.0 is straightforward, offers a more stable interface, extra directives and fixes many bugs. Migration guide: https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes Fixes #1142 Fixes #1131
60 lines
2.9 KiB
HTML
60 lines
2.9 KiB
HTML
<div class="container" ng-controller="HeaderController">
|
|
<div class="navbar-header">
|
|
<button class="navbar-toggle" type="button" ng-click="toggleCollapsibleMenu()">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a ui-sref="home" class="navbar-brand">MEAN.JS</a>
|
|
</div>
|
|
<nav class="collapse navbar-collapse" uib-collapse="!isCollapsed" role="navigation">
|
|
<ul class="nav navbar-nav" ng-if="menu.shouldRender(authentication.user);">
|
|
<li ng-repeat="item in menu.items | orderBy: 'position'" ng-if="item.shouldRender(authentication.user);" ng-switch="item.type" ng-class="{ active: $state.includes(item.state), dropdown: item.type === 'dropdown' }" class="{{item.class}}" uib-dropdown="item.type === 'dropdown'">
|
|
<a ng-switch-when="dropdown" class="dropdown-toggle" uib-dropdown-toggle role="button">{{::item.title}} <span class="caret"></span></a>
|
|
<ul ng-switch-when="dropdown" class="dropdown-menu">
|
|
<li ng-repeat="subitem in item.items | orderBy: 'position'" ng-if="subitem.shouldRender(authentication.user);" ui-sref-active="active">
|
|
<a ui-sref="{{subitem.state}}" ng-bind="subitem.title"></a>
|
|
</li>
|
|
</ul>
|
|
<a ng-switch-default ui-sref="{{item.state}}" ng-bind="item.title"></a>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav navbar-nav navbar-right" ng-hide="authentication.user">
|
|
<li ui-sref-active="active">
|
|
<a ui-sref="authentication.signup">Sign Up</a>
|
|
</li>
|
|
<li class="divider-vertical"></li>
|
|
<li ui-sref-active="active">
|
|
<a ui-sref="authentication.signin">Sign In</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="nav navbar-nav navbar-right" ng-show="authentication.user">
|
|
<li class="dropdown" uib-dropdown>
|
|
<a class="dropdown-toggle user-header-dropdown-toggle" uib-dropdown-toggle role="button">
|
|
<img ng-src="{{authentication.user.profileImageURL}}" alt="{{authentication.user.displayName}}" class="header-profile-image" />
|
|
<span ng-bind="authentication.user.displayName"></span> <b class="caret"></b>
|
|
</a>
|
|
<ul class="dropdown-menu" role="menu">
|
|
<li ui-sref-active="active">
|
|
<a ui-sref="settings.profile">Edit Profile</a>
|
|
</li>
|
|
<li ui-sref-active="active">
|
|
<a ui-sref="settings.picture">Change Profile Picture</a>
|
|
</li>
|
|
<li ui-sref-active="active" ng-show="authentication.user.provider === 'local'">
|
|
<a ui-sref="settings.password">Change Password</a>
|
|
</li>
|
|
<li ui-sref-active="active">
|
|
<a ui-sref="settings.accounts">Manage Social Accounts</a>
|
|
</li>
|
|
<li class="divider"></li>
|
|
<li>
|
|
<a href="/api/auth/signout" target="_self">Signout</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|