From bf0b0f57e7ec7b30a12e6e41352d1f7c88dbf220 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 17 Nov 2020 07:00:18 -0500 Subject: [PATCH] Bug 20256: (QA follow-up) Implement for course reserves --- course_reserves/course-details.pl | 1 + .../modules/course_reserves/course-details.tt | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/course_reserves/course-details.pl b/course_reserves/course-details.pl index 35b2bc7695..ac1ddc360e 100755 --- a/course_reserves/course-details.pl +++ b/course_reserves/course-details.pl @@ -67,6 +67,7 @@ my $course_reserves = GetCourseReserves( $template->param( course => $course, course_reserves => $course_reserves, + user => Koha::Patrons->find( $loggedinuser ), ); output_html_with_http_headers $cgi, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 2ea511a363..7e92aeb7a9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -248,16 +248,18 @@ [% IF CAN_user_coursereserves_add_reserves || CAN_user_coursereserves_delete_reserves %] - - [% IF CAN_user_coursereserves_add_reserves %] - Edit - [% END %] + [% IF user.can_edit_item( cr.item ) %] + + [% IF CAN_user_coursereserves_add_reserves %] + Edit + [% END %] - [% IF CAN_user_coursereserves_delete_reserves %] - - Remove - [% END %] - + [% IF CAN_user_coursereserves_delete_reserves %] + + Remove + [% END %] + + [% END %] [% END %] -- 2.24.1 (Apple Git-126)