Bugzilla – Attachment 106185 Details for
Bug 24156
Basket - Make sort order and number of items to display configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24156: move ColumnsSettings to TablesSettings
Bug-24156-move-ColumnsSettings-to-TablesSettings.patch (text/plain), 57.29 KB, created by
Jonathan Druart
on 2020-06-23 09:33:14 UTC
(
hide
)
Description:
Bug 24156: move ColumnsSettings to TablesSettings
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-06-23 09:33:14 UTC
Size:
57.29 KB
patch
obsolete
>From 744d0d344cde7357dbd53eb89a43de7bf1ea4830 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 5 Dec 2019 17:40:08 +0100 >Subject: [PATCH] Bug 24156: move ColumnsSettings to TablesSettings > >We are preparing the ground with this patch. As the "Columns settings" >page will now add the ability to modify settings for the whole table, it >makes sense to rename the file and the variables. > >Note that the controller script (admin/columns_settings.pl) and the yml >(admin/columns_settings.yml) files have not been moved to not break >shortcuts and abits people could have. But if QA decides, it could be >easy to do. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > .../{ColumnsSettings.pm => TablesSettings.pm} | 8 +++---- > .../{ColumnsSettings.pm => TablesSettings.pm} | 24 +++++++++---------- > admin/columns_settings.pl | 6 ++--- > .../prog/en/includes/columns_settings.inc | 3 ++- > .../en/includes/str/cataloging_additem.inc | 2 +- > .../prog/en/modules/acqui/basket.tt | 4 ++-- > .../prog/en/modules/acqui/duplicate_orders.tt | 2 +- > .../prog/en/modules/acqui/histsearch.tt | 4 ++-- > .../prog/en/modules/acqui/lateorders.tt | 4 ++-- > .../prog/en/modules/admin/branches.tt | 4 ++-- > .../prog/en/modules/admin/categories.tt | 4 ++-- > .../prog/en/modules/admin/currency.tt | 4 ++-- > .../prog/en/modules/admin/itemtypes.tt | 4 ++-- > .../prog/en/modules/catalogue/detail.tt | 6 ++--- > .../prog/en/modules/catalogue/issuehistory.tt | 4 ++-- > .../prog/en/modules/cataloguing/additem.tt | 2 +- > .../en/modules/cataloguing/z3950_search.tt | 4 ++-- > .../prog/en/modules/circ/circulation.tt | 6 ++--- > .../prog/en/modules/circ/overdue.tt | 4 ++-- > .../prog/en/modules/circ/pendingreserves.tt | 4 ++-- > .../prog/en/modules/circ/reserveratios.tt | 4 ++-- > .../prog/en/modules/circ/returns.tt | 4 ++-- > .../prog/en/modules/circ/view_holdsqueue.tt | 4 ++-- > .../prog/en/modules/circ/waitingreserves.tt | 6 ++--- > .../modules/course_reserves/course-details.tt | 4 ++-- > .../course_reserves/course-reserves.tt | 4 ++-- > .../prog/en/modules/ill/ill-requests.tt | 4 ++-- > .../prog/en/modules/members/boraccount.tt | 4 ++-- > .../prog/en/modules/members/holdshistory.tt | 4 ++-- > .../prog/en/modules/members/ill-requests.tt | 4 ++-- > .../prog/en/modules/members/member.tt | 4 ++-- > .../prog/en/modules/members/moremember.tt | 4 ++-- > .../prog/en/modules/members/pay.tt | 4 ++-- > .../prog/en/modules/members/readingrec.tt | 4 ++-- > .../prog/en/modules/patron_lists/list.tt | 4 ++-- > .../modules/reports/guided_reports_start.tt | 4 ++-- > .../prog/en/modules/reports/itemslost.tt | 4 ++-- > .../prog/en/modules/reserve/request.tt | 2 +- > .../en/modules/serials/subscription-detail.tt | 4 ++-- > .../prog/en/modules/suggestion/suggestion.tt | 4 ++-- > .../prog/en/modules/tools/letter.tt | 4 ++-- > .../prog/en/modules/tools/stockrotation.tt | 6 ++--- > .../en/includes/columns_settings.inc | 2 +- > .../en/modules/opac-course-details.tt | 4 ++-- > .../en/modules/opac-course-reserves.tt | 4 ++-- > .../bootstrap/en/modules/opac-detail.tt | 10 ++++---- > .../{ColumnsSettings.t => TablesSettings.t} | 10 ++++---- > 47 files changed, 112 insertions(+), 111 deletions(-) > rename C4/Utils/DataTables/{ColumnsSettings.pm => TablesSettings.pm} (90%) > rename Koha/Template/Plugin/{ColumnsSettings.pm => TablesSettings.pm} (71%) > rename t/db_dependent/{ColumnsSettings.t => TablesSettings.t} (94%) > >diff --git a/C4/Utils/DataTables/ColumnsSettings.pm b/C4/Utils/DataTables/TablesSettings.pm >similarity index 90% >rename from C4/Utils/DataTables/ColumnsSettings.pm >rename to C4/Utils/DataTables/TablesSettings.pm >index 8713489b0c..1c52dbbba8 100644 >--- a/C4/Utils/DataTables/ColumnsSettings.pm >+++ b/C4/Utils/DataTables/TablesSettings.pm >@@ -1,4 +1,4 @@ >-package C4::Utils::DataTables::ColumnsSettings; >+package C4::Utils::DataTables::TablesSettings; > > use Modern::Perl; > use List::Util qw( first ); >@@ -10,13 +10,13 @@ use Koha::Caches; > sub get_yaml { > my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml'; > my $cache = Koha::Caches->get_instance(); >- my $yaml = $cache->get_from_cache('ColumnsSettingsYaml'); >+ my $yaml = $cache->get_from_cache('TablesSettingsYaml'); > > unless ($yaml) { > $yaml = eval { YAML::LoadFile($yml_path) }; >- warn "ERROR: the yaml file for DT::ColumnsSettings is not correctly formated: $@" >+ warn "ERROR: the yaml file for DT::TablesSettings is not correctly formated: $@" > if $@; >- $cache->set_in_cache( 'ColumnsSettingsYaml', $yaml, { expiry => 3600 } ); >+ $cache->set_in_cache( 'TablesSettingsYaml', $yaml, { expiry => 3600 } ); > } > > return $yaml; >diff --git a/Koha/Template/Plugin/ColumnsSettings.pm b/Koha/Template/Plugin/TablesSettings.pm >similarity index 71% >rename from Koha/Template/Plugin/ColumnsSettings.pm >rename to Koha/Template/Plugin/TablesSettings.pm >index 50c2131ece..2ed567c7cd 100644 >--- a/Koha/Template/Plugin/ColumnsSettings.pm >+++ b/Koha/Template/Plugin/TablesSettings.pm >@@ -1,4 +1,4 @@ >-package Koha::Template::Plugin::ColumnsSettings; >+package Koha::Template::Plugin::TablesSettings; > > # This file is part of Koha. > # >@@ -19,28 +19,28 @@ package Koha::Template::Plugin::ColumnsSettings; > > =head1 NAME > >-Koha::Template::Plugin::ColumnsSettings >+Koha::Template::Plugin::TablesSettings > > =head2 SYNOPSYS > >- [% USE ColumnsSettings %] >+ [% USE TablesSettings %] > > . . . > >- [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %] >+ [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %] > <th id="column" data-colname="column">Column title</th> > [% END %] > > . . . > >- [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %] >+ [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %] > <td>[% row.column %]</td> > [% END %] > > . . . > > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; > var table = KohaTable("id", { "bAutoWidth": false }, columns_settings ); > </script> > >@@ -58,15 +58,15 @@ use YAML qw( LoadFile ); > use JSON qw( to_json ); > > use C4::Context qw( config ); >-use C4::Utils::DataTables::ColumnsSettings; >+use C4::Utils::DataTables::TablesSettings; > > =head1 FUNCTIONS > > =head2 GetColumns > > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; >- var table = KohaTable("id", { "bAutoWidth": false }, columns_settings ); >+ var tables_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; >+ var table = KohaTable("id", { "bAutoWidth": false }, tables_settings ); > </script> > > Used to get the full column settings configuration for datatables, usually requires a format of 'json' to pass into >@@ -78,7 +78,7 @@ sub GetColumns { > my ( $self, $module, $page, $table, $format ) = @_; > $format //= q{}; > >- my $columns = C4::Utils::DataTables::ColumnsSettings::get_columns( $module, $page, $table ); >+ my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table ); > > return $format eq 'json' > ? to_json( $columns ) >@@ -87,7 +87,7 @@ sub GetColumns { > > =head2 is_hidden > >- [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %] >+ [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %] > <th id="column" data-colname="column">Column title</th> > [% END %] > >@@ -98,7 +98,7 @@ it may contain confidential information and should be fully hidden rather than j > > sub is_hidden { > my ( $self, $module, $page, $table, $column_name ) = @_; >- my $columns = C4::Utils::DataTables::ColumnsSettings::get_columns( $module, $page, $table ); >+ my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table ); > foreach my $keys(@$columns){ > if($keys->{'columnname'} eq $column_name){ > return $keys->{'is_hidden'}; >diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl >index 5283963184..11117de41a 100755 >--- a/admin/columns_settings.pl >+++ b/admin/columns_settings.pl >@@ -6,7 +6,7 @@ use YAML qw( LoadFile ); > use C4::Auth; > use C4::Context; > use C4::Output; >-use C4::Utils::DataTables::ColumnsSettings qw( get_modules ); >+use C4::Utils::DataTables::TablesSettings qw( get_modules ); > my $input = new CGI; > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -42,7 +42,7 @@ if ( $action eq 'save' ) { > }; > } > >- C4::Utils::DataTables::ColumnsSettings::update_columns( >+ C4::Utils::DataTables::TablesSettings::update_columns( > { > columns => \@columns, > } >@@ -52,7 +52,7 @@ if ( $action eq 'save' ) { > } > > if ( $action eq 'list' ) { >- my $modules = C4::Utils::DataTables::ColumnsSettings::get_modules; >+ my $modules = C4::Utils::DataTables::TablesSettings::get_modules; > $template->param( > panel => ( $input->param('panel') || 0 ), > modules => $modules, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index d863b1e9cc..c8b01e089a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -1,5 +1,6 @@ >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > <!-- columns_settings.inc --> >+ > <script> > function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > var counter = 0; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >index 49d5857aa6..02c403cb5f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >@@ -20,6 +20,6 @@ > var MSG_CONFIRM_DELETE_ITEM = _("Are you sure you want to delete this item?"); > var MSG_CONFIRM_ADD_ITEM = _("Are you sure you want to add a new item? Any changes made on this page will be lost."); > var MSG_CONFIRM_SAVE = _("Are you sure you want to save?"); >- var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %]; > </script> > <!-- / str/cataloging_additem.inc --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index fedd90c118..e709ec845b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -19,7 +19,7 @@ > [% USE Branches %] > [% USE Price %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %]</title> >@@ -924,7 +924,7 @@ > [% END %] > [% END %] > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; > $(document).ready(function() { > KohaTable("orders", { > [% IF ( active ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >index 27e533354f..e6300bb0b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt >@@ -319,7 +319,7 @@ Basket [% basket.basketno | html %] › Duplicate existing orders > var MSG_NO_FUND_SELECTED = _("No fund selected."); > $(document).ready(function() { > $('span.hint').hide(); >- var columns_settings;// = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %]; >+ var columns_settings;// = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %]; > KohaTable("table_orders", { > "aoColumnDefs": [ > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >index e4df869231..06b2a5b07f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Branches %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -130,7 +130,7 @@ > <script> > var MSG_REMOVE_PATRON = _("Remove"); > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %]; > KohaTable("histsearcht", { > "aoColumnDefs": [ > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index 525016e305..cafaccaf84 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -289,7 +289,7 @@ > > $(document).ready(function() { > >- var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %]; > late_orderst = KohaTable("late_orders", { > "aoColumnDefs": [ > { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >index 68488d79be..2b25ebeb98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% SET footerjs = 1 %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Libraries > [% IF op == 'add_form' %] >@@ -265,7 +265,7 @@ > [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %] > [% INCLUDE 'str/tinymce_i18n.inc' %] > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'libraries', 'libraries', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'admin', 'libraries', 'libraries', 'json' ) | $raw %]; > $(document).ready(function() { > KohaTable("libraries", { > "aoColumnDefs": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index c77dbdd502..77146a78db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Price %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Patron categories › [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode | html %]'[% ELSE %]New category[% END %][% END %] >@@ -568,7 +568,7 @@ > <script> > var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _."); > var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date."); >- var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %]; > </script> > [% Asset.js("js/categories.js") | $raw %] > [% END %] >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 e16313110b..874ae51daa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE HtmlTags %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -246,7 +246,7 @@ > } > > $(document).ready(function() { >- columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] >+ columns_settings = [% TablesSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %] > var issuest = KohaTable("currencies-table", { > dom: 'B<"clearfix">t', > "columnDefs": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >index 9045f6c712..e28d7e17ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE AuthorisedValues %] > [% USE Price %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Administration › Item types [% IF op == 'add_form' %]› >@@ -483,7 +483,7 @@ Item types administration > <script> > $(document).ready(function() { > $('#icons').tabs(); >- var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %]; > [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %] > columns_settings.shift(); // Remove item type image column from configuration > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index d58edcf514..fd1dbe9a10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -5,7 +5,7 @@ > [% USE AuthorisedValues %] > [% USE Branches %] > [% USE Biblio %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% PROCESS 'i18n.inc' %] > [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] > [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] >@@ -1122,7 +1122,7 @@ Note that permanent location is a code, and location may be an authval. > > $(document).ready(function() { > var ids = ['holdings_table', 'otherholdings_table']; >- var columns_settings = [ [% ColumnsSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% ColumnsSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; >+ var columns_settings = [ [% TablesSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; > for (var i in ids) { > var id = ids[i]; > var dt_parameters = { >@@ -1140,7 +1140,7 @@ Note that permanent location is a code, and location may be an authval. > } > > [% IF Koha.Preference('AcquisitionDetails') %] >- var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %]; >+ var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %]; > var acquisitiondetails_table = KohaTable("orders", { > "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>', > 'bPaginate': false, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >index 9320d9251a..7ced03d39f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Catalog › Checkout history for [% INCLUDE 'biblio-title-head.inc' %]</title> >@@ -110,7 +110,7 @@ > [% INCLUDE 'columns_settings.inc' %] > <script id="js"> > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %]; >+ var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %]; > [% UNLESS show_patron_column %] > // Remove the patron column definition > columns_settings.splice(0,1); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 463edf4e08..98dfe48418 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE Koha %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging › [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) › Items</title> > [% INCLUDE 'doc-head-close.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >index d9881a57f6..78e31de6bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% SET footerjs = 1 %] > [% USE Koha %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Z39.50/SRU search results</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -242,7 +242,7 @@ > [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function(){ >- var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %]; > var thetable = KohaTable("resultst", { > "aoColumnDefs": [ > { "targets": [ "NoSort" ],"sortable": false,"searchable": false }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index e9534ead52..682573dc0a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -4,7 +4,7 @@ > [% USE Branches %] > [% USE KohaDates %] > [% USE Categories %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE ItemTypes %] > [% USE Price %] > [% USE AuthorisedValues %] >@@ -1066,8 +1066,8 @@ > [% Asset.js("js/holds.js") | $raw %] > [% Asset.js("js/circ-patron-search-results.js") | $raw %] > <script> >- columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >- columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] >+ columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >+ columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] > > [% IF borrowernumber and patron %] > if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >index 1e29484a70..9cdf67184b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt >@@ -5,7 +5,7 @@ > [%- USE Price -%] > [%- USE ItemTypes -%] > [%- USE Categories -%] >-[%- USE ColumnsSettings -%] >+[%- USE TablesSettings -%] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Items overdue as of [% todaysdate | html %]</title> >@@ -278,7 +278,7 @@ > } > > $(document).ready(function(){ >- var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %]; > KohaTable("overduest", { > "sPaginationType": "full", > "aaSorting": [[0, 'asc']], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 08193e0179..d5777850f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE AuthorisedValues %] > [%- USE Branches -%] > [%- USE ItemTypes -%] >@@ -246,7 +246,7 @@ > [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %]; > var holdst = KohaTable("holdst", { > "aoColumnDefs": [ > { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >index 224c0928f0..74b4b360c3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt >@@ -4,7 +4,7 @@ > [% USE AuthorisedValues %] > [% USE Branches %] > [% USE ItemTypes %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Hold ratios</title> >@@ -178,7 +178,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %]; > $(document).ready(function() { > $(".ratiolimit").on("click", function(e) { > e.preventDefault(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 26c0fbbf83..57ad49518a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -5,7 +5,7 @@ > [% USE Koha %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% PROCESS 'member-display-address-style.inc' %] > [% SET footerjs = 1 %] > [% BLOCK display_bormessagepref %] >@@ -933,7 +933,7 @@ > Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]'); > [% END %] > >- var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %] >+ var columns_settings = [% TablesSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %] > var returns_table = KohaTable("checkedintable", { > "bFilter":false, > "bPaginate":false, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >index 8c8c1551ce..d467a1bf00 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt >@@ -5,7 +5,7 @@ > [% USE ItemTypes %] > [% USE Branches %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Koha %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -228,7 +228,7 @@ > }; > $('#holdst thead input').on('change keyup keydown', filterColumn); > >- var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %]; > var holdst = KohaTable("holdst", { > "aaSorting": [[ 3, "asc" ]], > "aoColumns": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index 43a26845a0..b1a49e42b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Circulation › Holds awaiting pickup</title> >@@ -123,8 +123,8 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- var holdst_columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %]; >- var holdso_columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %]; >+ var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %]; >+ var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %]; > > $(document).ready(function() { > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >index 56cb7b9780..1ad1fa7f04 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt >@@ -3,7 +3,7 @@ > [% USE AuthorisedValues %] > [% USE ItemTypes %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Course reserves › Course details for [% course.course_name | html %]</title> >@@ -269,7 +269,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %]; > $(document).ready(function(){ > var rtable = KohaTable("course_reserves_table", { > "sPaginationType": "full", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >index 7b1d4cd71b..27f73048fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Course reserves</title> >@@ -79,7 +79,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > <script> >- var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %]; > $(document).ready(function() { > var ctable = KohaTable("course_reserves_table", { > "sPaginationType": "full", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index deebddf5c5..b719c72b05 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -5,7 +5,7 @@ > [% USE KohaDates %] > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Price %] > > [% INCLUDE 'doc-head-open.inc' %] >@@ -772,7 +772,7 @@ > <script> > var prefilters = '[% prefilters | $raw %]'; > // Set column settings >- var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; > $("#ill_checkout_duedate_input").datetimepicker({ > hour: 23, > minute: 59 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index db7369f328..94f0b9620a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE Branches %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE AuthorisedValues %] > [% USE Price %] > [% USE Branches %] >@@ -313,7 +313,7 @@ > > var txtActivefilter = _("Filter paid transactions"); > var txtInactivefilter = _("Show all transactions"); >- var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %]; > var table_account_fines = KohaTable("table_account_fines", { > "sPaginationType": "full", > 'aaSorting': [[0, 'desc']], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index 9510750cbe..5b93bce7b3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -4,7 +4,7 @@ > [% USE Koha %] > [% USE AuthorisedValues %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE ItemTypes %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >@@ -130,7 +130,7 @@ > [% Asset.js("js/members-menu.js") | $raw %] > <script> > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %]; >+ var columns_settings = [% TablesSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %]; > [% UNLESS show_itemtype_column %] > //Remove item type column settings > columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';}); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt >index 4a97d4570e..3540fb6929 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt >@@ -5,7 +5,7 @@ > [% USE KohaDates %] > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Patrons › ILL requests history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title> >@@ -50,7 +50,7 @@ > <script> > var prefilters = '[% prefilters | html %]'; > // Set column settings >- var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %]; > </script> > [% INCLUDE 'ill-list-table-strings.inc' %] > [% Asset.js("js/ill-list-table.js") | $raw %] >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 209932b7a6..1d2609b0ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE Koha %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Branches %] > [% USE Categories %] > [% SET footerjs = 1 %] >@@ -364,7 +364,7 @@ > }); > > // Apply DataTables on the results table >- var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %]; > [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %] > [%# Remove the first column if we do not display the checkbox %] > columns_settings.splice(0, 1); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index a03c1bd5e4..0757ae74fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -4,7 +4,7 @@ > [% USE Branches %] > [% USE KohaDates %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE Price %] > [% PROCESS 'member-display-address-style.inc' %] > [% PROCESS 'member-display-alt-address-style.inc' %] >@@ -907,7 +907,7 @@ > [% Asset.js("js/messaging-preference-form.js") | $raw %] > <script> > >- columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] >+ columns_settings_issues_table = [% TablesSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %] > > $(document).ready(function() { > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >index f5de6c9a37..3ca90b4c03 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -4,7 +4,7 @@ > [% USE AuthorisedValues %] > [% USE Branches %] > [% USE Price %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE KohaDates %] > [% SET footerjs = 1 %] > [% PROCESS 'accounts.inc' %] >@@ -220,7 +220,7 @@ > $(".add-note").show(); > }); > >- var columns_settings = [% ColumnsSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %]; > KohaTable("finest", { > "columnDefs": [ > { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index 6d7ae6b829..2e45c501f8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -4,7 +4,7 @@ > [% USE Koha %] > [% USE AuthorisedValues %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title> >@@ -131,7 +131,7 @@ > [% INCLUDE 'columns_settings.inc' %] > <script id="js"> > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %]; >+ var columns_settings = [% TablesSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %]; > var table = KohaTable("table_readingrec", { > "sPaginationType": "full", > "aaSorting": [[10, 'desc']], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >index acc8a05ccd..2f68bdc629 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Asset %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > [% INCLUDE 'columns_settings.inc' %] >@@ -186,7 +186,7 @@ > $(document).ready(function() { > $('#patrons_to_add_fieldset').hide(); > >- var columns_settings_table = [% ColumnsSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %] >+ var columns_settings_table = [% TablesSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %] > KohaTable('patron-list-table', { > "order": [[ 3, "asc" ]], > "aoColumns": [ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 38e0a42b3b..e704e19493 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE Koha %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE JSON.Escape %] > [% SET footerjs = 1 %] > >@@ -1494,7 +1494,7 @@ > [% END %] > > $('[data-toggle="tooltip"]').tooltip(); >- var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %]; > > $('#limit').change(function() { > $('#limitselect').submit(); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index 0b2dc2e1fb..ad09c264c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE AuthorisedValues %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE KohaDates %] > [% USE ItemTypes %] > [% USE Price %] >@@ -194,7 +194,7 @@ > [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > <script> > $(document).ready(function() { >- var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %]; > var lostitems_table = KohaTable("lostitems-table", { > "dom": 'B<"clearfix">t', > "aaSorting": [], >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 2f5f0ebdb7..44c46d2395 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -958,7 +958,7 @@ > itemAlreadyOnHold: _("Patron already has hold for this item"), > cannotBeTransferred: _("Cannot be transferred to pickup library") > } >- columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] >+ columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %] > > $(document).ready(function() { > [% SET active = clubs ? 1 : 0 %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 75414fbb24..d70797436a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -5,7 +5,7 @@ > [% USE Branches %] > [% USE AuthorisedValues %] > [% USE Price %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › Details for subscription #[% subscriptionid | html %]</title> >@@ -513,7 +513,7 @@ > return false; > }) > >- var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %]; > var table = KohaTable("orders", { > "aoColumnDefs": [ > { "bVisible": false, "aTargets": [ 'NoVisible' ] }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 313460fa0f..c293a57ba3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -5,7 +5,7 @@ > [% USE AuthorisedValues %] > [% USE KohaDates %] > [% USE Price %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › >@@ -1004,7 +1004,7 @@ > $(document).ready(function() { > $('#suggestiontabs').tabs(); > >- columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] >+ columns_settings = [% TablesSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %] > [% FOREACH suggestion IN suggestions %] > [% IF ( suggestion.suggestions_loop ) %] > KohaTable("table_[% loop.count| html %]", { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >index 313e44bebf..4bfed8b44c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title> >@@ -558,7 +558,7 @@ > var MSG_EMPTY_TEMPLATES = _("Please fill at least one template."); > var MSG_LOADING = _("Loading"); > var MSG_NO_NOTICE_FOUND = _("No matching notices found"); >- var columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %]; > </script> > [% Asset.js("js/letter.js") | $raw %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >index 9c092235ed..754e833e26 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt >@@ -3,7 +3,7 @@ > [% USE Koha %] > [% USE Branches %] > [% USE KohaDates %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Stock rotation</title> >@@ -573,8 +573,8 @@ > [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/pages/stockrotation.js") | $raw %] > <script> >- var stock_rotation_items_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; >- var stock_rotation_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; >+ var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %]; >+ var stock_rotation_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %]; > $("#addStageModal, #addItemsModal").on("shown.bs.modal", function(){ > $("#branch, #barcode").focus(); > }); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >index 7499b86473..97f201be30 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc >@@ -1,4 +1,4 @@ >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > > <script> > function KohaTable(selector, dt_parameters, columns_settings) { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >index 5db0b526d3..049d36c756 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >@@ -5,7 +5,7 @@ > [% USE AuthorisedValues %] > [% USE ItemTypes %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Course reserves for [% course.course_name | html %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -110,7 +110,7 @@ > [% INCLUDE 'columns_settings.inc' %] > <script> > $(document).ready(function() { >- columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %]; >+ columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %]; > KohaTable("#course-items-table", { > "dom": '<"top"flp>rt<"clear">', > "sorting": [[ 1, "asc" ]], >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >index 751e2ecc14..4471fa6513 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >@@ -2,7 +2,7 @@ > [% USE Asset %] > [% USE Koha %] > [% USE AuthorisedValues %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Courses</title> >@@ -68,7 +68,7 @@ > <script> > > $(document).ready(function() { >- columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %] >+ columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %] > > KohaTable("#course_reserves_table", { > "dom": '<"top"flp>rt<"clear">', >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 8752824d8a..315cedb0d6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -4,7 +4,7 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE Branches %] >-[% USE ColumnsSettings %] >+[% USE TablesSettings %] > [% USE AuthorisedValues %] > [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %] > [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %] >@@ -1148,7 +1148,7 @@ > [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %] > <th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>[% END %] > <th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th> >- [% UNLESS ColumnsSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %] >+ [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %] > <th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>[% END %] > [% IF ( itemdata_enumchron ) %] > <th id="item_enumchron" data-colname="item_enumchron" class="vol_info">Vol info</th>[% END %] >@@ -1252,7 +1252,7 @@ > [% END %] > [% END %] > </td> >- [% UNLESS ColumnsSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %] >+ [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %] > <td class="materials">[% ITEM_RESULT.materials | html %]</td> > [% END %] > [% IF ( itemdata_enumchron ) %] >@@ -1463,7 +1463,7 @@ > }); > [% END %] > >- var columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %]; >+ var columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %]; > > KohaTable("#holdingst", { > dom: '<"clearfix">t', >@@ -1485,7 +1485,7 @@ > "autoWidth": false > }, columns_settings); > >- var serial_column_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %]; >+ var serial_column_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %]; > > KohaTable("#subscriptionst", { > dom: '<"clearfix">t', >diff --git a/t/db_dependent/ColumnsSettings.t b/t/db_dependent/TablesSettings.t >similarity index 94% >rename from t/db_dependent/ColumnsSettings.t >rename to t/db_dependent/TablesSettings.t >index ebf5272626..d53f9f1127 100644 >--- a/t/db_dependent/ColumnsSettings.t >+++ b/t/db_dependent/TablesSettings.t >@@ -5,7 +5,7 @@ use Test::More tests => 2; > use Test::MockModule; > > use C4::Context; >-use C4::Utils::DataTables::ColumnsSettings; >+use C4::Utils::DataTables::TablesSettings; > use Koha::Database; > > my $schema = Koha::Database->new->schema; >@@ -14,7 +14,7 @@ my $dbh = C4::Context->dbh; > > $dbh->do(q|DELETE FROM columns_settings|); > >-my $module = new Test::MockModule('C4::Utils::DataTables::ColumnsSettings'); >+my $module = new Test::MockModule('C4::Utils::DataTables::TablesSettings'); > $module->mock( > 'get_yaml', > sub { >@@ -58,7 +58,7 @@ $module->mock( > } > ); > >-C4::Utils::DataTables::ColumnsSettings::update_columns( >+C4::Utils::DataTables::TablesSettings::update_columns( > { > columns => [ > { >@@ -114,7 +114,7 @@ C4::Utils::DataTables::ColumnsSettings::update_columns( > } > ); > >-my $modules = C4::Utils::DataTables::ColumnsSettings::get_modules(); >+my $modules = C4::Utils::DataTables::TablesSettings::get_modules(); > > my $modules_expected = { > 'admin' => { >@@ -173,7 +173,7 @@ for my $m ( keys %$modules ) { > for my $p ( keys %{ $modules->{$m} } ) { > for my $t ( keys %{ $modules->{$m}{$p} } ) { > my $columns = >- C4::Utils::DataTables::ColumnsSettings::get_columns( $m, $p, $t ); >+ C4::Utils::DataTables::TablesSettings::get_columns( $m, $p, $t ); > is_deeply( > $columns, > $modules->{$m}{$p}{$t}, >-- >2.20.1
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 24156
:
96223
|
96224
|
96225
|
96226
|
96227
|
96228
|
96229
|
96230
|
98449
|
98450
|
98451
|
98452
|
98453
|
98454
|
98455
|
98456
|
98843
|
98844
|
98845
|
98846
|
98847
|
98848
|
99007
|
99008
|
99009
|
99010
|
99011
|
99012
|
99013
|
99014
|
105823
|
105824
|
105825
|
105826
|
105827
|
105828
|
105829
|
106183
|
106184
|
106185
|
106186
|
106187
|
106188
|
106189
|
106190
|
106191
|
106219
|
106220
|
106221
|
106222
|
106223
|
106224
|
106225
|
106226
|
106227
|
106228
|
106245