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

Update for discussion controls API

This commit is contained in:
Toby Zerner
2015-06-25 15:40:15 +09:30
parent 7e99bcd555
commit 0389ea53de

View File

@@ -6,13 +6,13 @@ import TagDiscussionModal from 'flarum-tags/components/tag-discussion-modal';
export default function() {
// Add a control allowing the discussion to be moved to another category.
extend(Discussion.prototype, 'controls', function(items) {
extend(Discussion.prototype, 'moderationControls', function(items) {
if (this.canTag()) {
items.add('tags', ActionButton.component({
label: 'Edit Tags',
icon: 'tag',
onclick: () => app.modal.show(new TagDiscussionModal({ discussion: this }))
}), {after: 'rename'});
}));
}
});
};