From 73e9dcb70fcf24dc87af7c5af6f38102206863ae Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 31 Aug 2015 09:36:02 -0400 Subject: [PATCH] Bug 14760: Disabled courses display in the course reserves list for items MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If an item is on reserve for two courses but one of those courses is disabled, both courses are still listed on opac-detail.pl! Test Plan: 1) Enable course reserves 2) Create two courses 3) Place one item on reserve for both courses 4) Disable one of the two courses 5) View the record details for that record/item 6) You should see both courses listed in the course reserves column 7) Apply this patch 8) Reload the page 9) You should now only see the active course in the course reseves column Followed test plan. Works as expected. Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/modules/opac-detail.tt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 6799e23feb..e796c49431 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1304,14 +1304,16 @@ [% IF ITEM_RESULT.course_reserves %] [% FOREACH r IN ITEM_RESULT.course_reserves %] -

- - [% r.course.course_name %] - - [% IF r.course.section %] [% r.course.section %] [% END %] - [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %] - -

+ [% IF r.course.enabled == 'yes' %] +

+ + [% r.course.course_name %] + + [% IF r.course.section %] [% r.course.section %] [% END %] + [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) %] [% END %] + +

+ [% END %] [% END %] [% END %] -- 2.20.1