mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Merge pull request #196 from ascribe/fix-edition-public-note-not-showing
Fix public notes not appearing in editions
This commit is contained in:
commit
75e8e90a4c
@ -130,7 +130,7 @@ let Edition = React.createClass({
|
|||||||
defaultValue={edition.public_note ? edition.public_note : null}
|
defaultValue={edition.public_note ? edition.public_note : null}
|
||||||
placeholder={getLangText('Enter your comments ...')}
|
placeholder={getLangText('Enter your comments ...')}
|
||||||
editable={!!edition.acl.acl_edit}
|
editable={!!edition.acl.acl_edit}
|
||||||
show={!!(edition.public_note && edition.acl.acl_edit)}
|
show={!!(edition.public_note || edition.acl.acl_edit)}
|
||||||
successMessage={getLangText('Public edition note saved')}
|
successMessage={getLangText('Public edition note saved')}
|
||||||
url={ApiUrls.note_public_edition}
|
url={ApiUrls.note_public_edition}
|
||||||
currentUser={currentUser} />
|
currentUser={currentUser} />
|
||||||
|
@ -42,7 +42,7 @@ let Note = React.createClass({
|
|||||||
render() {
|
render() {
|
||||||
const { currentUser, defaultValue, editable, id, label, placeholder, show, url } = this.props;
|
const { currentUser, defaultValue, editable, id, label, placeholder, show, url } = this.props;
|
||||||
|
|
||||||
if ((!!currentUser.username && editable || !editable ) && show) {
|
if ((currentUser.username && editable || !editable) && show) {
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
url={url}
|
url={url}
|
||||||
|
@ -302,7 +302,6 @@ let PieceContainer = React.createClass({
|
|||||||
id={this.getId}
|
id={this.getId}
|
||||||
label={getLangText('Personal note (private)')}
|
label={getLangText('Personal note (private)')}
|
||||||
defaultValue={piece.private_note || null}
|
defaultValue={piece.private_note || null}
|
||||||
show = {!!currentUser.username}
|
|
||||||
placeholder={getLangText('Enter your comments ...')}
|
placeholder={getLangText('Enter your comments ...')}
|
||||||
editable={true}
|
editable={true}
|
||||||
successMessage={getLangText('Private note saved')}
|
successMessage={getLangText('Private note saved')}
|
||||||
|
Loading…
Reference in New Issue
Block a user