Bugzilla – Attachment 138910 Details for
Bug 31319
Remove GetItemsInfo from tags/list.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31319: Remove GetItemsInfo from tags/list.pl
Bug-31319-Remove-GetItemsInfo-from-tagslistpl.patch (text/plain), 3.28 KB, created by
Nick Clemens (kidclamp)
on 2022-08-09 13:22:09 UTC
(
hide
)
Description:
Bug 31319: Remove GetItemsInfo from tags/list.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-08-09 13:22:09 UTC
Size:
3.28 KB
patch
obsolete
>From 6b22fc9c29885d195745264e61f83455fc545758 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 3 Jun 2022 08:29:19 +0200 >Subject: [PATCH] Bug 31319: Remove GetItemsInfo from tags/list.pl > >Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered. > >Here we are going to deal with tags/list > >Test plan: >List items on the modified view and confirm that all the info is >displayed correctly > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt | 5 +++-- > tags/list.pl | 9 ++++++--- > 2 files changed, 9 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >index cc25b9f11d..70904be156 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE AuthorisedValues %] >+[% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( do_it ) %]Review[% ELSE %]Review tags[% END %] › Tags › Tools › Koha</title> >@@ -64,9 +65,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %]</p> > [% END %] > </td> >- <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %] >+ <td>[% IF ( title.items.count ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %] > <li> >- [% item.branchname | html %] >+ [% Branches.GetName(item.holdingbranch) | html %] > <span class="shelvingloc"> > [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %] > </span> >diff --git a/tags/list.pl b/tags/list.pl >index ac2ccbc8b1..b9aec1aa19 100755 >--- a/tags/list.pl >+++ b/tags/list.pl >@@ -23,10 +23,11 @@ use CGI qw ( -utf8 ); > use C4::Auth qw( get_template_and_user ); > use C4::Biblio qw( GetBiblioData ); > use C4::Context; >-use C4::Items qw( GetItemsInfo ); > use C4::Tags qw( get_tag_rows get_tags remove_tag ); > use C4::Output qw( output_html_with_http_headers ); > >+use Koha::Biblios; >+ > my $needed_flags = { tools => 'moderate_tags' > }; # FIXME: replace when more specific permission is created. > >@@ -57,11 +58,13 @@ else { > if ($tag) { > my $taglist = get_tag_rows( { term => $tag } ); > for ( @{$taglist} ) { >+ # FIXME We should use Koha::Biblio here > my $dat = &GetBiblioData( $_->{biblionumber} ); >- my @items = GetItemsInfo( $_->{biblionumber} ); >+ my $biblio = Koha::Biblios->find($dat->{biblionumber}); >+ my $items = $biblio->items->search_ordered; > $dat->{biblionumber} = $_->{biblionumber}; > $dat->{tag_id} = $_->{tag_id}; >- $dat->{items} = \@items; >+ $dat->{items} = $items; > $dat->{TagLoop} = get_tags( > { > biblionumber => $_->{biblionumber}, >-- >2.30.2
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 31319
:
138829
|
138902
| 138910 |
138911
|
138914