From 48fc5512a50442ac31629d98bcbdd521f6cbe941 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 c22cd08c07..afc17935ee 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 @@ -295,16 +295,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