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:
@@ -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'],
|
@@ -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') {
|
||||
|
Reference in New Issue
Block a user