Bugzilla – Attachment 116532 Details for
Bug 27654
"Table settings for Pages" need to be sorted on "Administration -> Table settings"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27654: Sort module.keys hash when render columns_settings.tt
Bug-27654-Sort-modulekeys-hash-when-render-columns.patch (text/plain), 2.46 KB, created by
PTFS Europe Sandboxes
on 2021-02-08 23:50:53 UTC
(
hide
)
Description:
Bug 27654: Sort module.keys hash when render columns_settings.tt
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2021-02-08 23:50:53 UTC
Size:
2.46 KB
patch
obsolete
>From 2880283cbef926e23cdf1ffcea6052d59e95b871 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 8 Feb 2021 16:04:48 +0200 >Subject: [PATCH] Bug 27654: Sort module.keys hash when render > columns_settings.tt > >On the "Administration -> Table settings" page, the order of >"tables related to pages" sections is different with each page refresh. >Cause of that is that Perl gives random order for hash keys where >those elements are stored on template render. To avoid that we >add a "sort" method where getting keys similarly how it was done >previously to display tables always in the same order. > >To reproduce: > 1) Head over to /cgi-bin/koha/admin/columns_settings.pl > 2) Open any collapsed module settings, for example >"Acquisition tables". Check the order of pages. > 3) Reload the page. Check the order of the same elements again. >They always come in random order, it's easily distinguishable. > 4) Apply the patch. > 5) Repeat steps 1-3 again and ensure that the order of pages >stays the same no matter how many times you reload the page. > >Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >index e2a5448706..80b20d790d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt >@@ -6,7 +6,7 @@ > [% BLOCK pagelist %] > [% IF module.keys and module.keys.size > 0 %] > Jump to: >- [% FOR pagename IN module.keys %] >+ [% FOR pagename IN module.keys.sort %] > <a href="#[% pagename | url %]">[% pagename | html %]</a> > [% UNLESS loop.last %]<span class="separator"> | </span>[% END %] > [% END %] >@@ -18,7 +18,7 @@ > <input type="hidden" name="panel" value="[% panel_id | html %]" /> > [% SET panel_id = panel_id + 1 %] > [% IF module.keys and module.keys.size > 0 %] >- [% FOR pagename IN module.keys %] >+ [% FOR pagename IN module.keys.sort %] > <h4 class="page_name" id="[% pagename | html %]">Page: [% pagename | html %]</h4> > [% SET tables = module %] > [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27654
:
116500
|
116532
|
116574