<header class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <div class="nav-collapse">
                <nav id="global-nav">
                    <div data-ng-controller="RealmDropdownCtrl" >   <!--
                        <ul class="nav pull-left" data-ng-show="auth.loggedIn">
                            <li class="dropdown"><a data-toggle="dropdown" class="dropdown-toggle" href="#"> Realms <i class="caret"></i></a>
                                <ul class="dropdown-menu">
                                    <li ng-repeat="(id, name) in current.realms"><a href="#/realms/{{id}}">{{name}}</a>
                                    </li>
                                </ul>
                            </li>
                        </ul> -->
                        <ul class="nav pull-left" data-ng-show="showNav()">
                            <li class="divider-vertical-right"><a href="#/realms/{{currentRealmId}}">Realm</a></li>
                        </ul>
                        <select class="nav pull-left" data-ng-show="showNav()" ng-change="changeRealm()" ng-model="current.realm" ng-options="name for (id, name) in current.realms">
                        </select>
                        <!-- <select class="nav pull-left" ng-options="r.name for r in current.realms"></select> -->
                    </div>
                    <ul class="nav pull-right" data-ng-hide="auth.loggedIn">
                        <li><a href="/auth-server/saas/saas-login.jsp">Login</a></li>
                        <li><a href="/auth-server/saas/saas-register.jsp">Register</a></li>
                    </ul>
                    <ul class="nav pull-right" data-ng-show="auth.loggedIn">
                        <li class="divider-vertical-left dropdown"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><i
                                class="icon-user icon-gray"></i> Welcome: <b>{{auth.user.displayName}}</b> <i class="caret"></i></a>
                            <ul class="dropdown-menu">
                                <li><a href="/auth-server/rest/saas/logout">Sign Out</a></li>
                            </ul>
                        </li>
                    </ul>
                    <ul class="nav pull-right" data-ng-show="auth.loggedIn">
                        <li class="divider-vertical-left" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'"
                            data-ng-show="auth.loggedIn"><a href="#/create/realm">New Realm</a></li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</header>