https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18370

--- Comment #10 from Julian Maurice <[email protected]> ---
Comment on attachment 61870
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61870
Bug 18370: Columns visibility on patron search - Hide the correct column

Review of attachment 61870:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=18370&attachment=61870)
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
@@ +163,5 @@
>      // 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);

slice(1, -1) removes the first and the last elements of the array
slice(1) is what you want.
An even better solution is to use Array.splice, because it modifies directly
the array (and it's faster)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to