Always show Bookmark icon. Always show edit if the post is a wiki.
This commit is contained in:
parent
61bba4d074
commit
efc70a2bca
|
@ -109,7 +109,9 @@ export default Discourse.View.extend({
|
|||
var button = creator.call(self, post);
|
||||
if (button) {
|
||||
allButtons.push(button);
|
||||
if ((yours && button.opts.alwaysShowYours) || (hiddenButtons.indexOf(i) === -1)) {
|
||||
if ((yours && button.opts.alwaysShowYours) ||
|
||||
(post.get('wiki') && button.opts.alwaysShowWiki) ||
|
||||
(hiddenButtons.indexOf(i) === -1)) {
|
||||
visibleButtons.push(button);
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +204,10 @@ export default Discourse.View.extend({
|
|||
// Edit button
|
||||
buttonForEdit: function(post) {
|
||||
if (!post.get('can_edit')) return;
|
||||
return new Button('edit', 'post.controls.edit', 'pencil', {alwaysShowYours: true});
|
||||
return new Button('edit', 'post.controls.edit', 'pencil', {
|
||||
alwaysShowYours: true,
|
||||
alwaysShowWiki: true
|
||||
});
|
||||
},
|
||||
|
||||
clickEdit: function(post) {
|
||||
|
|
|
@ -89,7 +89,7 @@ basic:
|
|||
post_menu_hidden_items:
|
||||
client: true
|
||||
list: true
|
||||
default: 'edit|bookmark|delete|admin'
|
||||
default: 'edit|delete|admin'
|
||||
choices:
|
||||
- like
|
||||
- edit
|
||||
|
|
Loading…
Reference in New Issue