1
0
mirror of https://github.com/flarum/core.git synced 2025-08-10 18:35:56 +02:00

Hello world!

This commit is contained in:
Toby Zerner
2014-12-20 16:56:46 +10:30
commit 74db323f83
279 changed files with 11954 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import Ember from 'ember';
export default Ember.Component.extend({
icon: '',
title: '',
action: null,
badge: '',
badgeAction: null,
// active: false,
tagName: 'li',
classNameBindings: ['active'],
active: function() {
return this.get('childViews').anyBy('active');
}.property('childViews.@each.active'),
layout: function() {
return Ember.Handlebars.compile('<a href="#" class="count" {{action "badge"}}>{{badge}}</a>\
{{#link-to '+this.get('linkTo')+'}}'+this.get('iconTemplate')+'{{title}}{{/link-to}}');
}.property('linkTo', 'iconTemplate'),
iconTemplate: function() {
return '{{fa-icon icon}}';
}.property(),
actions: {
main: function() {
this.get('action')();
},
badge: function() {
this.get('badgeAction')();
}
}
});