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

(-)a/Koha/UI/Table/Builder/Items.pm (-1 / +4 lines)
Lines 19-24 use Modern::Perl; Link Here
19
use List::MoreUtils qw( uniq );
19
use List::MoreUtils qw( uniq );
20
use C4::Biblio qw( GetMarcStructure GetMarcFromKohaField IsMarcStructureInternal );
20
use C4::Biblio qw( GetMarcStructure GetMarcFromKohaField IsMarcStructureInternal );
21
use Koha::Items;
21
use Koha::Items;
22
use List::MoreUtils qw(first_index);
22
23
23
=head1 NAME
24
=head1 NAME
24
25
Lines 71-84 Use it with: Link Here
71
72
72
sub build_table {
73
sub build_table {
73
    my ( $self, $params ) = @_;
74
    my ( $self, $params ) = @_;
74
75
    my @itemnumbers = @{ $self->{itemnumbers} };
75
    my $items = Koha::Items->search( { itemnumber => $self->{itemnumbers} } );
76
    my $items = Koha::Items->search( { itemnumber => $self->{itemnumbers} } );
76
77
77
    my @items;
78
    my @items;
78
    while ( my $item = $items->next ) {
79
    while ( my $item = $items->next ) {
79
        my $item_info = $item->columns_to_str;
80
        my $item_info = $item->columns_to_str;
81
        my $index = first_index { $_ eq $item->itemnumber } @itemnumbers;
80
        $item_info = {
82
        $item_info = {
81
            %$item_info,
83
            %$item_info,
84
            index          => $index,
82
            biblio         => $item->biblio,
85
            biblio         => $item->biblio,
83
            safe_to_delete => $item->safe_to_delete,
86
            safe_to_delete => $item->safe_to_delete,
84
            holds          => $item->biblio->holds->count,
87
            holds          => $item->biblio->holds->count,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-1 / +2 lines)
Lines 243-248 Link Here
243
    <table id="itemst">
243
    <table id="itemst">
244
        <thead>
244
        <thead>
245
            <tr>
245
            <tr>
246
                <th></th>
246
                [% IF checkboxes_edit OR checkboxes_delete %]
247
                [% IF checkboxes_edit OR checkboxes_delete %]
247
                    <th></th>
248
                    <th></th>
248
                [% END %]
249
                [% END %]
Lines 264-269 Link Here
264
                [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %]
265
                [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %]
265
266
266
                <tr>
267
                <tr>
268
                    <td>[% item.index + 1 | html %]</td>
267
                    [% IF checkboxes_edit %]
269
                    [% IF checkboxes_edit %]
268
                        [% UNLESS can_be_edited%]
270
                        [% UNLESS can_be_edited%]
269
                            <td class="error">Cannot edit</td>
271
                            <td class="error">Cannot edit</td>
Lines 333-339 Link Here
333
                            <td>[% item.$attribute | html %]</td>
335
                            <td>[% item.$attribute | html %]</td>
334
                        [% END %]
336
                        [% END %]
335
                    [% END %]
337
                    [% END %]
336
337
                </tr>
338
                </tr>
338
            [% END # /FOREACH items %]
339
            [% END # /FOREACH items %]
339
        </tbody>
340
        </tbody>
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/batchMod.js (-2 / +2 lines)
Lines 121-127 $(document).ready(function () { Link Here
121
    $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
121
    $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, {
122
        "sDom": 't',
122
        "sDom": 't',
123
        "aoColumnDefs": [
123
        "aoColumnDefs": [
124
            { "aTargets": [0], "bSortable": false, "bSearchable": false },
124
            { "aTargets": [0, 1], "bSortable": false, "bSearchable": false },
125
            { "aTargets": [0], "bVisible": false },
125
            { "sType": "anti-the", "aTargets": ["anti-the"] }
126
            { "sType": "anti-the", "aTargets": ["anti-the"] }
126
        ],
127
        ],
127
        "bPaginate": false,
128
        "bPaginate": false,
128
- 

Return to bug 31455