From 5a3daeb1d0f7d069e94945a2e5c4af12fa6882e2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 7 Jul 2014 13:08:13 +0200 Subject: [PATCH] Bug 10212: Columns configuration for tables - POC This patch proves that this feature is useful with a concret use case. Test plan: 1/ Execute the updatedatabase in order to create the new table. 2/ Take a look to the yml structure. 3/ Go on the admin currency page (admin/currency.pl). 4/ Check that you cannot hide the 2 first columns on the table. 5/ Try to hide/show columns. 6/ Go on the columns configuration page (admin/columns_settings.pl). 7/ Only the admin tab are filled with data. Check/uncheck checkboxes and save. 8/ Go on the admin currency page and check that the behavior is what you expected. 9/ Give me some feedback :) --- .../prog/en/modules/admin/columns_settings.tt | 7 +++- .../prog/en/modules/admin/currency.tt | 45 ++++++++++++++++------ 2 files changed, 39 insertions(+), 13 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 c6a0c7c..6310838 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 @@ -10,7 +10,12 @@ [% IF tables.$pagename.keys and tables.$pagename.keys.size > 0 %] [% FOR tablename IN tables.$pagename.keys.sort %] - + [% FOR column IN tables.$pagename.$tablename %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt index 3165634..df8f94e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt @@ -1,3 +1,5 @@ +[% USE KohaDates %] +[% USE ColumnsSettings %] [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Currencies & Exchange rates › [% IF ( add_form ) %][% IF ( searchfield ) %]Modify currency '[% searchfield %]'[% ELSE %]New currency[% END %][% END %] @@ -5,6 +7,11 @@ [% IF ( delete_confirmed ) %]Currency deleted[% END %] [% IF ( else ) %]Currencies[% END %] [% INCLUDE 'doc-head-close.inc' %] + +[% INCLUDE 'datatables.inc' %] + + +[% INCLUDE 'columns_settings.inc' %]
[% tablename %] + [% IF tablename == 'currencies-table' %] + Currency + [% END %] + (id=[% tablename %]) +
Column nameIs Hidden by defaultCannot be toggled