Bugzilla – Attachment 135641 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: catalogue/detail
Bug-27272-cataloguedetail.patch (text/plain), 4.34 KB, created by
Jonathan Druart
on 2022-06-03 06:49:11 UTC
(
hide
)
Description:
Bug 27272: catalogue/detail
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-03 06:49:11 UTC
Size:
4.34 KB
patch
obsolete
>From 0e8eaa8475f20df5d275610259417a21c0d4ef1a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Jun 2022 11:26:31 +0200 >Subject: [PATCH] Bug 27272: catalogue/detail > >--- > catalogue/detail.pl | 19 +++++++++++++++---- > .../prog/en/modules/catalogue/detail.tt | 11 ++++++----- > 2 files changed, 21 insertions(+), 9 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index ab44b85fd6a..2d1ae500069 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -160,9 +160,19 @@ $template->param( > > my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } }; > >-my $dbh = C4::Context->dbh; >- >-my $all_items = $biblio->items; >+my $all_items = $biblio->items( >+ {}, >+ { >+ # FIXME A different order is expected if at least one items.serial is true >+ order_by => [ >+ 'homebranch.branchname', >+ 'me.enumchron', >+ \"LDAP( me.copynumber, 8, '0' )", >+ -asc => 'me.dateacessioned' >+ ], >+ join => ['homebranch'] >+ } >+); > my @items; > my $patron = Koha::Patrons->find( $borrowernumber ); > while ( my $item = $all_items->next ) { >@@ -351,7 +361,7 @@ foreach my $item (@items) { > # FIXME The following must be Koha::Item->serial > my $serial_item = Koha::Serial::Items->find($item->itemnumber); > if ( $serial_item ) { >- $item_info->{serial} = $serial_item->serialid; # FIXME Not returning a Koha::Object! >+ $item_info->{serial} = $serial_item; > $itemfields{publisheddate} = 1; > } > >@@ -425,6 +435,7 @@ foreach my $item (@items) { > if ( not C4::Context->IsSuperLibrarian() > and $userenv->{branch} ne $item->homebranch ) { > $item_info->{cannot_be_edited} = 1; >+ $item_info->{not_same_branch} = 1; > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 8fde562c867..067cb17ca8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -445,7 +445,7 @@ Note that permanent location is a code, and location may be an authval. > [% ELSE %] > <span class="datedue">Checked out > [% END %] >- [% UNLESS ( item.NOTSAMEBRANCH ) %] >+ [% UNLESS ( item.not_same_branch) %] > [% IF item.checkout.onsite_checkout %] > by > [% ELSE %] >@@ -495,10 +495,11 @@ Note that permanent location is a code, and location may be an authval. > [% END %] > [% END %] > >- [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %] >+ [% IF ( item.notforloan || item.itemtype.notforloan ) %] > <span class="notforloan">Not for loan >- [% IF ( item.notforloanvalue ) %] >- <span class="reason">([% item.notforloanvalue | html %])</span> >+ [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] >+ [% IF not_for_loan_description %] >+ <span class="reason">([% not_for_loan_description | html %])</span> > [% END %] > </span> > [% END %] >@@ -529,7 +530,7 @@ Note that permanent location is a code, and location may be an authval. > [% END %] > > [% IF ( item.restricted ) %] >- <span class="restricted">([% item.restrictedvalue | html %])</span> >+ <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span> > [% END %] > </td> > <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td> >-- >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 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