View | Details | Raw Unified | Return to bug 23772
Collapse All | Expand All

(-)a/admin/itemtypes.pl (-7 / +1 lines)
Lines 196-208 if ( $op eq 'add_form' ) { Link Here
196
}
196
}
197
197
198
if ( $op eq 'list' ) {
198
if ( $op eq 'list' ) {
199
    my @itypes = Koha::ItemTypes->search->as_list;
199
    my @itemtypes = Koha::ItemTypes->search->as_list;
200
    my @itemtypes;
201
    foreach my $itype (@itypes) {
202
        my $itemtype = $itype->unblessed;
203
        $itemtype->{branches} = $itype->library_limits ? $itype->library_limits->as_list : [];
204
        push @itemtypes, $itemtype;
205
    }
206
    $template->param(
200
    $template->param(
207
        itemtypes => \@itemtypes,
201
        itemtypes => \@itemtypes,
208
        messages  => \@messages,
202
        messages  => \@messages,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-10 / +9 lines)
Lines 414-433 Item types administration Link Here
414
            <td>[% itemtype.processfee | $Price %]</td>
414
            <td>[% itemtype.processfee | $Price %]</td>
415
            <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
415
            <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
416
            <td>
416
            <td>
417
                [% IF itemtype.branches.size > 0 %]
417
                [% IF itemtype.library_limits %]
418
                    [% branches_str = "" %]
418
                    [% libraries_str = "" %]
419
                    [% FOREACH branch IN itemtype.branches %]
419
                    [% FOREACH library IN itemtype.library_limits %]
420
                        [%- IF loop.first -%]
420
                        [%- IF loop.first -%]
421
                        [% branches_str = branch.branchname _ " (" _ branch.branchcode _ ")" %]
421
                        [% libraries_str = library.branchname _ " (" _ library.branchcode _ ")" %]
422
                        [% ELSE %]
422
                        [% ELSE %]
423
                        [% branches_str = branches_str _ "\n" _ branch.branchname _ " (" _ branch.branchcode _ ")" %]
423
                        [% libraries_str = libraries_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %]
424
                        [% END %]
424
                        [% END %]
425
                    [% END %]
425
                    [% END %]
426
                    <span class="library_limitation" title="[% branches_str | html %]">
426
                    <span class="library_limitation" title="[% libraries_str | html %]">
427
                        [% IF itemtype.branches.size > 1 %]
427
                        [% IF itemtype.library_limits.count > 1 %]
428
                            [% itemtype.branches.size | html %] library limitations
428
                            [% itemtype.library_limits.count | html %] library limitations
429
                        [% ELSE %]
429
                        [% ELSE %]
430
                            [% itemtype.branches.size | html %] library limitation
430
                            [% itemtype.library_limits.count | html %] library limitation
431
                        [% END %]
431
                        [% END %]
432
                [% ELSE %]
432
                [% ELSE %]
433
                    No limitation
433
                    No limitation
434
- 

Return to bug 23772