2018-02-15 06:08:12 -05:00
|
|
|
nav.navbar.navbar-default.navbar-main
|
2014-06-04 11:14:35 -04:00
|
|
|
.container-fluid
|
|
|
|
.navbar-header
|
2018-11-15 12:21:45 -05:00
|
|
|
button.navbar-toggle(ng-init="navCollapsed = true", ng-click="navCollapsed = !navCollapsed", ng-class="{active: !navCollapsed}", aria-label="Toggle " + translate('navigation'))
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-bars(aria-hidden="true")
|
2016-06-17 09:18:52 -04:00
|
|
|
if settings.nav.custom_logo
|
2017-10-09 06:59:03 -04:00
|
|
|
a(href='/', aria-label=settings.appName, style='background-image:url("'+settings.nav.custom_logo+'")').navbar-brand
|
2016-06-17 09:18:52 -04:00
|
|
|
else if (nav.title)
|
2019-03-18 06:24:54 -04:00
|
|
|
a(href='/', aria-label=settings.appName, ng-non-bindable).navbar-title #{nav.title}
|
2015-02-05 11:56:35 -05:00
|
|
|
else
|
2017-10-09 06:59:03 -04:00
|
|
|
a(href='/', aria-label=settings.appName).navbar-brand
|
2014-06-04 11:14:35 -04:00
|
|
|
|
2022-03-31 06:34:49 -04:00
|
|
|
- var canDisplayAdminMenu = hasAdminAccess()
|
2022-02-10 10:39:37 -05:00
|
|
|
- var canDisplaySplitTestMenu = hasFeature('saas') && (canDisplayAdminMenu || (getSessionUser() && getSessionUser().staffAccess && (getSessionUser().staffAccess.splitTestMetrics || getSessionUser().staffAccess.splitTestManagement)))
|
2014-07-22 06:50:15 -04:00
|
|
|
.navbar-collapse.collapse(collapse="navCollapsed")
|
2014-06-04 12:46:22 -04:00
|
|
|
ul.nav.navbar-nav.navbar-right
|
2022-02-10 10:39:37 -05:00
|
|
|
if (canDisplayAdminMenu || canDisplaySplitTestMenu)
|
2015-06-03 06:14:26 -04:00
|
|
|
li.dropdown(class="subdued", dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2015-03-19 10:22:48 -04:00
|
|
|
| Admin
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
2022-02-10 10:39:37 -05:00
|
|
|
if canDisplayAdminMenu
|
|
|
|
li
|
|
|
|
a(href="/admin") Manage Site
|
|
|
|
li
|
|
|
|
a(href="/admin/user") Manage Users
|
2022-03-31 06:36:12 -04:00
|
|
|
li
|
|
|
|
a(href="/admin/project") Project URL Lookup
|
2022-02-10 10:39:37 -05:00
|
|
|
if canDisplaySplitTestMenu
|
2022-01-28 05:44:10 -05:00
|
|
|
li
|
|
|
|
a(href="/admin/split-test") Manage Split Tests
|
2015-03-19 10:22:48 -04:00
|
|
|
|
2017-01-11 05:27:38 -05:00
|
|
|
// loop over header_extras
|
2021-12-02 05:14:44 -05:00
|
|
|
each item in ((splitTestVariants && (splitTestVariants['unified-navigation'] === 'show-unified-navigation')) ? nav.header_extras_unified : nav.header_extras)
|
2018-09-19 16:37:57 -04: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 07:53:57 -04:00
|
|
|
} else {
|
|
|
|
var showNavItem = false
|
2018-09-19 16:37:57 -04:00
|
|
|
}
|
2017-01-11 05:27:38 -05:00
|
|
|
|
2018-09-19 16:37:57 -04:00
|
|
|
if showNavItem
|
2014-06-20 16:35:42 -04:00
|
|
|
if item.dropdown
|
2015-06-03 06:14:26 -04:00
|
|
|
li.dropdown(class=item.class, dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2014-08-05 06:22:42 -04:00
|
|
|
| !{translate(item.text)}
|
2014-06-20 16:35:42 -04:00
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
each child in item.dropdown
|
|
|
|
if child.divider
|
|
|
|
li.divider
|
|
|
|
else
|
|
|
|
li
|
|
|
|
if child.url
|
2021-12-02 05:14:44 -05:00
|
|
|
a(
|
|
|
|
href=child.url,
|
|
|
|
class=child.class,
|
|
|
|
event-tracking=child.event
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
) !{translate(child.text)}
|
2014-06-20 16:35:42 -04:00
|
|
|
else
|
2014-08-05 06:22:42 -04:00
|
|
|
| !{translate(child.text)}
|
2014-06-20 16:35:42 -04:00
|
|
|
else
|
|
|
|
li(class=item.class)
|
|
|
|
if item.url
|
2021-12-02 05:14:44 -05:00
|
|
|
a(
|
|
|
|
href=item.url,
|
|
|
|
class=item.class,
|
|
|
|
event-tracking=item.event
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
) !{translate(item.text)}
|
2014-06-20 16:35:42 -04:00
|
|
|
else
|
2014-08-05 06:22:42 -04:00
|
|
|
| !{translate(item.text)}
|
2014-02-12 05:23:40 -05:00
|
|
|
|
2017-01-11 05:27:38 -05:00
|
|
|
// logged out
|
|
|
|
if !getSessionUser()
|
|
|
|
// register link
|
2021-07-20 05:26:23 -04:00
|
|
|
if hasFeature('registration-page')
|
2017-01-11 05:27:38 -05: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 05:39:34 -05:00
|
|
|
a(href="/project") #{translate('Projects')}
|
2017-01-11 05:27:38 -05:00
|
|
|
li.dropdown(dropdown)
|
2019-04-17 06:11:17 -04:00
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
2017-01-11 05:27:38 -05:00
|
|
|
| #{translate('Account')}
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
li
|
2020-10-30 08:33:25 -04:00
|
|
|
div.subdued {{ usersEmail }}
|
2019-04-17 06:11:17 -04:00
|
|
|
li.divider.hidden-xs.hidden-sm
|
2017-01-11 05:27:38 -05:00
|
|
|
li
|
|
|
|
a(href="/user/settings") #{translate('Account Settings')}
|
|
|
|
if nav.showSubscriptionLink
|
|
|
|
li
|
|
|
|
a(href="/user/subscription") #{translate('subscription')}
|
2019-04-17 06:11:17 -04:00
|
|
|
li.divider.hidden-xs.hidden-sm
|
2017-01-11 05:27:38 -05:00
|
|
|
li
|
2019-01-16 12:04:11 -05:00
|
|
|
form(method="POST" action="/logout")
|
|
|
|
input(name='_csrf', type='hidden', value=csrfToken)
|
|
|
|
button.btn-link.text-left.dropdown-menu-button #{translate('log_out')}
|