From 62508428cdf3a4c3da975ef5f88c8ece9cf50537 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 6 Jun 2016 11:28:39 -0400 Subject: [PATCH] Bug 16651: Notes field blank for 952$z in opac-course-details.pl This patch changes course reserves to check for item notes form the course reserve and fallback to itemlevel notes if they are empty To test: 1 - Enabvle course reserves 2 - Add some items 3 - Make sure the items have notes at the item level and not at course reserves 4 - Notes don't display in staff or opac 5 - Apply patch 6 - Notes display in staff and opac 7 - Add notes at course reserves level 8 - These override the item level notes Signed-off-by: Hector Castro Works as advertised Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- .../en/modules/course_reserves/course-details.tt | 14 ++++++++++++-- .../bootstrap/en/modules/opac-course-details.tt | 7 ++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index d90c32fa9b..0bd675baad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -151,8 +151,18 @@ [% END %] [% END %] - [% cr.staff_note %] - [% cr.public_note %] + [% IF (cr.staff_note) %] + [% cr.staff_note %] + [% ELSIF (cr.item.itemnotes_nonpublic) %] + [% cr.item.itemnotes_nonpublic %] + [% END %] + + [% IF (cr.public_note) %] + [% cr.public_note %] + [% ELSIF (cr.item.itemnotes) %] + [% cr.item.itemnotes %] + [% END %] + [% IF CAN_user_coursereserves_add_reserves %] Edit diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index 3241c3c539..70d45b1b55 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -72,7 +72,12 @@ [% cr.item.copynumber %] [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %] [% cr.issue.date_due | $KohaDates as_due_date => 1 %] - [% cr.public_note %] + [% IF ( cr.public_note ) %] + [% cr.public_note %] + [% ELSIF ( cr.item.itemnotes ) %] + [% cr.item.itemnotes %] + [% END %] + [% END %] -- 2.39.5