Revert "FIX: Incorrect parameter being passed to component."

This reverts commit d354a6f7a4.
This commit is contained in:
Guo Xiang Tan 2017-01-25 13:12:24 +08:00
parent d354a6f7a4
commit 0a25df67bc
4 changed files with 12 additions and 4 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" disabled=wikiDisabled}}
— {{disabled-icon icon="pencil-square-o" secondary=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" disabled=wikiDisabled}}
{{disabled-icon icon="pencil-square-o" secondary=wikiDisabled}}
</div>
{{/if}}
{{#if model.post_type_changes}}

View File

@ -31,7 +31,12 @@ export default createWidget('post-edits-indicator', {
if (attrs.wiki) {
icon = 'pencil-square-o';
className = `${className} wiki`;
title = `${I18n.t('post.last_edited_on')} ${date}`;
if (attrs.version > 1) {
title = `${I18n.t('post.last_edited_on')} ${date}`;
} else {
title = I18n.t('post.wiki.about');
}
} 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] })
post.revise(current_user, { wiki: params[:wiki] }, { skip_revision: true })
render nothing: true
end

View File

@ -1753,6 +1753,9 @@ 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'