From 23ccb9fd1781b482fe747d513b490a1e5b364203 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 :) Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/columns_settings.tt | 9 +++- .../prog/en/modules/admin/currency.tt | 45 ++++++++++++++----- 2 files changed, 40 insertions(+), 14 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 5d7d1338e5..cd98a9e165 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 @@ -13,8 +13,13 @@ [% 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 3165634b2b..f3dc5dc69f 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 %]
Column nameIs Hidden by defaultCannot be toggled
+ [% IF tablename == 'currencies-table' %] + Currency + [% END %] + (id=[% tablename %]) +
Column nameIs hidden by defaultCannot be toggled