Always show Bookmark icon. Always show edit if the post is a wiki.

This commit is contained in:
Robin Ward 2014-06-12 11:20:44 -04:00
parent 61bba4d074
commit efc70a2bca
2 changed files with 8 additions and 3 deletions

View file

@ -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) {

View file

@ -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