Skip to content

Commit

Permalink
Merge pull request #606 from CSCfi/better-review-comments
Browse files Browse the repository at this point in the history
feat: show better review comment labels
  • Loading branch information
Tommi Jalkanen authored Jul 12, 2018
2 parents 413a388 + ffceb7d commit acacad7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
5 changes: 3 additions & 2 deletions resources/translations/en-GB.edn
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@
:status-changed-subject "Application state change"}
:footer "Powered by CSC - IT Center for Science"
:form {:actions "Actions"
:add-comments "Add comment to the decision (shown to applicant except if review)"
:add-comments-not-shown-to-applicant "Add comment to the decision"
:add-comments "Add comment to the decision"
:add-comments-shown-to-applicant "Add comment to the decision (shown to applicant except if review)"
:add-comments-not-shown-to-applicant "Add comment to the decision (not shown to applicant)"
:alert-disabled-items "The following resources can't be applied anymore. Consider closing this draft and creating a new application."
:application "Application"
:back "Back to catalogue"
Expand Down
5 changes: 3 additions & 2 deletions resources/translations/fi.edn
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@
:status-changed-subject "Hakemuksen tila on muuttunut"}
:footer "CSC - IT Center for Science"
:form {:actions "Toiminnot"
:add-comments "Lisää päätökseen kommentti (näkyy hakijalle paitsi jos katselmointi)"
:add-comments-not-shown-to-applicant "Lisää päätökseen kommentti"
:add-comments "Lisää päätökseen kommentti"
:add-comments-shown-to-applicant "Lisää päätökseen kommentti (näkyy hakijalle paitsi jos katselmointi)"
:add-comments-not-shown-to-applicant "Lisää päätökseen kommentti (ei näy hakijalle)"
:alert-disabled-items "Seuraavia resursseja ei voi enää hakea. Harkitse tämän luonnoksen sulkemista ja tee sitten uusi hakemus."
:application "Tiedot"
:back "Takaisin kielivaroihin"
Expand Down
2 changes: 2 additions & 0 deletions src/clj/rems/api/schema.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
(s/optional-key :can-approve?) s/Bool
(s/optional-key :can-close?) s/Bool
(s/optional-key :can-withdraw?) s/Bool
(s/optional-key :can-third-party-review?) s/Bool
(s/optional-key :is-applicant?) s/Bool
(s/optional-key :review) (s/enum :third-party)
:catalogue-items [CatalogueItem]
(s/optional-key :review-type) (s/maybe (s/enum :normal :third-party))
Expand Down
6 changes: 5 additions & 1 deletion src/clj/rems/db/applications.clj
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@
:review-type :normal
:can-approve? false
:can-close? true
:can-withdrwa? false}
:can-withdraw? false
:can-third-party-review? false
:is-applicant? true}
:applicant-attributes {\"eppn\" \"developer\"
\"email\" \"developer@e.mail\"
\"displayName\" \"deve\"
Expand Down Expand Up @@ -390,6 +392,8 @@
:can-approve? (can-approve? application)
:can-close? (can-close? application)
:can-withdraw? (can-withdraw? application)
:can-third-party-review? (can-third-party-review? application)
:is-applicant? (is-applicant? application)
:review-type review-type)
:applicant-attributes (users/get-user-attributes (:applicantuserid application))
:items items
Expand Down
5 changes: 4 additions & 1 deletion src/cljs/rems/application.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,10 @@
:title (text :t.form/actions)
:always [:div
[:div.form-group
[:label {:for "judge-comment"} (text :t.form/add-comments)]
[:label {:for "judge-comment"}
(cond (:is-applicant? app) (text :t.form/add-comments)
(:can-third-party-review? app) (text :t.form/add-comments-not-shown-to-applicant)
:else (text :t.form/add-comments-shown-to-applicant))]
[:textarea#judge-comment.form-control
{:name "judge-comment" :placeholder "Comment"
:value @(rf/subscribe [::judge-comment])
Expand Down

0 comments on commit acacad7

Please sign in to comment.