From: Lucas Gass Date: Fri, 6 May 2022 21:50:05 +0000 (+0000) Subject: Bug 30716: Add collection to cn_browser results X-Git-Tag: v22.11.00~2207 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=b48ac1ef741d8e1c02290dd9d2809713f3bba23b;p=koha-ffzg.git Bug 30716: Add collection to cn_browser results To test: 1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on. 2. Pick or create an item in that framework, edit that item. 3. TO the right of the 952$o notice the "...". Click that start the call number browser. 4. Notice there is no column for collection. 5. Apply patch, restart_all 6. Notice there is now a column for with the items collection. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- diff --git a/cataloguing/value_builder/cn_browser.pl b/cataloguing/value_builder/cn_browser.pl index 8abdca75df..832ca51bf2 100755 --- a/cataloguing/value_builder/cn_browser.pl +++ b/cataloguing/value_builder/cn_browser.pl @@ -94,7 +94,7 @@ my $launcher = sub { my $green = 0; #Results before the cn_sort - $query = "SELECT b.title, b.subtitle, itemcallnumber, biblionumber, barcode, cn_sort, branchname, author + $query = "SELECT b.title, b.subtitle, itemcallnumber, biblionumber, barcode, cn_sort, branchname, author, ccode FROM items AS i JOIN biblio AS b USING (biblionumber) LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) @@ -124,7 +124,7 @@ my $launcher = sub { my $green = 0; #Results after the cn_sort - $query = "SELECT b.title, b.subtitle, itemcallnumber, biblionumber, barcode, cn_sort, branchname, author + $query = "SELECT b.title, b.subtitle, itemcallnumber, biblionumber, barcode, cn_sort, branchname, author, ccode FROM items AS i JOIN biblio AS b USING (biblionumber) LEFT OUTER JOIN branches ON (branches.branchcode = homebranch) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt index c480e095ee..dc239e2624 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/cn_browser.tt @@ -1,4 +1,5 @@ [% USE Asset %] +[% USE AuthorisedValues %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Call number browser › Cataloging › Koha @@ -41,6 +42,7 @@ Call number Title Library + Collection [% FOREACH cn_loo IN cn_loop %] @@ -56,6 +58,7 @@ [% cn_loo.branchname | html %] + [% AuthorisedValues.GetByCode( 'CCODE', cn_loo.ccode ) | html %] [% END %]