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

(-)a/Koha/Item.pm (-3 / +2 lines)
Lines 295-303 sub safe_to_delete { Link Here
295
295
296
    $error //= "not_same_branch"
296
    $error //= "not_same_branch"
297
      if defined C4::Context->userenv
297
      if defined C4::Context->userenv
298
      && !C4::Context->IsSuperLibrarian()
298
      and defined C4::Context->userenv->{number}
299
      && C4::Context->preference("IndependentBranches")
299
      and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $self );
300
      && ( C4::Context->userenv->{branch} ne $self->homebranch );
301
300
302
    # check it doesn't have a waiting reserve
301
    # check it doesn't have a waiting reserve
303
    $error //= "book_reserved"
302
    $error //= "book_reserved"
(-)a/Koha/Patron.pm (-27 / +3 lines)
Lines 1496-1502 sub can_see_patrons_from { Link Here
1496
1496
1497
=head3 libraries_where_can_see_patrons
1497
=head3 libraries_where_can_see_patrons
1498
1498
1499
my $libraries = $patron-libraries_where_can_see_patrons;
1499
my $libraries = $patron->libraries_where_can_see_patrons;
1500
1500
1501
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos.
1501
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos.
1502
The branchcodes are arbitrarily returned sorted.
1502
The branchcodes are arbitrarily returned sorted.
Lines 1545-1551 sub can_edit_item { Link Here
1545
1545
1546
    return 1 if C4::Context->IsSuperLibrarian();
1546
    return 1 if C4::Context->IsSuperLibrarian();
1547
1547
1548
    if ( C4::Context->preference('IndependentBranches') ) {
1548
    if ( $userenv && C4::Context->preference('IndependentBranches') ) {
1549
        return $userenv->{branch} eq $branchcode;
1549
        return $userenv->{branch} eq $branchcode;
1550
    }
1550
    }
1551
1551
Lines 1653-1687 sub can_log_into { Link Here
1653
   return $can;
1653
   return $can;
1654
}
1654
}
1655
1655
1656
=head3 libraries_where_can_see_patrons
1657
1658
my $libraries = $patron-libraries_where_can_see_patrons;
1659
1660
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos.
1661
The branchcodes are arbitrarily returned sorted.
1662
We are supposing here that the object is related to the logged in patron (use of C4::Context::only_my_library)
1663
1664
An empty array means no restriction, the patron can see patron's infos from any libraries.
1665
1666
=cut
1667
1668
sub libraries_where_can_see_patrons {
1669
    my ($self) = @_;
1670
1671
    return $self->libraries_where_can_see_things(
1672
        {
1673
            permission    => 'borrowers',
1674
            subpermission => 'view_borrower_infos_from_any_libraries',
1675
            group_feature => 'ft_hide_patron_info',
1676
        }
1677
    );
1678
}
1679
1680
=head3 libraries_where_can_see_things
1656
=head3 libraries_where_can_see_things
1681
1657
1682
my $libraries = $thing-libraries_where_can_see_things;
1658
my $libraries = $thing-libraries_where_can_see_things;
1683
1659
1684
Returns a list of libraries where an aribitarary action is allowd to be taken by the logged in librarian
1660
Returns a list of libraries where an aribitarary action is allowed to be taken by the logged in librarian
1685
against an object based on some branchcode related to the object ( patron branchcode, item homebranch, etc ).
1661
against an object based on some branchcode related to the object ( patron branchcode, item homebranch, etc ).
1686
1662
1687
We are supposing here that the object is related to the logged in librarian (use of C4::Context::only_my_library)
1663
We are supposing here that the object is related to the logged in librarian (use of C4::Context::only_my_library)
(-)a/Koha/UI/Table/Builder/Items.pm (+5 lines)
Lines 71-77 Use it with: Link Here
71
71
72
sub build_table {
72
sub build_table {
73
    my ( $self, $params ) = @_;
73
    my ( $self, $params ) = @_;
74
75
    my $patron = $params->{patron};
76
74
    my %itemnumbers_to_idx = map { $self->{itemnumbers}->[$_] => $_ } 0..$#{$self->{itemnumbers}};
77
    my %itemnumbers_to_idx = map { $self->{itemnumbers}->[$_] => $_ } 0..$#{$self->{itemnumbers}};
78
75
    my $items = Koha::Items->search( { itemnumber => $self->{itemnumbers} } );
79
    my $items = Koha::Items->search( { itemnumber => $self->{itemnumbers} } );
76
80
77
    my @items;
81
    my @items;
Lines 85-90 sub build_table { Link Here
85
            holds          => $item->biblio->holds->count,
89
            holds          => $item->biblio->holds->count,
86
            item_holds     => $item->holds->count,
90
            item_holds     => $item->holds->count,
87
            is_checked_out => $item->checkout ? 1 : 0,
91
            is_checked_out => $item->checkout ? 1 : 0,
92
            nomod          => $patron ? !$patron->can_edit_item($item) : 0,
88
        };
93
        };
89
        push @items, $item_info;
94
        push @items, $item_info;
90
    }
95
    }
(-)a/catalogue/detail.pl (+2 lines)
Lines 442-447 foreach my $item (@items) { Link Here
442
        $item_info->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->itemnumber );
442
        $item_info->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->itemnumber );
443
    }
443
    }
444
444
445
    $item->{can_be_edited} = $patron->can_edit_item( $item );
446
445
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
447
    if ( C4::Context->preference("LocalCoverImages") == 1 ) {
446
        $item_info->{cover_images} = $item->cover_images;
448
        $item_info->{cover_images} = $item->cover_images;
447
    }
449
    }
(-)a/catalogue/itemsearch.pl (-3 / +4 lines)
Lines 251-260 if ( defined $format ) { Link Here
251
    }
251
    }
252
252
253
    $template->param(
253
    $template->param(
254
        filter => $filter,
254
        filter        => $filter,
255
        search_params => $search_params,
255
        search_params => $search_params,
256
        results => $results,
256
        results       => $results,
257
        total_rows => $total_rows,
257
        total_rows    => $total_rows,
258
        user          => Koha::Patrons->find( $borrowernumber ),
258
    );
259
    );
259
260
260
    if ($format eq 'csv') {
261
    if ($format eq 'csv') {
(-)a/catalogue/moredetail.pl (+2 lines)
Lines 247-252 foreach my $item (@items){ Link Here
247
        }
247
        }
248
    );
248
    );
249
249
250
    $item_data->{nomod} = !$patron->can_edit_item( $item );
251
250
    push @item_data, $item_info;
252
    push @item_data, $item_info;
251
}
253
}
252
254
(-)a/cataloguing/additem.pl (-2 / +12 lines)
Lines 158-164 my ($template, $loggedinuser, $cookie) Link Here
158
158
159
159
160
# Does the user have a restricted item editing permission?
160
# Does the user have a restricted item editing permission?
161
my $uid = Koha::Patrons->find( $loggedinuser )->userid;
161
my $patron = Koha::Patrons->find( $loggedinuser );
162
163
my $item = $itemnumber ? Koha::Items->find( $itemnumber ) : undef;
164
if ( $item && !$patron->can_edit_item( $item ) ) {
165
    print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber");
166
    exit;
167
}
168
169
my $uid = $patron->userid;
162
my $restrictededition = $uid ? haspermission($uid,  {'editcatalogue' => 'edit_items_restricted'}) : undef;
170
my $restrictededition = $uid ? haspermission($uid,  {'editcatalogue' => 'edit_items_restricted'}) : undef;
163
# In case user is a superlibrarian, editing is not restricted
171
# In case user is a superlibrarian, editing is not restricted
164
$restrictededition = 0 if ($restrictededition != 0 &&  C4::Context->IsSuperLibrarian());
172
$restrictededition = 0 if ($restrictededition != 0 &&  C4::Context->IsSuperLibrarian());
Lines 626-632 if ($op) { Link Here
626
634
627
my @items;
635
my @items;
628
for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) {
636
for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) {
629
    push @items, $item->columns_to_str;
637
    my $i = $item->columns_to_str;
638
    $i->{nomod} = 1 unless $patron->can_edit_item($item);
639
    push @items, $i;
630
}
640
}
631
641
632
my @witness_attributes = uniq map {
642
my @witness_attributes = uniq map {
(-)a/course_reserves/course-details.pl (+1 lines)
Lines 66-71 my $course_reserves = GetCourseReserves( Link Here
66
$template->param(
66
$template->param(
67
    course          => $course,
67
    course          => $course,
68
    course_reserves => $course_reserves,
68
    course_reserves => $course_reserves,
69
    user            => Koha::Patrons->find( $loggedinuser ),
69
);
70
);
70
71
71
output_html_with_http_headers $cgi, $cookie, $template->output;
72
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc (-1 / +1 lines)
Lines 32-37 Link Here
32
  "[% (item.issues || 0) | html %]",
32
  "[% (item.issues || 0) | html %]",
33
  "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]",
33
  "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]",
34
  "[% FILTER escape_quotes ~%]
34
  "[% FILTER escape_quotes ~%]
35
    <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> <li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li> <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>
35
    <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> [% IF user.can_edit_item( item ) %]<li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li>[% END %] <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>
36
  [%~ END %]"
36
  [%~ END %]"
37
]
37
]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-1 / +1 lines)
Lines 262-268 Link Here
262
        </thead>
262
        </thead>
263
        <tbody>
263
        <tbody>
264
            [% FOREACH item IN items %]
264
            [% FOREACH item IN items %]
265
                [% SET can_be_edited = ! ( Koha.Preference('IndependentBranches') && ! logged_in_user.is_superlibrarian && item.homebranch != Branches.GetLoggedInBranchname() ) %]
265
                [% SET can_be_edited = !item.nomod && !( Koha.Preference('IndependentBranches') && ! logged_in_user && item.homebranch != Branches.GetLoggedInBranchname() ) %]
266
266
267
                <tr>
267
                <tr>
268
                    <td>[% item.index + 1 | html %]</td>
268
                    <td>[% item.index + 1 | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-2 / +2 lines)
Lines 343-354 Link Here
343
        <span class="permissioncode">([% name | html %])</span>
343
        <span class="permissioncode">([% name | html %])</span>
344
    [%- CASE 'edit_items' -%]
344
    [%- CASE 'edit_items' -%]
345
        <span class="sub_permission edit_items_subpermission">
345
        <span class="sub_permission edit_items_subpermission">
346
            Edit items
346
            Edit items (not including items restricted by library group)
347
        </span>
347
        </span>
348
        <span class="permissioncode">([% name | html %])</span>
348
        <span class="permissioncode">([% name | html %])</span>
349
    [%- CASE 'edit_any_item' -%]
349
    [%- CASE 'edit_any_item' -%]
350
        <span class="sub_permission edit_items_subpermission">
350
        <span class="sub_permission edit_items_subpermission">
351
            Edit any item. If not set the logged in user can only edit items whose home library matches the logged in library.
351
            Edit any item including items that would otherwise be restricted
352
        </span>
352
        </span>
353
        <span class="permissioncode">([% name | html %])</span>
353
        <span class="permissioncode">([% name | html %])</span>
354
    [%- CASE 'edit_items_restricted' -%]
354
    [%- CASE 'edit_items_restricted' -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt (-1 / +1 lines)
Lines 420-426 Link Here
420
                    <li>Hide patron's info for librarians outside of this group.</li>
420
                    <li>Hide patron's info for librarians outside of this group.</li>
421
                [% END %]
421
                [% END %]
422
                [% IF group.ft_limit_item_editing %]
422
                [% IF group.ft_limit_item_editing %]
423
                    <li>Limit item editing for librarians outside of this group.</li>
423
                    <li>Limit item editing to librarians inside of this group.</li>
424
                [% END %]
424
                [% END %]
425
                [% IF group.ft_search_groups_opac %]
425
                [% IF group.ft_search_groups_opac %]
426
                    <li>Use for OPAC search groups</li>
426
                    <li>Use for OPAC search groups</li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +4 lines)
Lines 381-387 Link Here
381
                <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]">
381
                <tr id="item_[% item.itemnumber | html %]" data-itemnumber="[% item.itemnumber | html %]" data-duedate="[% item.datedue | html %]">
382
                [% IF (StaffDetailItemSelection) %]
382
                [% IF (StaffDetailItemSelection) %]
383
                    <td style="text-align:center;vertical-align:middle">
383
                    <td style="text-align:center;vertical-align:middle">
384
                        <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
384
                        [% IF item.can_be_edited %]
385
                            <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
386
                        [% END %]
385
                    </td>
387
                    </td>
386
                [% END %]
388
                [% END %]
387
                    [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
389
                    [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %]
Lines 638-644 Note that permanent location is a code, and location may be an authval. Link Here
638
640
639
                [% IF CAN_user_editcatalogue_edit_items %]
641
                [% IF CAN_user_editcatalogue_edit_items %]
640
                    <td class="actions">
642
                    <td class="actions">
641
                        [% UNLESS item.cannot_be_edited %]
643
                        [% IF item.can_be_edited %]
642
                            [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
644
                            [% IF Koha.Preference('LocalCoverImages') OR Koha.Preference('OPACLocalCoverImages') %]
643
                                <div class="btn-group">
645
                                <div class="btn-group">
644
                                    <a  class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
646
                                    <a  class="btn btn-default btn-xs" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | html %]&itemnumber=[% item.itemnumber | html %]#edititem"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch_json.tt (-1 / +1 lines)
Lines 4-10 Link Here
4
  "iTotalDisplayRecords": [% total_rows | html %],
4
  "iTotalDisplayRecords": [% total_rows | html %],
5
  "aaData": [
5
  "aaData": [
6
  [%- FOREACH item IN results -%]
6
  [%- FOREACH item IN results -%]
7
    [%- INCLUDE 'catalogue/itemsearch_item.json.inc' item = item -%]
7
    [%- INCLUDE 'catalogue/itemsearch_item.json.inc' item = item, user = user -%]
8
    [%- UNLESS loop.last %],[% END -%]
8
    [%- UNLESS loop.last %],[% END -%]
9
  [%- END -%]
9
  [%- END -%]
10
  ]
10
  ]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (+4 lines)
Lines 115-124 Link Here
115
                        [% IF item.biblionumber != biblio.biblionumber %] [%# Host item %]
115
                        [% IF item.biblionumber != biblio.biblionumber %] [%# Host item %]
116
                              <li><a href="additem.pl?op=edititem&amp;biblionumber=[% item.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]#edititem">Edit in host</a> &nbsp; <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblio.biblionumber | html %]&amp;hostitemnumber=[% item.itemnumber | html %]&amp;searchid=[% searchid | html %]">Delink</a></li>
116
                              <li><a href="additem.pl?op=edititem&amp;biblionumber=[% item.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]#edititem">Edit in host</a> &nbsp; <a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delinkitem&amp;biblionumber=[% biblio.biblionumber | html %]&amp;hostitemnumber=[% item.itemnumber | html %]&amp;searchid=[% searchid | html %]">Delink</a></li>
117
                        [% ELSE %]
117
                        [% ELSE %]
118
                           [% UNLESS item.nomod %]
118
                              <li><a href="additem.pl?op=edititem&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;searchid=[% searchid | uri %]#edititem">Edit</a></li>
119
                              <li><a href="additem.pl?op=edititem&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;searchid=[% searchid | uri %]#edititem">Edit</a></li>
120
                           [% END %]
119
                              <li><a href="additem.pl?op=dupeitem&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;searchid=[% searchid | uri %]#additema">Duplicate</a></li>
121
                              <li><a href="additem.pl?op=dupeitem&amp;biblionumber=[% biblio.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;searchid=[% searchid | uri %]#additema">Duplicate</a></li>
120
                              <li class="print_label"><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=add&amp;number_type=itemnumber&amp;number_list=[% item.itemnumber | uri %]" target="_blank" >Print label</a></li>
122
                              <li class="print_label"><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=add&amp;number_type=itemnumber&amp;number_list=[% item.itemnumber | uri %]" target="_blank" >Print label</a></li>
123
                           [% UNLESS item.nomod %]
121
                              <li><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&amp;biblionumber=[% item.biblionumber | html %]&amp;itemnumber=[% item.itemnumber | html %]&amp;searchid=[% searchid | html %]" onclick="return confirm_deletion();">Delete</a></li>
124
                              <li><a class="delete" href="/cgi-bin/koha/cataloguing/additem.pl?op=delitem&amp;biblionumber=[% item.biblionumber | html %]&amp;itemnumber=[% item.itemnumber | html %]&amp;searchid=[% searchid | html %]" onclick="return confirm_deletion();">Delete</a></li>
125
                           [% END %]
122
                        [% END %]
126
                        [% END %]
123
                            [% IF ( OPACBaseURL ) %]
127
                            [% IF ( OPACBaseURL ) %]
124
                                <li class="view-in-opac"><a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]">OPAC view</a></li>
128
                                <li class="view-in-opac"><a target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]">OPAC view</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-2 / +1 lines)
Lines 294-300 Link Here
294
294
295
                                    [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
295
                                    [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %]
296
                                        <td class="actions">
296
                                        <td class="actions">
297
                                            [% IF CAN_user_coursereserves_add_reserves %]
297
                                            [% IF CAN_user_coursereserves_add_reserves && user.can_edit_item( cr.item ) %]
298
                                                <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&amp;itemnumber=[% cr.item.itemnumber | html %]&amp;biblionumber=[% cr.biblio.biblionumber | html %]&amp;action=lookup&amp;return=[% course.course_id | html %]&amp;is_edit=1"><i class="fa fa-pencil"></i> Edit</a>
298
                                                <a class="btn btn-default btn-xs" href="add_items.pl?course_id=[% course.course_id | html %]&amp;itemnumber=[% cr.item.itemnumber | html %]&amp;biblionumber=[% cr.biblio.biblionumber | html %]&amp;action=lookup&amp;return=[% course.course_id | html %]&amp;is_edit=1"><i class="fa fa-pencil"></i> Edit</a>
299
                                            [% END %]
299
                                            [% END %]
300
300
Lines 304-310 Link Here
304
                                            [% END %]
304
                                            [% END %]
305
                                        </td>
305
                                        </td>
306
                                    [% END %]
306
                                    [% END %]
307
308
                                </tr>
307
                                </tr>
309
                            [% END %]
308
                            [% END %]
310
                        </tbody>
309
                        </tbody>
(-)a/tools/batchMod.pl (-3 / +3 lines)
Lines 74-80 my ($template, $loggedinuser, $cookie) Link Here
74
$template->param( searchid => scalar $input->param('searchid'), );
74
$template->param( searchid => scalar $input->param('searchid'), );
75
75
76
# Does the user have a restricted item edition permission?
76
# Does the user have a restricted item edition permission?
77
my $uid = $loggedinuser ? Koha::Patrons->find( $loggedinuser )->userid : undef;
77
my $patron = Koha::Patrons->find( $loggedinuser );
78
my $uid = $loggedinuser ? $patron->userid : undef;
78
my $restrictededition = $uid ? haspermission($uid,  {'tools' => 'items_batchmod_restricted'}) : undef;
79
my $restrictededition = $uid ? haspermission($uid,  {'tools' => 'items_batchmod_restricted'}) : undef;
79
# In case user is a superlibrarian, edition is not restricted
80
# In case user is a superlibrarian, edition is not restricted
80
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian());
81
$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian());
Lines 292-298 if ($op eq "show"){ Link Here
292
if ( $display_items ) {
293
if ( $display_items ) {
293
    my $items_table =
294
    my $items_table =
294
      Koha::UI::Table::Builder::Items->new( { itemnumbers => \@itemnumbers } )
295
      Koha::UI::Table::Builder::Items->new( { itemnumbers => \@itemnumbers } )
295
      ->build_table;
296
      ->build_table( { patron => $patron } );;
296
    $template->param(
297
    $template->param(
297
        items        => $items_table->{items},
298
        items        => $items_table->{items},
298
        item_header_loop => $items_table->{headers},
299
        item_header_loop => $items_table->{headers},
299
- 

Return to bug 20256