From 531ee472234942f1c63ab10745551af8e3eddbf8 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 1 Apr 2019 19:15:18 +0000 Subject: [PATCH] Bug 22624: Show OPAC description for authorised values in OPAC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch adds the IS_OPAC parameter to a few GetByCode calls in OPAC files. To test: - Add different OPAC and intranet descriptions to some authorised value categories: - TERM - DEPARTMENT - LOC - CCODE - Create a new course using the values and adding items to it - Check the course reserves overview and detail pages in OPAC - Verify Department, term, location, and collection show the OPAC description if existing - Create a subscription, make sure a default location is selected - Check the OPAC detail page, subscription tab for this subsription in the OPAC - Verify the location of the subscription displays correctly Signed-off-by: Mikaël Olangcay Brisebois Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 3323a428eaf662a0ba1a31b2cb56002a7372461a) Signed-off-by: Martin Renvoize (cherry picked from commit 764260ded4f350904c548422defb74d32581f65e) Signed-off-by: Lucas Gass --- .../en/modules/opac-course-details.tt | 22 +++++++++---------- .../en/modules/opac-course-reserves.tt | 10 ++++----- .../bootstrap/en/modules/opac-detail.tt | 10 ++++----- 3 files changed, 21 insertions(+), 21 deletions(-) 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 f0f605b4e2..6047d1aeea 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 @@ -29,10 +29,10 @@

Course reserves for [% course.course_name %]

    - [% IF ( course.term ) %]
  1. Term: [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]
  2. [% END %] -
  3. Department: [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]
  4. - [% IF ( course.course_number ) %]
  5. Course number: [% course.course_number %]
  6. [% END %] - [% IF ( course.section ) %]
  7. Section: [% course.section %]
  8. [% END %] + [% IF ( course.term ) %]
  9. Term: [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]
  10. [% END %] +
  11. Department: [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department, 1 ) | html %]
  12. + [% IF ( course.course_number ) %]
  13. Course number: [% course.course_number | html %]
  14. [% END %] + [% IF ( course.section ) %]
  15. Section: [% course.section | html %]
  16. [% END %] [% IF ( course.instructors ) %]
  17. Instructors:
      @@ -67,13 +67,13 @@ [% FOREACH cr IN course_reserves %] - [% cr.biblio.title %] - [% cr.biblio.author %] - [% ItemTypes.GetDescription( cr.item.itype ) %] - [% Branches.GetName( cr.item.holdingbranch ) %]
      [% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %] - [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %] - [% cr.item.itemcallnumber %] - [% cr.item.copynumber %] + [% cr.biblio.title | html %] + [% cr.biblio.author | html %] + [% ItemTypes.GetDescription( cr.item.itype ) | html %] + [% Branches.GetName( cr.item.holdingbranch ) | html %]
      [% AuthorisedValues.GetByCode( 'LOC', cr.item.location, 1 ) | html %] + [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode, 1 ) | html %] + [% cr.item.itemcallnumber | html %] + [% cr.item.copynumber | html %] [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %] [% cr.issue.date_due | $KohaDates as_due_date => 1 %] [% IF ( cr.public_note ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt index 87bf6588d6..0bb1b16de7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt @@ -41,11 +41,11 @@ [% FOREACH c IN courses %] - [% c.course_name %] - [% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) %] - [% c.course_number %] - [% c.section %] - [% AuthorisedValues.GetByCode( 'TERM' c.term ) %] + [% c.course_name | html %] + [% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) | html %] + [% c.course_number | html %] + [% c.section | html %] + [% AuthorisedValues.GetByCode( 'TERM' c.term, 1 ) | html %] [% FOREACH i IN c.instructors %]
      [% i.surname %][% IF i.firstname %], [% i.firstname %][% END %]
      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 7ed04f64e1..68746d4769 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1331,11 +1331,11 @@ [% FOREACH r IN ITEM_RESULT.course_reserves %] [% 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 %] + + [% r.course.course_name | html %] + + [% IF r.course.section %] [% r.course.section | html %] [% END %] + [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term, 1 ) | html %] [% END %]

      [% END %] -- 2.39.5