2015-02-10 15:35:40 +08:00
|
|
|
import Ember from 'ember';
|
|
|
|
|
|
|
|
import ComposerBody from 'flarum/components/composer/composer-body';
|
|
|
|
|
|
|
|
var precompileTemplate = Ember.Handlebars.compile;
|
|
|
|
|
|
|
|
/**
|
|
|
|
The composer body for posting a reply. Adds a title control to indicate
|
|
|
|
which discussion is being replied to.
|
|
|
|
*/
|
|
|
|
export default ComposerBody.extend({
|
|
|
|
submitLabel: 'Post Reply',
|
|
|
|
|
|
|
|
populateControls: function(items) {
|
2015-02-26 07:13:53 +08:00
|
|
|
var title = Ember.Component.extend({
|
2015-02-10 15:35:40 +08:00
|
|
|
tagName: 'h3',
|
|
|
|
layout: precompileTemplate('Replying to <em>{{component.discussion.title}}</em>'),
|
|
|
|
component: this
|
|
|
|
});
|
|
|
|
items.pushObjectWithTag(title, 'title');
|
|
|
|
}
|
|
|
|
});
|