1
0
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:
Brett Sun 2016-05-02 11:52:29 +02:00
commit 75e8e90a4c
3 changed files with 2 additions and 3 deletions

View File

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

View File

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

View File

@ -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')}