From f7ca23f62c189880164411a47bb4f69606d64f2b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Sep 2020 15:59:22 +0200 Subject: [PATCH] Bug 26323: Retrieve the correct values for LOST, DAMAGED, LOC and CCODE Same as previously --- .../catalogue/itemsearch_item.csv.inc | 2 +- .../catalogue/itemsearch_item.json.inc | 6 ++--- .../intranet-tmpl/prog/en/includes/facets.inc | 2 +- .../prog/en/includes/waiting_holds.inc | 2 +- .../prog/en/modules/catalogue/detail.tt | 2 +- .../prog/en/modules/catalogue/results.tt | 6 ++--- .../prog/en/modules/circ/article-requests.tt | 8 +++---- .../prog/en/modules/circ/branchtransfers.tt | 6 ++--- .../prog/en/modules/circ/on-site_checkouts.tt | 2 +- .../prog/en/modules/circ/pendingreserves.tt | 2 +- .../prog/en/modules/circ/reserveratios.tt | 2 +- .../prog/en/modules/circ/returns.tt | 12 +++++----- .../prog/en/modules/circ/view_holdsqueue.tt | 4 ++-- .../modules/course_reserves/course-details.tt | 22 ++++++++++--------- .../prog/en/modules/reports/itemslost.tt | 4 ++-- .../prog/en/modules/reserve/request.tt | 8 +++---- .../en/modules/serials/serials-collection.tt | 2 +- .../prog/en/modules/serials/serials-edit.tt | 2 +- .../prog/en/modules/serials/serials-search.tt | 2 +- .../modules/serials/subscription-batchedit.tt | 2 +- .../bootstrap/en/includes/item-status.inc | 6 ++--- .../bootstrap/en/includes/opac-facets.inc | 2 +- .../en/modules/opac-course-details.tt | 4 ++-- .../bootstrap/en/modules/opac-detail.tt | 2 +- .../bootstrap/en/modules/opac-reserve.tt | 2 +- .../bootstrap/en/modules/opac-topissues.tt | 2 +- 26 files changed, 60 insertions(+), 56 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc index 63aaee8874..bb625bae23 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc @@ -4,4 +4,4 @@ [%- USE AuthorisedValues -%] [%- SET biblio = item.biblio -%] [%- SET biblioitem = item.biblioitem -%] -"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% AuthorisedValues.GetDescriptionByKohaField(frameworkcode => biblio.frameworkcode, kohafield => 'items.location', authorised_value => item.location) | html %]", "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% AuthorisedValues.GetDescriptionByKohaField(frameworkcode => biblio.frameworkcode, kohafield => 'items.notforloan', authorised_value => item.notforloan) | html %]","[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) || "" | html %]","[% AuthorisedValues.GetByCode( 'WITHDRAWN', item.withdrawn ) || "" | html %]", "[% (item.issues || 0) | html %]" +"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% AuthorisedValues.GetDescriptionByKohaField(frameworkcode => biblio.frameworkcode, kohafield => 'items.location', authorised_value => item.location) | html %]", "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% AuthorisedValues.GetDescriptionByKohaField(frameworkcode => biblio.frameworkcode, kohafield => 'items.notforloan', authorised_value => item.notforloan) | html %]","[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]","[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]", "[% (item.issues || 0) | html %]" diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc index 4ff4579d13..1933950c07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -14,7 +14,7 @@ [%~ END %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html | $To %]", - "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | html %]", + "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]", "[% FILTER escape_quotes ~%] [% item.barcode | html %] [%~ END %]", @@ -25,8 +25,8 @@ "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% AuthorisedValues.GetDescriptionByKohaField( frameworkcode => biblio.frameworkcode, kohafield => 'items.notforloan', authorised_value => item.notforloan) | html %]", - "[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) || "" | html %]", - "[% AuthorisedValues.GetByCode( 'WITHDRAWN', item.withdrawn ) || "" | html %]", + "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) || "" | html %]", + "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]", "[% (item.issues || 0) | html %]", "[% FILTER escape_quotes ~%]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index 243045b24a..5650b58fbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -34,7 +34,7 @@ [% url = BLOCK %][% url | $raw %][% "&count=" _ results_per_page | url %][% END %] [% END %] [% FOREACH facet IN facets_loo.facets %] - [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,0) || facet.facet_label_value %][% END %] + [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value,0) || facet.facet_label_value %][% END %] [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %] [% IF loop.count > 5 && !facet.active %]
  • Item type: [% ItemTypes.GetDescription( errmsgloo.code ) | html %]
  • [% ELSE %] -
  • Collection: [% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) | html %]
  • +
  • Collection: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => errmsgloo.code ) | html %]
  • [% END %]
  • Originating library: [% Branches.GetName( errmsgloo.fbr ) | html %]
  • Destination library: [% Branches.GetName( errmsgloo.tbr ) | html %]
  • @@ -203,10 +203,10 @@ [% trsfitemloo.item.biblio.author | html %] [% trsfitemloo.item.barcode | html %] - [% AuthorisedValues.GetByCode( 'LOC', trsfitemloo.item.location ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => trsfitemloo.item.location ) | html %] [% trsfitemloo.item.itemcallnumber | html %] [% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %] - [% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.item.ccode ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => trsfitemloo.item.ccode ) | html %] [% Branches.GetName( trsfitemloo.frombrcd ) | html %] [% Branches.GetName( trsfitemloo.tobrcd ) | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt index 54acd980e9..38f387a6a8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.tt @@ -55,7 +55,7 @@ [% item.barcode | html %] [% Branches.GetName(item.branchcode) | html %] - [% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index 71527fc4c9..a274a3b459 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -141,7 +141,7 @@ [% FOREACH loc IN reserveloo.locations %] - [% AuthorisedValues.GetByCode('LOC', loc) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => loc) | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index 74b4b360c3..a2da1d9e68 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -76,7 +76,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 57000fe467..da146666c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -214,24 +214,26 @@ Item shelving location updated.
    Old value: [% IF errmsgloo.ItemLocationUpdated.from %] + [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.from ) %] [% IF errmsgloo.ItemLocationUpdated.from == '' %] empty - [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) == '' %] + [% ELSIF av_description == '' %] [% errmsgloo.ItemLocationUpdated.from | html %] (No description available) [% ELSE %] - [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.from ) | html %] + [% av_description | html %] [% END %] [% ELSE %] "Blank" [% END %]
    New value: [% IF errmsgloo.ItemLocationUpdated.to %] + [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.to ) %] [% IF errmsgloo.ItemLocationUpdated.to == '' %] empty - [% ELSIF AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) == '' %] + [% ELSIF av_description == '' %] [% errmsgloo.ItemLocationUpdated.to | html %] (Not an authorized value) [% ELSE %] - [% AuthorisedValues.GetByCode( 'LOC', errmsgloo.ItemLocationUpdated.to ) | html %] + [% av_description | html %] [% END %] [% ELSE %] "Blank" @@ -848,7 +850,7 @@ [% ItemTypes.GetDescription( riloo.itemtype ) | html %] - [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => riloo.ccode) | html %] [% IF ( riloo.duedate ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index 2fe8d4e813..fa7c412384 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -149,9 +149,9 @@

    - [% AuthorisedValues.GetByCode( 'CCODE', itemsloo.ccode ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemsloo.ccode ) | html %] [% ItemTypes.GetDescription( itemsloo.itype ) | html %] - [% IF ( itemsloo.location ) %][% AuthorisedValues.GetByCode( 'LOC', itemsloo.location ) | html %] [% END %][% itemsloo.itemcallnumber | html %] + [% IF ( itemsloo.location ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => 'itemsloo.location ) | html %] [% END %][% itemsloo.itemcallnumber | html %] [% itemsloo.copynumber | html %] [% itemsloo.enumchron | html %] 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 317a304a32..5d0c271fb2 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 @@ -123,42 +123,44 @@ [% END %] + [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.item.ccode %] [% IF cr.course_item.ccode_enabled %] [% IF cr.course_item.enabled == 'yes' %] - [% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %] + [% av_description | html %] [% IF cr.item.ccode %] - ([% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode_storage ) | html %]) + ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => cr.course_item.ccode_storage ) | html %]) [% END %] [% ELSE %] - [% AuthorisedValues.GetByCode( 'CCODE', cr.course_item.ccode ) | html %] + [% av_description | html %] [% IF cr.item.ccode %] - ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]) + ([% av_description | html %]) [% END %] [% END %] [% ELSE %] Unchanged [% IF cr.item.ccode %] - ([% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) | html %]) + ([% av_description | html %]) [% END %] [% END %] + [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.item.permanent_location %] [% IF cr.course_item.location_enabled %] [% IF cr.course_item.enabled == 'yes' %] - [% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %] + [% av_description | html %] [% IF cr.item.permanent_location %] - ([% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location_storage ) | html %]) + ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => cr.course_item.location_storage ) | html %]) [% END %] [% ELSE %] - [% AuthorisedValues.GetByCode( 'LOC', cr.course_item.location ) | html %] + [% av_description | html %] [% IF cr.item.permanent_location %] - ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]) + ([% av_description | html %]) [% END %] [% END %] [% ELSE %] Unchanged [% IF cr.item.permanent_location %] - ([% AuthorisedValues.GetByCode( 'LOC', cr.item.permanent_location ) | html %]) + ([% av_description | html %]) [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt index 5e89226773..6b1abc4436 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt @@ -105,9 +105,9 @@ [% item.replacementprice | $Price %] [% Branches.GetName(item.homebranch) | html %] [% ItemTypes.GetDescription(item.effective_itemtype) | html %] - [% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %] [% Branches.GetName(item.holdingbranch) | html %] - [% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %] [% item.itemnotes | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 802a69a3a5..8e3f4f5dc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -609,7 +609,7 @@ [% IF itemdata_ccode %] - [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %] + [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %] [% END %] @@ -665,15 +665,15 @@ [% END %] [% IF ( itemloo.itemlost ) %] - [% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %] [% END %] [% IF ( itemloo.damaged ) %] - [% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %] [% END %] [% IF ( itemloo.withdrawn ) %] - [% AuthorisedValues.GetByCode( 'WITHDRAWN', itemloo.withdrawn ) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %] [% END %] [% IF ( itemloo.notforloan ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index a67be01377..6f5bcdb0eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -26,7 +26,7 @@ [% INCLUDE 'serials-toolbar.inc' %]

    Serial collection information for [% bibliotitle | html %] - [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %] + [% IF location %] ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]) [% END %] [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]

    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index bcad4da652..c1a151ea1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -93,7 +93,7 @@ $(document).ready(function() { [% INCLUDE 'modals/serials_multi_receiving.inc' %]

    Serial edition [% bibliotitle | html %] - [% IF location %] ([% AuthorisedValues.GetByCode('LOC', location) | html %])[% END %] + [% IF location %] ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location) | html %])[% END %] [% IF ( callnumber ) %] callnumber: [% callnumber | html %][% END %]

    [% IF internalnotes %]

    Nonpublic note: [% internalnotes | html | html_line_break %]

    [% END %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 32af0cc5f7..cafe629cca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -109,7 +109,7 @@ [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %] - [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) | html %][% END %] + [% IF ( subscription.location ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %][% END %] [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt index 327e08f7ba..d48809a3d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt @@ -50,7 +50,7 @@ [% subscription.biblio.biblioitem.issn | html %] [% subscription.biblio.title | html %] (#[% subscription.subscriptionid | html %]) [% subscription.vendor.name | html %] - [% AuthorisedValues.GetByCode('LOC', subscription.location) | html %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %] [% Branches.GetName(subscription.branchcode) | html %] [% ItemTypes.GetDescription( subscription.itemtype ) | html %] [% subscription.notes | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc index c15566a7be..7ee2303d80 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc @@ -8,7 +8,7 @@ [% IF ( item.itemlost ) %] [% SET itemavailable = 0 %] - [% av_lib_include = AuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %] + [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost, opac => 1 ) %] [% IF ( av_lib_include ) %] [% av_lib_include | html %] [% ELSE %] @@ -53,7 +53,7 @@ [% IF ( item.withdrawn ) %] [% SET itemavailable = 0 %] - [% av_lib_include = AuthorisedValues.GetByCode( 'WITHDRAWN', item.withdrawn, 1 ) %] + [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn, opac => 1 ) %] [% IF av_lib_include %] [% av_lib_include | html %] [% ELSE %] @@ -76,7 +76,7 @@ [% IF ( item.damaged ) %] [% SET itemavailable = 0 %] - [% av_lib_include = AuthorisedValues.GetByCode( 'DAMAGED', item.damaged, 1 ) %] + [% av_lib_include = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged, opac => 1 ) %] [% IF av_lib_include %] [% av_lib_include | html %] [% ELSE %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index ddcc3a4b69..0ff8f06782 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -43,7 +43,7 @@ [% url = BLOCK %][% url | $raw %][% "&count=" _ results_per_page | url %][% END %] [% END %] [% FOREACH facet IN facets_loo.facets %] - [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetByCode('CCODE',facet.facet_label_value,1) || facet.facet_label_value %][% END %] + [% IF facets_loo.type_label_CollectionCodes %][% SET facet.facet_label_value = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => facet.facet_label_value, opac =>1 ) || facet.facet_label_value %][% END %] [% IF facets_loo.type_label_Language %][% SET facet.facet_label_value = Languages.GetByISOCode(lang,facet.facet_label_value) || facet.facet_label_value %][% END %] [% IF loop.count > 5 && !facet.active %]