1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Rework discussion/post components

This commit is contained in:
Toby Zerner
2015-01-07 17:22:34 +10:30
parent d4e573b629
commit ff6c7455f5
13 changed files with 45 additions and 95 deletions

View File

@@ -5,12 +5,12 @@ import ActionButton from '../ui/controls/action-button';
export default Ember.Component.extend({
tagName: 'article',
templateName: 'components/discussions/post',
layoutName: 'components/discussions/post-full',
// controls: null,
contentComponent: function() {
return 'discussions/post-'+this.get('post.type');
return 'discussions/post-content-'+this.get('post.type');
}.property('post.type'),
classNames: ['post'],

View File

@@ -7,7 +7,7 @@ export default Ember.Component.extend({
layoutName: 'components/ui/controls/item-list',
listItems: function() {
if (!this.get('items')) return [];
if (!Ember.isArray(this.get('items'))) return [];
var listItems = [];
this.get('items').forEach(function(item) {
if (item.tagName != 'li') {