use C4::Images;
use Koha::DateUtils;
use C4::HTML5Media;
-use C4::CourseReserves qw(GetItemReservesInfo);
+use C4::CourseReserves qw(GetItemCourseReservesInfo);
# use Smart::Comments;
my $analyze = $query->param('analyze');
-my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user(
{
template_name => 'catalogue/detail.tmpl',
query => $query,
}
if ( C4::Context->preference('UseCourseReserves') ) {
- $item->{'course_reserves'} = GetItemReservesInfo( itemnumber => $item->{'itemnumber'} );
+ $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
}
if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
subscriptions => \@subs,
subscriptionsnumber => $subscriptionsnumber,
subscriptiontitle => $dat->{title},
+ searchid => $query->param('searchid'),
);
# $debug and $template->param(debug_display => 1);
my ( $holdcount, $holds ) = C4::Reserves::GetReservesFromBiblionumber($biblionumber,1);
$template->param( holdcount => $holdcount, holds => $holds );
+my $StaffDetailItemSelection = C4::Context->preference('StaffDetailItemSelection');
+if ($StaffDetailItemSelection) {
+ # Only enable item selection if user can execute at least one action
+ if (
+ $flags->{superlibrarian}
+ || (
+ ref $flags->{tools} eq 'HASH' && (
+ $flags->{tools}->{items_batchmod} # Modify selected items
+ || $flags->{tools}->{items_batchdel} # Delete selected items
+ )
+ )
+ || ( ref $flags->{tools} eq '' && $flags->{tools} )
+ )
+ {
+ $template->param(
+ StaffDetailItemSelection => $StaffDetailItemSelection );
+ }
+}
output_html_with_http_headers $query, $cookie, $template->output;