2018-02-15 11:08:12 +00:00
|
|
|
nav.navbar.navbar-default.navbar-main
|
2014-06-04 15:14:35 +00:00
|
|
|
.container-fluid
|
|
|
|
.navbar-header
|
2018-11-15 17:21:45 +00:00
|
|
|
button.navbar-toggle(ng-init="navCollapsed = true", ng-click="navCollapsed = !navCollapsed", ng-class="{active: !navCollapsed}", aria-label="Toggle " + translate('navigation'))
|
2018-11-19 09:41:34 +00:00
|
|
|
i.fa.fa-bars(aria-hidden="true")
|
2016-06-17 13:18:52 +00:00
|
|
|
if settings.nav.custom_logo
|
2017-10-09 10:59:03 +00:00
|
|
|
a(href='/', aria-label=settings.appName, style='background-image:url("'+settings.nav.custom_logo+'")').navbar-brand
|
2016-06-17 13:18:52 +00:00
|
|
|
else if (nav.title)
|
2019-03-18 10:24:54 +00:00
|
|
|
a(href='/', aria-label=settings.appName, ng-non-bindable).navbar-title #{nav.title}
|
2015-02-05 16:56:35 +00:00
|
|
|
else
|
2017-10-09 10:59:03 +00:00
|
|
|
a(href='/', aria-label=settings.appName).navbar-brand
|
2014-06-04 15:14:35 +00:00
|
|
|
|
2014-07-22 10:50:15 +00:00
|
|
|
.navbar-collapse.collapse(collapse="navCollapsed")
|
2015-03-19 14:22:48 +00:00
|
|
|
|
2014-06-04 16:46:22 +00:00
|
|
|
ul.nav.navbar-nav.navbar-right
|
2016-09-06 14:22:13 +00:00
|
|
|
if (getSessionUser() && getSessionUser().isAdmin)
|
2015-06-03 10:14:26 +00:00
|
|
|
li.dropdown(class="subdued", dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2015-03-19 14:22:48 +00:00
|
|
|
| Admin
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
2016-06-06 15:11:26 +00:00
|
|
|
li
|
|
|
|
a(href="/admin") Manage Site
|
2015-03-19 14:22:48 +00:00
|
|
|
li
|
2015-09-16 11:17:58 +00:00
|
|
|
a(href="/admin/user") Manage Users
|
2015-03-19 14:22:48 +00:00
|
|
|
|
2017-01-11 10:27:38 +00:00
|
|
|
|
|
|
|
// loop over header_extras
|
|
|
|
each item in nav.header_extras
|
2018-09-19 20:37:57 +00:00
|
|
|
-
|
|
|
|
if ((item.only_when_logged_in && getSessionUser())
|
|
|
|
|| (item.only_when_logged_out && (!getSessionUser()))
|
|
|
|
|| (!item.only_when_logged_out && !item.only_when_logged_in && !item.only_content_pages)
|
|
|
|
|| (item.only_content_pages && (typeof(suppressNavContentLinks) == "undefined" || !suppressNavContentLinks))
|
|
|
|
){
|
|
|
|
var showNavItem = true
|
2018-09-21 11:53:57 +00:00
|
|
|
} else {
|
|
|
|
var showNavItem = false
|
2018-09-19 20:37:57 +00:00
|
|
|
}
|
2017-01-11 10:27:38 +00:00
|
|
|
|
2018-09-19 20:37:57 +00:00
|
|
|
if showNavItem
|
2014-06-20 20:35:42 +00:00
|
|
|
if item.dropdown
|
2015-06-03 10:14:26 +00:00
|
|
|
li.dropdown(class=item.class, dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2014-08-05 10:22:42 +00:00
|
|
|
| !{translate(item.text)}
|
2014-06-20 20:35:42 +00:00
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
each child in item.dropdown
|
|
|
|
if child.divider
|
|
|
|
li.divider
|
|
|
|
else
|
|
|
|
li
|
|
|
|
if child.url
|
2014-08-05 10:22:42 +00:00
|
|
|
a(href=child.url, class=child.class) !{translate(child.text)}
|
2014-06-20 20:35:42 +00:00
|
|
|
else
|
2014-08-05 10:22:42 +00:00
|
|
|
| !{translate(child.text)}
|
2014-06-20 20:35:42 +00:00
|
|
|
else
|
|
|
|
li(class=item.class)
|
|
|
|
if item.url
|
2014-08-05 10:22:42 +00:00
|
|
|
a(href=item.url, class=item.class) !{translate(item.text)}
|
2014-06-20 20:35:42 +00:00
|
|
|
else
|
2014-08-05 10:22:42 +00:00
|
|
|
| !{translate(item.text)}
|
2014-02-12 10:23:40 +00:00
|
|
|
|
2017-01-11 10:27:38 +00:00
|
|
|
// logged out
|
|
|
|
if !getSessionUser()
|
|
|
|
// register link
|
2017-11-20 10:47:32 +00:00
|
|
|
if hasFeature('registration')
|
2017-01-11 10:27:38 +00:00
|
|
|
li
|
|
|
|
a(href="/register") #{translate('register')}
|
|
|
|
|
|
|
|
// login link
|
|
|
|
li
|
|
|
|
a(href="/login") #{translate('log_in')}
|
|
|
|
|
|
|
|
// projects link and account menu
|
|
|
|
if getSessionUser()
|
|
|
|
li
|
2017-01-11 10:39:34 +00:00
|
|
|
a(href="/project") #{translate('Projects')}
|
2017-01-11 10:27:38 +00:00
|
|
|
li.dropdown(dropdown)
|
2019-04-17 10:11:17 +00:00
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2017-01-11 10:27:38 +00:00
|
|
|
| #{translate('Account')}
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
li
|
2020-10-30 12:33:25 +00:00
|
|
|
div.subdued {{ usersEmail }}
|
2019-04-17 10:11:17 +00:00
|
|
|
li.divider.hidden-xs.hidden-sm
|
2017-01-11 10:27:38 +00:00
|
|
|
li
|
|
|
|
a(href="/user/settings") #{translate('Account Settings')}
|
|
|
|
if nav.showSubscriptionLink
|
|
|
|
li
|
|
|
|
a(href="/user/subscription") #{translate('subscription')}
|
2019-04-17 10:11:17 +00:00
|
|
|
li.divider.hidden-xs.hidden-sm
|
2017-01-11 10:27:38 +00:00
|
|
|
li
|
2019-01-16 17:04:11 +00:00
|
|
|
form(method="POST" action="/logout")
|
|
|
|
input(name='_csrf', type='hidden', value=csrfToken)
|
|
|
|
button.btn-link.text-left.dropdown-menu-button #{translate('log_out')}
|