From 6ed4234e6ca945e7f6a9690683d53d451bbae8ee 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 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 1e36e2015d..17112c6f11 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 @@ -262,16 +262,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.20.1