From a8df08c01e60ed5fab2c8e88de25aa0c5db46adc Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Mon, 2 May 2016 11:13:24 +0200 Subject: [PATCH 1/2] Show the public note on editions Public notes should be visible either when there is one already saved, or if you can edit the field --- js/components/ascribe_detail/edition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/ascribe_detail/edition.js b/js/components/ascribe_detail/edition.js index 02efc7e0..178fd18a 100644 --- a/js/components/ascribe_detail/edition.js +++ b/js/components/ascribe_detail/edition.js @@ -130,7 +130,7 @@ let Edition = React.createClass({ defaultValue={edition.public_note ? edition.public_note : null} placeholder={getLangText('Enter your comments ...')} 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')} url={ApiUrls.note_public_edition} currentUser={currentUser} /> From af0b2109f96e7cd78a225cce8d22925a6c203023 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Mon, 2 May 2016 11:14:52 +0200 Subject: [PATCH 2/2] Remove small unnecessary bits of logic in displaying notes --- js/components/ascribe_detail/note.js | 2 +- js/components/ascribe_detail/piece_container.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/components/ascribe_detail/note.js b/js/components/ascribe_detail/note.js index 693a0400..4d5358c2 100644 --- a/js/components/ascribe_detail/note.js +++ b/js/components/ascribe_detail/note.js @@ -42,7 +42,7 @@ let Note = React.createClass({ render() { const { currentUser, defaultValue, editable, id, label, placeholder, show, url } = this.props; - if ((!!currentUser.username && editable || !editable ) && show) { + if ((currentUser.username && editable || !editable) && show) { return (