Bugzilla – Attachment 138615 Details for
Bug 27272
Move C4::Items::GetItemsInfo to Koha namespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27272: Remove GetItemsInfo from basket/basket
Bug-27272-Remove-GetItemsInfo-from-basketbasket.patch (text/plain), 5.39 KB, created by
Victor Grousset/tuxayo
on 2022-08-05 02:13:21 UTC
(
hide
)
Description:
Bug 27272: Remove GetItemsInfo from basket/basket
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2022-08-05 02:13:21 UTC
Size:
5.39 KB
patch
obsolete
>From c5fdc7d30f24876591023a53d81035cf36c4acef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Jun 2022 11:31:38 +0200 >Subject: [PATCH] Bug 27272: Remove GetItemsInfo from basket/basket > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > basket/basket.pl | 24 ++++++------------- > .../prog/en/modules/basket/basket.tt | 16 +++++++++---- > 2 files changed, 18 insertions(+), 22 deletions(-) > >diff --git a/basket/basket.pl b/basket/basket.pl >index 6f93e5a82b..12526138d1 100755 >--- a/basket/basket.pl >+++ b/basket/basket.pl >@@ -24,7 +24,6 @@ use C4::Biblio qw( > GetMarcSubjects > GetMarcUrls > ); >-use C4::Items qw( GetItemsInfo ); > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); > >@@ -72,26 +71,17 @@ foreach my $biblionumber ( @bibs ) { > my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); > my $marcseriesarray = GetMarcSeries ($record,$marcflavour); > my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >- my @items = GetItemsInfo( $biblionumber ); > > my $hasauthors = 0; > if($dat->{'author'} || @$marcauthorsarray) { > $hasauthors = 1; > } >- >- my $shelflocations = >- { map { $_->{authorised_value} => $_->{lib} } Koha::AuthorisedValues->get_descriptions_by_koha_field( { frameworkcode => $dat->{frameworkcode}, kohafield => 'items.location' } ) }; >- >- for my $itm (@items) { >- if ($itm->{'location'}){ >- $itm->{'location_description'} = $shelflocations->{$itm->{'location'} }; >- } >- } >- # COinS format FIXME: for books Only >- my $fmt = substr $record->leader(), 6,2; >- my $fmts; >- $fmts->{'am'} = 'book'; >- $dat->{ocoins_format} = $fmts->{$fmt}; >+ >+ # COinS format FIXME: for books Only >+ my $fmt = substr $record->leader(), 6,2; >+ my $fmts; >+ $fmts->{'am'} = 'book'; >+ $dat->{ocoins_format} = $fmts->{$fmt}; > > if ( $num % 2 == 1 ) { > $dat->{'even'} = 1; >@@ -99,7 +89,7 @@ foreach my $biblionumber ( @bibs ) { > > $num++; > $dat->{biblionumber} = $biblionumber; >- $dat->{ITEM_RESULTS} = \@items; >+ $dat->{ITEM_RESULTS} = $biblio->items; > $dat->{MARCNOTES} = $marcnotesarray; > $dat->{MARCSUBJCTS} = $marcsubjctsarray; > $dat->{MARCAUTHORS} = $marcauthorsarray; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >index 5c62dad4f1..86cce455c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt >@@ -1,5 +1,7 @@ > [% USE raw %] > [% USE Asset %] >+[% USE AuthorisedValues %] >+[% USE Branches %] > [% SET footerjs = 1 %] > [% BLOCK controls %] > <p class="cart-controls"> >@@ -220,11 +222,13 @@ > <tr> > <th scope="row">Location(s)</th> > <td> >- [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %] >+ [% IF BIBLIO_RESULT.ITEM_RESULTS %] > [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %] > <p> >- [% ITEM_RESULT.branchname | html %] >- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span> >+ [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %] >+ <span class="shelvingloc"> >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %] >+ </span> > [% IF ( ITEM_RESULT.itemcallnumber ) %] > ([% ITEM_RESULT.itemcallnumber | html %]) > [% END %] >@@ -293,8 +297,10 @@ > <strong> > <span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span> > </strong> >- [% ITEM_RESULT.branchname | html %] >- <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span> >+ [% Branches.GetName(ITEM_RESULT.holdingbranch) | html %] >+ <span class="shelvingloc"> >+ [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => ITEM_RESULT.location ) | html %] >+ </span> > </span> > </div> > [% END %] >-- >2.37.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 27272
:
128230
|
128231
|
135640
|
135641
|
135642
|
135643
|
135644
|
135645
|
135646
|
135647
|
135648
|
135649
|
135650
|
135651
|
135652
|
135653
|
135654
|
135655
|
135656
|
135657
|
135658
|
135659
|
137966
|
137967
|
137968
|
137969
|
137970
|
137971
|
137972
|
137973
|
137974
|
137975
|
137976
|
137977
|
137978
|
137979
|
137980
|
137981
|
137982
|
138109
|
138296
|
138297
|
138298
|
138303
|
138304
|
138305
|
138306
|
138307
|
138308
|
138437
|
138438
|
138439
|
138440
|
138441
|
138442
|
138553
|
138554
|
138555
|
138556
|
138557
|
138558
|
138559
|
138560
|
138561
|
138562
|
138563
|
138564
|
138565
|
138566
|
138567
|
138568
|
138569
|
138570
|
138571
|
138572
|
138573
|
138574
|
138575
|
138614
|
138615
|
138616
|
138617
|
138618
|
138619
|
138620
|
138621
|
138622
|
138623
|
138624
|
138625
|
138626
|
138627
|
138628
|
138629
|
138630
|
138631
|
138632
|
138633
|
138634
|
138635
|
138636
|
138714
|
138715
|
138716
|
138717
|
138718
|
138719
|
138720
|
138721
|
138722
|
138723
|
138724
|
138725
|
138726
|
138727
|
138728
|
138729
|
138730
|
138731
|
138732
|
138733
|
138734
|
138735
|
138736
|
138773
|
138774
|
138775
|
138776
|
138777
|
138778
|
138779
|
138780
|
138781
|
138782
|
138783
|
138784
|
138785
|
138786
|
138787
|
138788
|
138789
|
138790
|
138791
|
138792
|
138793
|
138794
|
138832
|
139928