Bugzilla – Attachment 94035 Details for
Bug 23772
Itemtype icons not showing in table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23772: Revert to passing itemtype objects to the template
Bug-23772-Revert-to-passing-itemtype-objects-to-th.patch (text/plain), 3.87 KB, created by
Katrin Fischer
on 2019-10-12 10:31:17 UTC
(
hide
)
Description:
Bug 23772: Revert to passing itemtype objects to the template
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-10-12 10:31:17 UTC
Size:
3.87 KB
patch
obsolete
>From 9e182aa052ba38d95b8530118db89d0ee81a37e0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 11 Oct 2019 13:36:54 +0100 >Subject: [PATCH] Bug 23772: Revert to passing itemtype objects to the template > >This patch restores the methodology prior to bug 23602 of passing the >full Koha::ItemType objects to the template and thus giving us the >ability to use all the methods present within them. > >Test plan: >1) Ensure you have at least one itemtype with an assigned icon and the > images enabled. >2) View the itemtypes admin page and note the icons display again >3) Ensure you have at least one itemtype with library limitations > defined. >4) View the itemtypes admin page and note the library limitations still > display. >5) Signoff > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > admin/itemtypes.pl | 8 +------- > .../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 18 +++++++++--------- > 2 files changed, 10 insertions(+), 16 deletions(-) > >diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl >index 05f394e053..8a341b6e11 100755 >--- a/admin/itemtypes.pl >+++ b/admin/itemtypes.pl >@@ -196,13 +196,7 @@ if ( $op eq 'add_form' ) { > } > > if ( $op eq 'list' ) { >- my @itypes = Koha::ItemTypes->search->as_list; >- my @itemtypes; >- foreach my $itype (@itypes) { >- my $itemtype = $itype->unblessed; >- $itemtype->{branches} = $itype->library_limits ? $itype->library_limits->as_list : []; >- push @itemtypes, $itemtype; >- } >+ my @itemtypes = Koha::ItemTypes->search->as_list; > $template->param( > itemtypes => \@itemtypes, > messages => \@messages, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >index 2330e84779..2f8c8986aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -414,20 +414,20 @@ Item types administration > <td>[% itemtype.processfee | $Price %]</td> > <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td> > <td> >- [% IF itemtype.branches.size > 0 %] >- [% branches_str = "" %] >- [% FOREACH branch IN itemtype.branches %] >+ [% IF itemtype.library_limits %] >+ [% libraries_str = "" %] >+ [% FOREACH library IN itemtype.library_limits %] > [%- IF loop.first -%] >- [% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %] >+ [% libraries_str = library.branchname _ " (" _ library.branchcode _ ")" %] > [% ELSE %] >- [% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %] >+ [% libraries_str = libraries_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %] > [% END %] > [% END %] >- <span class="library_limitation" title="[% branches_str | html %]"> >- [% IF itemtype.branches.size > 1 %] >- [% itemtype.branches.size | html %] library limitations >+ <span class="library_limitation" title="[% libraries_str | html %]"> >+ [% IF itemtype.library_limits.count > 1 %] >+ [% itemtype.library_limits.count | html %] library limitations > [% ELSE %] >- [% itemtype.branches.size | html %] library limitation >+ [% itemtype.library_limits.count | html %] library limitation > [% END %] > [% ELSE %] > No limitation >-- >2.11.0
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 23772
:
94011
|
94016
| 94035