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

(-)a/admin/itemtypes.pl (-2 / +8 lines)
Lines 196-204 if ( $op eq 'add_form' ) { Link Here
196
}
196
}
197
197
198
if ( $op eq 'list' ) {
198
if ( $op eq 'list' ) {
199
    my $itemtypes = Koha::ItemTypes->search;
199
    my @itypes = 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
    }
200
    $template->param(
206
    $template->param(
201
        itemtypes => $itemtypes,
207
        itemtypes => \@itemtypes,
202
        messages  => \@messages,
208
        messages  => \@messages,
203
    );
209
    );
204
}
210
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-1 / +17 lines)
Lines 359-364 Item types administration Link Here
359
            <th>Default replacement cost</th>
359
            <th>Default replacement cost</th>
360
            <th>Processing fee (when lost)</th>
360
            <th>Processing fee (when lost)</th>
361
            <th>Checkin message</th>
361
            <th>Checkin message</th>
362
            <th>Branches limitations</th>
362
            <th>Actions</th>
363
            <th>Actions</th>
363
          </thead>
364
          </thead>
364
          [% FOREACH itemtype IN itemtypes %]
365
          [% FOREACH itemtype IN itemtypes %]
Lines 411-416 Item types administration Link Here
411
            <td>[% itemtype.defaultreplacecost | $Price %]</td>
412
            <td>[% itemtype.defaultreplacecost | $Price %]</td>
412
            <td>[% itemtype.processfee | $Price %]</td>
413
            <td>[% itemtype.processfee | $Price %]</td>
413
            <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
414
            <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
415
            <td>
416
                [% IF itemtype.branches.size > 0 %]
417
                    [% branches_str = "" %]
418
                    [% FOREACH branch IN itemtype.branches %]
419
                        [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
420
                    [% END %]
421
                    <span href="#" title="[% branches_str | html %]">
422
                        [% IF itemtype.branches.size > 1 %]
423
                            [% itemtype.branches.size | html %] branches limitations
424
                        [% ELSE %]
425
                            [% itemtype.branches.size | html %] branch limitation
426
                        [% END %]
427
                [% ELSE %]
428
                    No limitation
429
                [% END %]
430
            </td>
414
            <td class="actions">
431
            <td class="actions">
415
              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
432
              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
416
              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
433
              <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
417
- 

Return to bug 23602