From 0a2b14dd16292572e5163e5dfa491432be1660d2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 3 Apr 2017 11:50:07 -0300 Subject: [PATCH] Bug 18370: Columns visibility on patron search - Hide the correct column MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When a column is hidden by default on the patron search result table, if the logged in user does not have the "tools > manage_patron_lists" permission, the wrong column will be hidden. Test plan: Edit the column visibility detail for "Patrons > id=memberresultst" Set "Fines" hidden by default Search for patrons => Without this patch, if the logged in user does not have the manage_patron_lists permission, the wrong column will be hidden/displayed. Signed-off-by: Séverine Queune Signed-off-by: Julian Maurice Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 4 ++++ 1 file changed, 4 insertions(+) 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 bea3ba6db4..c9e183072b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -162,6 +162,10 @@ $(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 %] + [%# Remove the first column if we do not display the checkbox %] + columns_settings = columns_settings.slice(1, -1); + [% END %] dtMemberResults = KohaTable("#memberresultst", { 'bServerSide': true, 'sAjaxSource': "/cgi-bin/koha/svc/members/search", -- 2.39.5