</div>
<ul class="nav navbar-nav nav-tabs">
- <li {{#isActiveLink '/dashboard/'}}class="active"{{/isActiveLink}}>
+ <li {{#if isOverviewActive}}class="active"{{/if}}>
<a href="{{dashboardUrl contextKey}}">{{t 'overview.page'}}</a>
</li>
<li {{#isActiveLink '/components'}}class="active"{{/isActiveLink}}>
<li {{#isActiveLink '/component_issues'}}class="active"{{/isActiveLink}}>
<a href="{{link '/component_issues/index?id=' contextKeyEncoded }}">{{t 'issues.page'}}</a>
</li>
- <li class="dropdown">
+ <li class="dropdown {{#if isMoreActive}}active{{/if}}">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">{{t 'more'}} <i class="icon-dropdown"></i></a>
<ul class="dropdown-menu">
<li class="dropdown-header">{{t 'layout.dashboards'}}</li>
},
serializeData: function () {
+ var href = window.location.href,
+ search = window.location.search,
+ isOverviewActive = href.indexOf('/dashboard/') !== -1 && search.indexOf('did=') === -1,
+ isMoreActive = !isOverviewActive && href.indexOf('/components') === -1 &&
+ href.indexOf('/component_issues') === -1;
+
return _.extend(Marionette.Layout.prototype.serializeData.apply(this, arguments), {
canManageContextDashboards: window.SS.user != null,
- contextKeyEncoded: encodeURIComponent(this.model.get('contextKey'))
+ contextKeyEncoded: encodeURIComponent(this.model.get('contextKey')),
+
+ isOverviewActive: isOverviewActive,
+ isMoreActive: isMoreActive
});
}
});