From 63ab79d6e478d42f13ac48f62828a1059dff1aad 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 (cherry picked from commit ffbd4d22e134ba9c1af511dcb0a56a4473f1a789) Signed-off-by: Fridolin Somers --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 6 +++--- .../prog/en/modules/members/tables/members_results.tt | 2 +- 2 files changed, 4 insertions(+), 4 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 2602e3f913..36670e7e18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -162,7 +162,7 @@ $(document).ready(function() { // Apply DataTables on the results table var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) %]; - [% UNLESS CAN_user_tools_manage_patron_lists %] + [% 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 %] @@ -224,7 +224,7 @@ $(document).ready(function() { }); }, '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' }, @@ -392,7 +392,7 @@ function filterByFirstLetterSurname(letter) { - [% IF CAN_user_tools_manage_patron_lists %] + [% IF CAN_user_borrowers_edit_borrowers || CAN_user_tools_manage_patron_lists %] [% END %] 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