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
|
2022-06-14 05:37:33 -04:00
|
|
|
if (typeof(suppressNavbarRight) == "undefined")
|
|
|
|
button.navbar-toggle(ng-init="navCollapsed = true", ng-click="navCollapsed = !navCollapsed", ng-class="{active: !navCollapsed}", aria-label="Toggle " + translate('navigation'))
|
|
|
|
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-03-31 06:37:49 -04:00
|
|
|
- var canDisplayAdminRedirect = canRedirectToAdminDomain()
|
2022-02-10 10:39:37 -05:00
|
|
|
- var canDisplaySplitTestMenu = hasFeature('saas') && (canDisplayAdminMenu || (getSessionUser() && getSessionUser().staffAccess && (getSessionUser().staffAccess.splitTestMetrics || getSessionUser().staffAccess.splitTestManagement)))
|
2022-06-22 05:34:25 -04:00
|
|
|
- var canDisplaySurveyMenu = hasFeature('saas') && canDisplayAdminMenu
|
2015-03-19 10:22:48 -04:00
|
|
|
|
2022-06-14 05:37:33 -04:00
|
|
|
if (typeof(suppressNavbarRight) == "undefined")
|
|
|
|
.navbar-collapse.collapse(collapse="navCollapsed")
|
|
|
|
ul.nav.navbar-nav.navbar-right
|
|
|
|
if (canDisplayAdminMenu || canDisplayAdminRedirect || canDisplaySplitTestMenu)
|
|
|
|
li.dropdown(class="subdued", dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
|
|
|
| Admin
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
if canDisplayAdminMenu
|
|
|
|
li
|
|
|
|
a(href="/admin") Manage Site
|
|
|
|
li
|
|
|
|
a(href="/admin/user") Manage Users
|
|
|
|
li
|
|
|
|
a(href="/admin/project") Project URL Lookup
|
2022-09-15 05:51:51 -04:00
|
|
|
li
|
|
|
|
a(href="/admin/saml/logs") SAML logs
|
2022-06-14 05:37:33 -04:00
|
|
|
if canDisplayAdminRedirect
|
|
|
|
li
|
|
|
|
a(href=settings.adminUrl) Switch to Admin
|
|
|
|
if canDisplaySplitTestMenu
|
|
|
|
li
|
2022-12-20 11:09:39 -05:00
|
|
|
a(href="/admin/split-test") Manage Feature Flags
|
2022-06-22 05:34:25 -04:00
|
|
|
if canDisplaySurveyMenu
|
|
|
|
li
|
|
|
|
a(href="/admin/survey") Manage Surveys
|
2022-06-14 05:37:33 -04:00
|
|
|
|
|
|
|
// loop over header_extras
|
2022-12-12 10:49:34 -05:00
|
|
|
each item in nav.header_extras
|
2022-06-14 05:37:33 -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
|
|
|
|
} else {
|
|
|
|
var showNavItem = false
|
|
|
|
}
|
2017-01-11 05:27:38 -05:00
|
|
|
|
2022-06-14 05:37:33 -04:00
|
|
|
if showNavItem
|
|
|
|
if item.dropdown
|
|
|
|
li.dropdown(class=item.class, dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
|
|
|
| !{translate(item.text)}
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
|
|
|
each child in item.dropdown
|
|
|
|
if child.divider
|
|
|
|
li.divider
|
2023-06-06 08:10:32 -04:00
|
|
|
else if child.isContactUs
|
|
|
|
li
|
|
|
|
a(ng-controller="ContactModal" ng-click="contactUsModal()" href)
|
|
|
|
span(event-tracking="menu-clicked-contact" event-tracking-mb="true" event-tracking-trigger="click")
|
|
|
|
| #{translate("contact_us")}
|
2022-06-14 05:37:33 -04:00
|
|
|
else
|
2022-06-03 04:06:17 -04:00
|
|
|
li
|
|
|
|
if child.url
|
2023-11-20 05:24:16 -05:00
|
|
|
a(
|
|
|
|
href=child.url,
|
|
|
|
class=child.class,
|
|
|
|
event-tracking=child.event
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
event-segmentation=child.eventSegmentation
|
|
|
|
) !{translate(child.text)}
|
2022-06-03 04:06:17 -04:00
|
|
|
else
|
|
|
|
| !{translate(child.text)}
|
2022-06-14 05:37:33 -04:00
|
|
|
else
|
|
|
|
li(class=item.class)
|
|
|
|
if item.url
|
|
|
|
a(
|
|
|
|
href=item.url,
|
|
|
|
class=item.class,
|
|
|
|
event-tracking=item.event
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
) !{translate(item.text)}
|
|
|
|
else
|
|
|
|
| !{translate(item.text)}
|
|
|
|
|
|
|
|
// logged out
|
|
|
|
if !getSessionUser()
|
|
|
|
// register link
|
|
|
|
if hasFeature('registration-page')
|
|
|
|
li
|
|
|
|
a(
|
|
|
|
href="/register"
|
|
|
|
event-tracking="menu-clicked-register"
|
|
|
|
event-tracking-action="clicked"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-segmentation={ page: currentUrl }
|
|
|
|
) #{translate('register')}
|
2014-02-12 05:23:40 -05:00
|
|
|
|
2022-06-14 05:37:33 -04:00
|
|
|
// login link
|
2017-01-11 05:27:38 -05:00
|
|
|
li
|
2022-04-25 05:17:57 -04:00
|
|
|
a(
|
2022-06-14 05:37:33 -04:00
|
|
|
href="/login"
|
|
|
|
event-tracking="menu-clicked-login"
|
2022-04-25 05:17:57 -04:00
|
|
|
event-tracking-action="clicked"
|
|
|
|
event-tracking-trigger="click"
|
|
|
|
event-tracking-mb="true"
|
|
|
|
event-segmentation={ page: currentUrl }
|
2023-12-05 10:35:11 -05:00
|
|
|
).text-capitalize #{translate('log_in')}
|
2017-01-11 05:27:38 -05:00
|
|
|
|
2022-06-14 05:37:33 -04:00
|
|
|
// projects link and account menu
|
|
|
|
if getSessionUser()
|
|
|
|
li
|
|
|
|
a(href="/project") #{translate('Projects')}
|
|
|
|
li.dropdown(dropdown)
|
|
|
|
a.dropdown-toggle(href, dropdown-toggle)
|
|
|
|
| #{translate('Account')}
|
|
|
|
b.caret
|
|
|
|
ul.dropdown-menu
|
2017-01-11 05:27:38 -05:00
|
|
|
li
|
2022-06-14 05:37:33 -04:00
|
|
|
div.subdued {{ usersEmail }}
|
|
|
|
li.divider.hidden-xs.hidden-sm
|
|
|
|
li
|
|
|
|
a(href="/user/settings") #{translate('Account Settings')}
|
|
|
|
if nav.showSubscriptionLink
|
|
|
|
li
|
|
|
|
a(href="/user/subscription") #{translate('subscription')}
|
|
|
|
li.divider.hidden-xs.hidden-sm
|
|
|
|
li
|
|
|
|
form(method="POST" action="/logout")
|
|
|
|
input(name='_csrf', type='hidden', value=csrfToken)
|
|
|
|
button.btn-link.text-left.dropdown-menu-button #{translate('log_out')}
|