FIX: Incorrect parameter being passed to component.

This commit is contained in:
Guo Xiang Tan 2017-01-25 13:09:08 +08:00
parent 1da6fc8e3c
commit d354a6f7a4
4 changed files with 4 additions and 12 deletions

View File

@ -34,7 +34,7 @@
→ {{bound-avatar-template model.user_changes.current.avatar_template "small"}} {{model.user_changes.current.username}}
{{/if}}
{{#if model.wiki_changes}}
— {{disabled-icon icon="pencil-square-o" secondary=wikiDisabled}}
— {{disabled-icon icon="pencil-square-o" disabled=wikiDisabled}}
{{/if}}
{{#if model.post_type_changes}}
— {{disabled-icon icon="shield" disabled=postTypeDisabled}}
@ -59,7 +59,7 @@
{{/if}}
{{#if model.wiki_changes}}
<div class="row">
{{disabled-icon icon="pencil-square-o" secondary=wikiDisabled}}
{{disabled-icon icon="pencil-square-o" disabled=wikiDisabled}}
</div>
{{/if}}
{{#if model.post_type_changes}}

View File

@ -31,12 +31,7 @@ export default createWidget('post-edits-indicator', {
if (attrs.wiki) {
icon = 'pencil-square-o';
className = `${className} wiki`;
if (attrs.version > 1) {
title = `${I18n.t('post.last_edited_on')} ${date}`;
} else {
title = I18n.t('post.wiki.about');
}
title = `${I18n.t('post.last_edited_on')} ${date}`;
} else {
title = `${I18n.t('post.last_edited_on')} ${date}`;
}

View File

@ -394,7 +394,7 @@ class PostsController < ApplicationController
post = find_post_from_params
guardian.ensure_can_wiki!(post)
post.revise(current_user, { wiki: params[:wiki] }, { skip_revision: true })
post.revise(current_user, { wiki: params[:wiki] })
render nothing: true
end

View File

@ -1753,9 +1753,6 @@ en:
via_auto_generated_email: "this post arrived via an auto generated email"
whisper: "this post is a private whisper for moderators"
wiki:
about: "this post is a wiki"
archetypes:
save: 'Save Options'