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

View File

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