app/views/toolbar.jade
//-
Copyright 2016 e-UCM (http://www.e-ucm.es/)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
This project has received funding from the European Union’s Horizon
2020 research and innovation programme under grant agreement No 644187.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 (link is external)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
nav.navbar.navbar-inverse.navbar-top
.container(ng-controller='ToolbarCtrl')
.navbar-header
button.navbar-toggle.collapsed(type='button' data-toggle='collapse' data-target='#navbar' aria-expanded='false' aria-controls='navbar')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
img.navbar-brand(src='rageicon.png' alt='Rage' style='float:left')
a.btn.navbar-brand(ng-if='isUser()' ui-sref='home') A.F.
a.btn.navbar-brand(ng-if='!isUser()' ui-sref='login') A.F.
#navbar.navbar-collapse.collapse
ul.nav.navbar-nav
li
a.btn(href="{{DOCS.QUICKSTART}}" target="_blank") Help
li(ng-if='isUser()')
a.btn(ui-sref='home') Home
li(ng-if='!isUser()')
a.btn(ui-sref='signup') SignUp
li.dropdown
li(ng-if='isUser()&&hasGames()')
a#dropdownGames.btn(data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
| Games
span.caret
ul.dropdown-menu(aria-labelledby='dropdownGames')
li(ng-repeat='game in games')
a(ng-href="#" ng-click='goToGame(game)') {{game.title}}
li.dropdown
li(ng-if='isUser()&&!isDeveloper()&&hasClasses()')
a#dropdownClasses.btn(data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
| Classes
span.caret
ul.dropdown-menu(aria-labelledby='dropdownClasses')
li(ng-repeat='class in classes')
a(ng-href="#" ng-click='goToClass(class)') {{class.name}}
li.dropdown
li(ng-if='isUser()&&!isDeveloper()&&hasActivities()')
a#dropdownActivities.btn(data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
| Activities
span.caret
ul.dropdown-menu(aria-labelledby='dropdownActivities')
li(ng-repeat='activity in activities')
a(ng-href="#" ng-click='goToActivity(activity)') {{activity.name}}
ul.nav.navbar-nav.navbar-right
li
span.label.label-danger(ng-if='isDeveloper()') developer role
span.label.label-primary(ng-if='isTeacher()') teacher role
span.label.label-default(ng-if='isStudent()') student role
li.dropdown
li(ng-if='isUser()')
a#dropdownUser.btn(data-toggle='dropdown' aria-haspopup='true' aria-expanded='true')
i.fa.fa-user
| {{username}}
span.caret
ul.dropdown-menu(aria-labelledby='dropdownUser')
li
a.btn(ng-click='logout()')
i.fa.fa-sign-out
| Logout
li(ng-if='!isUser()')
a.btn(ui-sref='login')
i.fa.fa-user
| Login