Bug 22624: Show OPAC description for authorised values in OPAC
authorKatrin Fischer <katrin.fischer.83@web.de>
Mon, 1 Apr 2019 19:15:18 +0000 (19:15 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 11 Apr 2019 13:34:09 +0000 (13:34 +0000)
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 <mikael.olangcay-brisebois@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index 1e90cf8..c286ed6 100644 (file)
@@ -30,8 +30,8 @@
                 <h2>Course reserves for <i>[% course.course_name | html %]</i></h2>
                 <div class="rows">
                     <ol>
-                        [% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) | html %]</li>[% END %]
-                        <li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) | html %]</li>
+                        [% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term, 1 ) | html %]</li>[% END %]
+                        <li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department, 1 ) | html %]</li>
                         [% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number | html %]</li>[% END %]
                         [% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section | html %]</li>[% END %]
                         [% IF ( course.instructors ) %]
@@ -71,8 +71,8 @@
                                     <td><a href="opac-detail.pl?biblionumber=[% cr.biblio.biblionumber | uri %]">[% cr.biblio.title | html %]</a></td>
                                     <td>[% cr.biblio.author | html %]</td>
                                     <td>[% ItemTypes.GetDescription( cr.item.itype ) | html %]</td>
-                                    <td>[% Branches.GetName( cr.item.holdingbranch ) | html %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) | html %]</i></td>
-                                    <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]</td>
+                                    <td>[% Branches.GetName( cr.item.holdingbranch ) | html %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location, 1 ) | html %]</i></td>
+                                    <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode, 1 ) | html %]</td>
                                     <td>[% cr.item.itemcallnumber | html %]</td>
                                     <td>[% cr.item.copynumber | html %]</td>
                                     <td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
index 47c7fa1..1b97988 100644 (file)
@@ -46,7 +46,7 @@
                                     <td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', c.department, 1 ) | html %]</td>
                                     <td>[% c.course_number | html %]</td>
                                     <td>[% c.section | html %]</td>
-                                    <td>[% AuthorisedValues.GetByCode( 'TERM' c.term ) | html %]</td>
+                                    <td>[% AuthorisedValues.GetByCode( 'TERM' c.term, 1 ) | html %]</td>
                                     <td>
                                       [% FOREACH i IN c.instructors %]
                                           <div class="instructor"><span class"inst_surname">[% i.surname | html %]</span>[% IF i.firstname %]<span class="instr_separator">, </span><span class="instr_firstname">[% i.firstname | html %]</span>[% END %]</div>
index 3c5a40c..7a4ca78 100644 (file)
                                     <p class="subscription_closed">This subscription is closed.</p>
                                 [% END %]
                                 [% IF ( subscription.location ) %]
-                                  <p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location ) | html %]
+                                  <p class="subscription_location">Location: [% AuthorisedValues.GetByCode( 'LOC', subscription.location, 1 ) | html %]
                                 [% END %]
                                 [% IF ( subscription.callnumber ) %]
                                   <p class="subscription_callnumber">Call number: [% subscription.callnumber | html %]</p>
                                             [% r.course.course_name | html %]
                                             <!--[% IF r.course.course_number %] [% r.course.course_number | html %] [% END %]-->
                                             [% 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 %]
                                             </a>
                                         </p>
                                     [% END %]