@@ -, +, @@
images enabled.
defined.
display.
---
admin/itemtypes.pl | 8 +-------
.../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 18 +++++++++---------
2 files changed, 10 insertions(+), 16 deletions(-)
--- a/admin/itemtypes.pl
+++ a/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,
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt
@@ -414,20 +414,20 @@ Item types administration
[% itemtype.processfee | $Price %] |
[% itemtype.checkinmsg | html_line_break | $raw %] |
- [% 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 %]
-
- [% IF itemtype.branches.size > 1 %]
- [% itemtype.branches.size | html %] library limitations
+
+ [% 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
--
|