From: Dan Scott Date: Mon, 30 Dec 2013 06:47:19 +0000 (-0500) Subject: TPAC: Display public hold notes in user holds list X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fdbs%2Ftpac_public_hold_notes;p=working%2FEvergreen.git TPAC: Display public hold notes in user holds list If a given hold has a note marked as public, and not marked for staff, then display the note in the My Account -> Holds list. This enhancement also includes sample notes for each hold, to include data that ensures that the TPAC does not display any hold notes that are not marked public, or which are marked for staff. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index a40d3768f0..9be5bff361 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -886,6 +886,13 @@ table.acct_notes th { border-collapse: collapse; } +.hold_notes { + text-transform: none; + font-weight: normal; +} + +.hold_note_title { font-weight: bold; } + #acct_checked_main_header td, #acct_holds_main_header td, #acct_checked_hist_header td, #acct_list_header td, #acct_list_header_anon td, #temp_list_holds td { background: [% css_colors.accent_lighter2 %]; padding: 10px; diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index e6ddb5a199..18eadc2fe4 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -121,6 +121,7 @@ [% l('Cancel if not filled by') %] [% l('Active') %] [% l('Status') %] + [% l('Notes') %] @@ -179,6 +180,17 @@ [% PROCESS get_hold_status hold=hold; %] + + [%- FOREACH pubnote IN ahr.notes; + IF pubnote.pub == 't'; + %] +
+ [% pubnote.title | html %] +
+ [% pubnote.body | html %] +
+ [%- END; END; %] + Edit diff --git a/Open-ILS/tests/datasets/sql/env_create.sql b/Open-ILS/tests/datasets/sql/env_create.sql index 9dedb06397..d13c27fb31 100644 --- a/Open-ILS/tests/datasets/sql/env_create.sql +++ b/Open-ILS/tests/datasets/sql/env_create.sql @@ -157,6 +157,22 @@ BEGIN frozen, thawdate ); + + -- Create hold notes for staff-placed holds: 1 public, 1 private + IF requestor != patron_id THEN + INSERT INTO action.hold_request_note (hold, title, body, pub, staff) + VALUES ( + currval('action.hold_request_id_seq'), + 'Public: Title of hold# ' || currval('action.hold_request_id_seq'), + 'Public: Hold note body for ' || currval('action.hold_request_id_seq'), + TRUE, TRUE + ), ( + currval('action.hold_request_id_seq'), + 'Private: title of hold# ' || currval('action.hold_request_id_seq'), + 'Private: Hold note body for ' || currval('action.hold_request_id_seq'), + FALSE, TRUE + ); + END IF; END; $$ LANGUAGE PLPGSQL;