<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" ng-controller="NavBarController">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" ui-sref="home">Camotion</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-left">
                <li ui-sref-active="active"><a ui-sref="cameras" lu-show-permission="CAMOTION_CAMERA_GET">Cameras</a></li>
                <li ui-sref-active="active"><a ui-sref="sensors" lu-show-permission="CAMOTION_SENSOR_GET">Sensors</a></li>
                <li ui-sref-active="active"><a ui-sref="commands" lu-show-permission="CAMOTION_COMMAND_GET">Commands</a></li>
                <li><a href="/admin" target="_blank" ng-show="canSeeAdmin()">Administration</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <ul class="nav navbar-nav navbar-right">
                    <li ng-show="isLogged()"><a ui-sref="cameras">{{ getUsername() }}</a></li>
                    <li ng-show="isLogged()"><a href="" ng-click="logout()">Logout</a></li>
                    <li ng-show="!isLogged()"><a href="" ng-click="logout()">Login</a></li>
                </ul>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>