2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FEATURE: invite page tabs

This commit is contained in:
Arpit Jalan 2015-07-11 17:39:12 +05:30
parent 84549929ba
commit e0c9054748
27 changed files with 170 additions and 93 deletions

View file

@ -0,0 +1,22 @@
export default Ember.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
router: function() {
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; }
const routeParam = this.get('routeParam'),
router = this.get('router');
return routeParam ? router.isActive(route, routeParam) : router.isActive(route);
}.property('router.url', 'route')
});