Bugzilla – Attachment 141034 Details for
Bug 31634
Add part_number and part_name in OPAC result browser
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31634: Add part_number and part_name in opac result browser
Bug-31634-Add-partnumber-and-partname-in-opac-resu.patch (text/plain), 6.32 KB, created by
Caroline Cyr La Rose
on 2022-09-27 15:35:47 UTC
(
hide
)
Description:
Bug 31634: Add part_number and part_name in opac result browser
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2022-09-27 15:35:47 UTC
Size:
6.32 KB
patch
obsolete
>From a4c84f221fc167efbc47d4d0d5193c67bc8a40c7 Mon Sep 17 00:00:00 2001 >From: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >Date: Tue, 27 Sep 2022 11:30:16 -0400 >Subject: [PATCH] Bug 31634: Add part_number and part_name in opac result > browser > >This patch adds the part_number and part_name in the opac results browser. > >To test: >0. Apply patch > >1. Download the sample records and import into Koha >1.1. Download the sample mrc file >1.2. In Koha staff interface, go to Tools > Stage MARC records for import >1.3. Click 'Browse' and choose the file >1.4. Click 'Upload file' >1.5. Click 'Stage for import' >1.6. Click 'Manage staged records' >1.7. Click 'Import this batch into the catalog' > >2. Make sure OpacBrowseResults is enabled >2.1. In Koha staff interface, go to Administration > Global system preferences >2.2. Search for OpacBrowseResults >2.3. If necessary, change to 'enable' and click 'Save all OPAC preferences' > >3. In OPAC, search for BFF and browse the results >3.1. In Koha OPAC, search for BFF >3.2. Click on one of the titles to access the opac-detail page >3.3. Click 'Browse results' >--> The browser should show the main title, along with the number and volume title. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 6 +++--- > opac/opac-detail.pl | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >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 816e930e70..319d584cd9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1045,7 +1045,7 @@ > [% ELSE %] > <li class="li_pag_[% loop.count | html %]"> > [% END %] >- <a href="opac-detail.pl?biblionumber=[% listitem.biblionumber | uri %]&query_desc=[% query_desc |uri %]" title="View record "[% listitem.title | html %]"" class="a_pag" id="a_pag_[% loop.count | html %]">[% loop.count + offset | html %]</a> >+ <a href="opac-detail.pl?biblionumber=[% listitem.biblionumber | uri %]&query_desc=[% query_desc |uri %]" title="View record "[% listitem.title | html %] [% listitem.part_number | html %] [% listitem.part_name | html %]"" class="a_pag" id="a_pag_[% loop.count | html %]">[% loop.count + offset | html %]</a> > </li> > [% END # /FOREACH listitem %] > </ul> <!-- /#listResults --> >@@ -1056,12 +1056,12 @@ > [% IF ( listitem.biblionumber == biblionumber ) %] > <li id="li_pag_[% loop.count | html %]" class="highlight" title="Go to detail"> > <span class="li_pag_index"><i class="fa fa-arrow-left" aria-hidden="true"></i> [% loop.count + offset | html %]</span> >- <a href="opac-detail.pl?biblionumber=[% biblionumber | uri %]&query_desc=[% query_desc |uri %]">[% title | html %]</a><br> [% IF ( author ) %]<span>by</span> [% author | html %][% END %] >+ <a href="opac-detail.pl?biblionumber=[% biblionumber | uri %]&query_desc=[% query_desc |uri %]">[% title | html %] [% part_number | html %] [% part_name | html %]</a><br> [% IF ( author ) %]<span>by</span> [% author | html %][% END %] > </li> > [% ELSE %] > <li id="li_pag_[% loop.count | html %]" title="Go to detail"> > <span class="li_pag_index">[% loop.count + offset | html %]</span> >- <a href="opac-detail.pl?biblionumber=[% listitem.biblionumber | uri %]&query_desc=[% query_desc |uri %]">[% listitem.title | html %]</a><br> [% IF ( listitem.author ) %]<span>by</span> [% listitem.author | html %][% END %] >+ <a href="opac-detail.pl?biblionumber=[% listitem.biblionumber | uri %]&query_desc=[% query_desc |uri %]">[% listitem.title | html %] [% listitem.part_number | html %] [% listitem.part_name | html %]</a><br> [% IF ( listitem.author ) %]<span>by</span> [% listitem.author | html %][% END %] > </li> > [% END # /IF listitem.biblionumber %] > [% END # /FOREACH listitem %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 5f08752a13..99c96002fb 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -480,7 +480,7 @@ if ($session->param('busc')) { > next unless ($arrBiblios[$j]); > $dataBiblioPaging = Koha::Biblios->find( $arrBiblios[$j] ) if ($arrBiblios[$j] != $biblionumber); > next unless $dataBiblioPaging; >- push @listResults, {index => $j + 1 + $offset, biblionumber => $arrBiblios[$j], title => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->title, author => ($arrBiblios[$j] != $biblionumber && $dataBiblioPaging->author)?$dataBiblioPaging->author:'', url => ($arrBiblios[$j] == $biblionumber)?'':'opac-detail.pl?biblionumber=' . $arrBiblios[$j]}; >+ push @listResults, {index => $j + 1 + $offset, biblionumber => $arrBiblios[$j], title => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->title, author => ($arrBiblios[$j] != $biblionumber && $dataBiblioPaging->author)?$dataBiblioPaging->author:'', part_number => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->part_number, part_name => ($arrBiblios[$j] == $biblionumber)?'':$dataBiblioPaging->part_name, url => ($arrBiblios[$j] == $biblionumber)?'':'opac-detail.pl?biblionumber=' . $arrBiblios[$j]}; > } > $template->param('listResults' => \@listResults) if (@listResults); > $template->param('indexPag' => 1 + $offset, 'totalPag' => $arrParamsBusc{'total'}, 'indexPagEnd' => scalar(@arrBiblios) + $offset); >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31634
:
141031
|
141032
|
141034
|
141042
|
141072
|
141073