mirror of
https://github.com/flarum/framework.git
synced 2025-05-29 03:21:57 +08:00
Move forum ember app into a subdir, preparing for admin app to exist alongside
This commit is contained in:
26
ember/forum/app/components/composer/composer-edit.js
Normal file
26
ember/forum/app/components/composer/composer-edit.js
Normal file
@ -0,0 +1,26 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
import ComposerBody from 'flarum/components/composer/composer-body';
|
||||
|
||||
var precompileTemplate = Ember.Handlebars.compile;
|
||||
|
||||
/**
|
||||
The composer body for editing a post. Sets the initial content to the
|
||||
content of the post that is being edited, and adds a title control to
|
||||
indicate which post is being edited.
|
||||
*/
|
||||
export default ComposerBody.extend({
|
||||
submitLabel: 'Save Changes',
|
||||
content: Ember.computed.oneWay('post.content'),
|
||||
originalContent: Ember.computed.oneWay('post.content'),
|
||||
|
||||
populateControls: function(controls) {
|
||||
var title = Ember.Component.extend({
|
||||
tagName: 'h3',
|
||||
layout: precompileTemplate('Editing Post #{{component.post.number}} in <em>{{discussion.title}}</em>'),
|
||||
discussion: this.get('post.discussion'),
|
||||
component: this
|
||||
});
|
||||
controls.pushObjectWithTag(title, 'title');
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user