From 3323a428eaf662a0ba1a31b2cb56002a7372461a 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 --- .../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 8 ++++---- .../bootstrap/en/modules/opac-course-reserves.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- 3 files changed, 7 insertions(+), 7 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 1e90cf88a9..c286ed6ca7 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 @@ -30,8 +30,8 @@

Course reserves for [% course.course_name | html %]

    - [% IF ( course.term ) %]
  1. Term: [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]
  2. [% END %] -
  3. Department: [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]
  4. + [% IF ( course.term ) %]
  5. Term: [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]
  6. [% END %] +
  7. Department: [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department, 1 ) | html %]
  8. [% IF ( course.course_number ) %]
  9. Course number: [% course.course_number | html %]
  10. [% END %] [% IF ( course.section ) %]
  11. Section: [% course.section | html %]
  12. [% END %] [% IF ( course.instructors ) %] @@ -71,8 +71,8 @@ [% 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 ) | html %] - [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | 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 %] 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 47c7fa1e22..1b97988e48 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 @@ -46,7 +46,7 @@ [% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) | html %] [% c.course_number | html %] [% c.section | html %] - [% AuthorisedValues.GetByCode( 'TERM' c.term ) | html %] + [% AuthorisedValues.GetByCode( 'TERM' c.term, 1 ) | html %] [% FOREACH i IN c.instructors %]
    [% i.surname | html %][% IF i.firstname %], [% i.firstname | html %][% 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 3c5a40c8fa..7a4ca78f22 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -811,7 +811,7 @@

    This subscription is closed.

    [% END %] [% IF ( subscription.location ) %] -

    Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location ) | html %] +

    Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location, 1 ) | html %] [% END %] [% IF ( subscription.callnumber ) %]

    Call number: [% subscription.callnumber | html %]

    @@ -1368,7 +1368,7 @@ [% r.course.course_name | html %] [% IF r.course.section %] [% r.course.section | html %] [% END %] - [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term ) | html %] [% END %] + [% IF r.course.term %] [% AuthorisedValues.GetByCode( 'TERM', r.course.term, 1 ) | html %] [% END %]

    [% END %] -- 2.39.5