FIX: link to logster when served from a subfolder
This commit is contained in:
parent
0314685627
commit
0bb3123a67
|
@ -6,6 +6,10 @@ export default Ember.Component.extend({
|
||||||
return this.container.lookup('router:main');
|
return this.container.lookup('router:main');
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
|
fullPath: function() {
|
||||||
|
return Discourse.getURL(this.get('path'));
|
||||||
|
}.property('path'),
|
||||||
|
|
||||||
active: function() {
|
active: function() {
|
||||||
const route = this.get('route');
|
const route = this.get('route');
|
||||||
if (!route) { return; }
|
if (!route) { return; }
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
{{#if route}}
|
{{#if route}}
|
||||||
{{#link-to route}}{{i18n label}}{{/link-to}}
|
{{#link-to route}}{{i18n label}}{{/link-to}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{unbound href}}" data-auto-route="true">{{i18n label}}</a>
|
{{#if path}}
|
||||||
|
<a href="{{unbound fullPath}}" data-auto-route="true">{{i18n label}}</a>
|
||||||
|
{{else}}
|
||||||
|
<a href="{{unbound href}}" data-auto-route="true">{{i18n label}}</a>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{admin-nav-item route='adminLogs.screenedIpAddresses' label='admin.logs.screened_ips.title'}}
|
{{admin-nav-item route='adminLogs.screenedIpAddresses' label='admin.logs.screened_ips.title'}}
|
||||||
{{admin-nav-item route='adminLogs.screenedUrls' label='admin.logs.screened_urls.title'}}
|
{{admin-nav-item route='adminLogs.screenedUrls' label='admin.logs.screened_urls.title'}}
|
||||||
{{#if currentUser.admin}}
|
{{#if currentUser.admin}}
|
||||||
{{admin-nav-item href='/logs' label='admin.logs.logster.title'}}
|
{{admin-nav-item path='/logs' label='admin.logs.logster.title'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/admin-nav}}
|
{{/admin-nav}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue