From 53071f4bd5027fed02a8fed183e468d13ad90e78 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 Signed-off-by: Martin Renvoize --- 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 e5c7efe5b2..c5d74f950e 100755 --- a/course_reserves/course-details.pl +++ b/course_reserves/course-details.pl @@ -66,6 +66,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 b6332e5902..d1a3e82bf0 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 @@ -292,16 +292,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.30.2