FIX: link to logster when served from a subfolder

This commit is contained in:
Neil Lalonde 2015-07-06 11:18:12 -04:00
parent 0314685627
commit 0bb3123a67
3 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,10 @@ export default Ember.Component.extend({
return this.container.lookup('router:main');
}.property(),
fullPath: function() {
return Discourse.getURL(this.get('path'));
}.property('path'),
active: function() {
const route = this.get('route');
if (!route) { return; }

View File

@ -4,6 +4,10 @@
{{#if route}}
{{#link-to route}}{{i18n label}}{{/link-to}}
{{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}}

View File

@ -4,7 +4,7 @@
{{admin-nav-item route='adminLogs.screenedIpAddresses' label='admin.logs.screened_ips.title'}}
{{admin-nav-item route='adminLogs.screenedUrls' label='admin.logs.screened_urls.title'}}
{{#if currentUser.admin}}
{{admin-nav-item href='/logs' label='admin.logs.logster.title'}}
{{admin-nav-item path='/logs' label='admin.logs.logster.title'}}
{{/if}}
{{/admin-nav}}