From ffbd4d22e134ba9c1af511dcb0a56a4473f1a789 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sat, 15 Sep 2018 11:02:05 -0700 Subject: [PATCH] Bug 21353: Display checkboxes to merge patron even if cannot manage lists MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When permission 'manage_patron_lists' is off, there is no checkbox on /cgi-bin/koha/members/member.pl to merge patrons. Test plan: Remove permission manage_patron_lists Add permission edit_borrowers Search for patrons => Without this patch you will not be able to select patrons to merge (checkboxes are not displayed) Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit d60b0a2e4d3359c127f1e801db9e35dd217f8790) Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 8 ++++---- .../prog/en/modules/members/tables/members_results.tt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index c39e95deba..49034321a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -96,7 +96,7 @@ - [% IF CAN_user_tools_manage_patron_lists %] + [% IF CAN_user_borrowers_edit_borrowers || CAN_user_tools_manage_patron_lists %] [% END %] @@ -402,8 +402,8 @@ }); // Apply DataTables on the results table - var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) %]; - [% UNLESS CAN_user_tools_manage_patron_lists %] + var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %]; + [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %] [%# Remove the first column if we do not display the checkbox %] columns_settings.splice(0, 1); [% END %] @@ -465,7 +465,7 @@ }); }, 'aoColumns':[ - [% IF CAN_user_tools_manage_patron_lists %] + [% IF CAN_user_borrowers_edit_borrowers || CAN_user_tools_manage_patron_lists %] { 'mDataProp': 'dt_borrowernumber', 'bSortable': false }, [% END %] { 'mDataProp': 'dt_cardnumber' }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index 666b59c7f5..ad391d631c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -9,7 +9,7 @@ "aaData": [ [% FOREACH data IN aaData %] { - [% IF CAN_user_tools_manage_patron_lists %] + [% IF CAN_user_borrowers_edit_borrowers || CAN_user_tools_manage_patron_lists %] "dt_borrowernumber": "", [% END %] -- 2.39.5
 Card