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:
parent
84549929ba
commit
e0c9054748
27 changed files with 170 additions and 93 deletions
22
app/assets/javascripts/admin/components/nav-item.js.es6
Normal file
22
app/assets/javascripts/admin/components/nav-item.js.es6
Normal 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')
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue