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);
|
var button = creator.call(self, post);
|
||||||
if (button) {
|
if (button) {
|
||||||
allButtons.push(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);
|
visibleButtons.push(button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,7 +204,10 @@ export default Discourse.View.extend({
|
||||||
// Edit button
|
// Edit button
|
||||||
buttonForEdit: function(post) {
|
buttonForEdit: function(post) {
|
||||||
if (!post.get('can_edit')) return;
|
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) {
|
clickEdit: function(post) {
|
||||||
|
|
|
@ -89,7 +89,7 @@ basic:
|
||||||
post_menu_hidden_items:
|
post_menu_hidden_items:
|
||||||
client: true
|
client: true
|
||||||
list: true
|
list: true
|
||||||
default: 'edit|bookmark|delete|admin'
|
default: 'edit|delete|admin'
|
||||||
choices:
|
choices:
|
||||||
- like
|
- like
|
||||||
- edit
|
- edit
|
||||||
|
|
Loading…
Reference in New Issue