@@ -, +, @@
---
catalogue/detail.pl | 6 ++++++
.../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 8 ++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -634,6 +634,12 @@ if ( C4::Context->preference('UseCourseReserves') ) {
$template->param( course_reserves => $course_reserves );
}
+my @libraries = $biblio->items({ host_items => 1 })->get_column('homebranch');
+my %can_edit_items_from = map {
+ $_ => $patron->can_edit_items_from($_)
+} @libraries;
+$template->param(can_edit_items_from => \%can_edit_items_from);
+
$template->param(found1 => scalar $query->param('found1') );
$template->param(biblio => $biblio);
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -1,5 +1,6 @@
[% USE raw %]
[% USE Asset %]
+[% USE To %]
[% USE Koha %]
[% USE KohaDates %]
[% USE KohaPlugins %]
@@ -2504,8 +2505,11 @@
searchable: false,
orderable: false,
render: function (data, type, row, meta) {
- // FIXME if item.can_be_edited
- return (''.format(row.item_id));
+ if ( can_edit_items_from[row.holding_library_id] ){
+ return ''.format(row.item_id);
+ } else {
+ return ''
+ }
}
},
[% END %]
--