View | Details | Raw Unified | Return to bug 24156
Collapse All | Expand All

(-)a/C4/Utils/DataTables/ColumnsSettings.pm (-4 / +4 lines)
Lines 1-4 Link Here
1
package C4::Utils::DataTables::ColumnsSettings;
1
package C4::Utils::DataTables::TablesSettings;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use List::Util qw( first );
4
use List::Util qw( first );
Lines 10-22 use Koha::Caches; Link Here
10
sub get_yaml {
10
sub get_yaml {
11
    my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml';
11
    my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml';
12
    my $cache = Koha::Caches->get_instance();
12
    my $cache = Koha::Caches->get_instance();
13
    my $yaml  = $cache->get_from_cache('ColumnsSettingsYaml');
13
    my $yaml  = $cache->get_from_cache('TablesSettingsYaml');
14
14
15
    unless ($yaml) {
15
    unless ($yaml) {
16
        $yaml = eval { YAML::LoadFile($yml_path) };
16
        $yaml = eval { YAML::LoadFile($yml_path) };
17
        warn "ERROR: the yaml file for DT::ColumnsSettings is not correctly formated: $@"
17
        warn "ERROR: the yaml file for DT::TablesSettings is not correctly formated: $@"
18
          if $@;
18
          if $@;
19
        $cache->set_in_cache( 'ColumnsSettingsYaml', $yaml, { expiry => 3600 } );
19
        $cache->set_in_cache( 'TablesSettingsYaml', $yaml, { expiry => 3600 } );
20
    }
20
    }
21
21
22
    return $yaml;
22
    return $yaml;
(-)a/Koha/Template/Plugin/ColumnsSettings.pm (-5 / +5 lines)
Lines 1-4 Link Here
1
package Koha::Template::Plugin::ColumnsSettings;
1
package Koha::Template::Plugin::TablesSettings;
2
2
3
# This file is part of Koha.
3
# This file is part of Koha.
4
#
4
#
Lines 26-32 use YAML qw( LoadFile ); Link Here
26
use JSON qw( to_json );
26
use JSON qw( to_json );
27
27
28
use C4::Context qw( config );
28
use C4::Context qw( config );
29
use C4::Utils::DataTables::ColumnsSettings;
29
use C4::Utils::DataTables::TablesSettings;
30
30
31
=pod
31
=pod
32
32
Lines 35-43 This plugin allows to get the column configuration for a table. Link Here
35
First, include the line '[% USE Tables %]' at the top
35
First, include the line '[% USE Tables %]' at the top
36
of the template to enable the plugin.
36
of the template to enable the plugin.
37
37
38
To use, call ColumnsSettings.GetColumns with the module, the page and the table where the template is called.
38
To use, call TablesSettings.GetColumns with the module, the page and the table where the template is called.
39
39
40
For example: [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'holdst' ) %]
40
For example: [% TablesSettings.GetColumns( 'circ', 'circulation', 'holdst' ) %]
41
41
42
=cut
42
=cut
43
43
Lines 45-51 sub GetColumns { Link Here
45
    my ( $self, $module, $page, $table, $format ) = @_;
45
    my ( $self, $module, $page, $table, $format ) = @_;
46
    $format //= q{};
46
    $format //= q{};
47
47
48
    my $columns = C4::Utils::DataTables::ColumnsSettings::get_columns( $module, $page, $table );
48
    my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table );
49
49
50
    return $format eq 'json'
50
    return $format eq 'json'
51
        ? to_json( $columns )
51
        ? to_json( $columns )
(-)a/admin/columns_settings.pl (-3 / +3 lines)
Lines 6-12 use YAML qw( LoadFile ); Link Here
6
use C4::Auth;
6
use C4::Auth;
7
use C4::Context;
7
use C4::Context;
8
use C4::Output;
8
use C4::Output;
9
use C4::Utils::DataTables::ColumnsSettings qw( get_modules );
9
use C4::Utils::DataTables::TablesSettings qw( get_modules );
10
my $input = new CGI;
10
my $input = new CGI;
11
11
12
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
12
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Lines 42-48 if ( $action eq 'save' ) { Link Here
42
          };
42
          };
43
    }
43
    }
44
44
45
    C4::Utils::DataTables::ColumnsSettings::update_columns(
45
    C4::Utils::DataTables::TablesSettings::update_columns(
46
        {
46
        {
47
            columns => \@columns,
47
            columns => \@columns,
48
        }
48
        }
Lines 52-58 if ( $action eq 'save' ) { Link Here
52
}
52
}
53
53
54
if ( $action eq 'list' ) {
54
if ( $action eq 'list' ) {
55
    my $modules = C4::Utils::DataTables::ColumnsSettings::get_modules;
55
    my $modules = C4::Utils::DataTables::TablesSettings::get_modules;
56
    $template->param(
56
    $template->param(
57
        panel   => ( $input->param('panel') || 0 ),
57
        panel   => ( $input->param('panel') || 0 ),
58
        modules => $modules,
58
        modules => $modules,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc (-1 / +1 lines)
Lines 1-4 Link Here
1
[% USE ColumnsSettings %]
1
[% USE TablesSettings %]
2
2
3
<script>
3
<script>
4
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
4
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc (-1 / +1 lines)
Lines 17-21 Link Here
17
    var MSG_ENTER_NUM_ITEMS = _("Please enter a number of items to create.");
17
    var MSG_ENTER_NUM_ITEMS = _("Please enter a number of items to create.");
18
    var MSG_CONFIRM_DELETE_ITEM = _("Are you sure you want to delete this item?");
18
    var MSG_CONFIRM_DELETE_ITEM = _("Are you sure you want to delete this item?");
19
    var MSG_CONFIRM_ADD_ITEM = _("Are you sure you want to add a new item? Any changes made on this page will be lost.");
19
    var MSG_CONFIRM_ADD_ITEM = _("Are you sure you want to add a new item? Any changes made on this page will be lost.");
20
    var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %];
20
    var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %];
21
</script>
21
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-2 / +2 lines)
Lines 19-25 Link Here
19
[% USE Branches %]
19
[% USE Branches %]
20
[% USE Price %]
20
[% USE Price %]
21
[% USE AuthorisedValues %]
21
[% USE AuthorisedValues %]
22
[% USE ColumnsSettings %]
22
[% USE TablesSettings %]
23
[% SET footerjs = 1 %]
23
[% SET footerjs = 1 %]
24
[% INCLUDE 'doc-head-open.inc' %]
24
[% INCLUDE 'doc-head-open.inc' %]
25
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %]</title>
25
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %]</title>
Lines 917-923 Link Here
917
        [% END %]
917
        [% END %]
918
    [% END %]
918
    [% END %]
919
    <script>
919
    <script>
920
        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
920
        var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
921
        $(document).ready(function() {
921
        $(document).ready(function() {
922
            KohaTable("orders", {
922
            KohaTable("orders", {
923
                [% IF ( active ) %]
923
                [% IF ( active ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/duplicate_orders.tt (-1 / +1 lines)
Lines 319-325 Basket [% basket.basketno | html %] &rsaquo; Duplicate existing orders Link Here
319
        var MSG_NO_FUND_SELECTED = _("No fund selected.");
319
        var MSG_NO_FUND_SELECTED = _("No fund selected.");
320
        $(document).ready(function() {
320
        $(document).ready(function() {
321
            $('span.hint').hide();
321
            $('span.hint').hide();
322
            var columns_settings;// = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
322
            var columns_settings;// = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
323
            KohaTable("table_orders", {
323
            KohaTable("table_orders", {
324
                "aoColumnDefs": [
324
                "aoColumnDefs": [
325
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
325
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/histsearch.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
Lines 130-136 Link Here
130
    <script>
130
    <script>
131
        var MSG_REMOVE_PATRON = _("Remove");
131
        var MSG_REMOVE_PATRON = _("Remove");
132
        $(document).ready(function() {
132
        $(document).ready(function() {
133
            var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
133
            var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'histsearch', 'histsearcht', 'json' ) | $raw %];
134
            KohaTable("histsearcht", {
134
            KohaTable("histsearcht", {
135
                "aoColumnDefs": [
135
                "aoColumnDefs": [
136
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
136
                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
<title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
8
<title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
Lines 213-219 Link Here
213
213
214
        $(document).ready(function() {
214
        $(document).ready(function() {
215
215
216
            var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
216
            var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
217
            late_orderst = KohaTable("late_orders", {
217
            late_orderst = KohaTable("late_orders", {
218
                "aoColumnDefs": [
218
                "aoColumnDefs": [
219
                    { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
219
                    { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Administration &rsaquo; Libraries
6
<title>Koha &rsaquo; Administration &rsaquo; Libraries
7
[% IF op == 'add_form' %]
7
[% IF op == 'add_form' %]
Lines 265-271 Link Here
265
    [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
265
    [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
266
    [% INCLUDE 'str/tinymce_i18n.inc' %]
266
    [% INCLUDE 'str/tinymce_i18n.inc' %]
267
    <script>
267
    <script>
268
        var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
268
        var columns_settings = [% TablesSettings.GetColumns( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
269
        $(document).ready(function() {
269
        $(document).ready(function() {
270
            KohaTable("libraries", {
270
            KohaTable("libraries", {
271
                "aoColumnDefs": [
271
                "aoColumnDefs": [
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt (-2 / +2 lines)
Lines 3-9 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE Price %]
5
[% USE Price %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Administration &rsaquo; Patron categories &rsaquo; [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode | html %]'[% ELSE %]New category[% END %][% END %]
9
<title>Koha &rsaquo; Administration &rsaquo; Patron categories &rsaquo; [% IF op == 'add_form' %][% IF ( categorycode ) %]Modify category '[% categorycode | html %]'[% ELSE %]New category[% END %][% END %]
Lines 568-574 Link Here
568
    <script>
568
    <script>
569
        var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
569
        var MSG_CATEGORYCODE_CHARS = _("Category code can only contain the following characters: letters, numbers, - and _.");
570
        var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
570
        var MSG_ONE_ENROLLMENTPERIOD = ("Please choose an enrollment period in months OR by date.");
571
        var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
571
        var columns_settings = [% TablesSettings.GetColumns( 'admin', 'categories', 'patron_categories', 'json' ) | $raw %];
572
    </script>
572
    </script>
573
    [% Asset.js("js/categories.js") | $raw %]
573
    [% Asset.js("js/categories.js") | $raw %]
574
[% END %]
574
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% USE HtmlTags %]
5
[% USE HtmlTags %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
Lines 246-252 Link Here
246
        }
246
        }
247
247
248
        $(document).ready(function() {
248
        $(document).ready(function() {
249
            columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
249
            columns_settings = [% TablesSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) | $raw %]
250
            var issuest = KohaTable("currencies-table", {
250
            var issuest = KohaTable("currencies-table", {
251
                dom: 'B<"clearfix">t',
251
                dom: 'B<"clearfix">t',
252
                "columnDefs": [
252
                "columnDefs": [
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-2 / +2 lines)
Lines 3-9 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE Price %]
5
[% USE Price %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Administration &rsaquo; Item types [% IF op == 'add_form' %]&rsaquo;
9
<title>Koha &rsaquo; Administration &rsaquo; Item types [% IF op == 'add_form' %]&rsaquo;
Lines 465-471 Item types administration Link Here
465
    <script>
465
    <script>
466
         $(document).ready(function() {
466
         $(document).ready(function() {
467
            $('#icons').tabs();
467
            $('#icons').tabs();
468
            var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
468
            var columns_settings = [% TablesSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
469
            [% IF Koha.Preference('noItemTypeImages') %]
469
            [% IF Koha.Preference('noItemTypeImages') %]
470
                columns_settings.shift(); // Remove item type image column from configuration
470
                columns_settings.shift(); // Remove item type image column from configuration
471
            [% END %]
471
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE Biblio %]
7
[% USE Biblio %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
9
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
10
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
10
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
11
11
Lines 1024-1030 Link Here
1024
            }
1024
            }
1025
1025
1026
            [% IF Koha.Preference('AcquisitionDetails') %]
1026
            [% IF Koha.Preference('AcquisitionDetails') %]
1027
                var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
1027
                var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
1028
                var acquisitiondetails_table = KohaTable("orders", {
1028
                var acquisitiondetails_table = KohaTable("orders", {
1029
                    "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1029
                    "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1030
                    'bPaginate': false,
1030
                    'bPaginate': false,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (-2 / +2 lines)
Lines 3-9 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% INCLUDE 'biblio-title-head.inc' %]</title>
9
<title>Koha &rsaquo; Catalog &rsaquo; Checkout history for [% INCLUDE 'biblio-title-head.inc' %]</title>
Lines 110-116 Link Here
110
[% INCLUDE 'columns_settings.inc' %]
110
[% INCLUDE 'columns_settings.inc' %]
111
    <script id="js">
111
    <script id="js">
112
        $(document).ready(function() {
112
        $(document).ready(function() {
113
            var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
113
            var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'checkoutshistory-table', 'json') %];
114
            [% UNLESS show_patron_column %]
114
            [% UNLESS show_patron_column %]
115
            // Remove the patron column definition
115
            // Remove the patron column definition
116
            columns_settings.splice(0,1);
116
            columns_settings.splice(0,1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +1 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>Koha &rsaquo; Cataloging &rsaquo; [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) &rsaquo; Items</title>
6
<title>Koha &rsaquo; Cataloging &rsaquo; [% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %]) &rsaquo; Items</title>
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Z39.50/SRU search results</title>
7
<title>Koha &rsaquo; Z39.50/SRU search results</title>
8
[% INCLUDE 'doc-head-close.inc' %]
8
[% INCLUDE 'doc-head-close.inc' %]
Lines 250-256 Link Here
250
                });
250
                });
251
            });
251
            });
252
252
253
            var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
253
            var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
254
            var thetable = KohaTable("resultst", {
254
            var thetable = KohaTable("resultst", {
255
                "aoColumnDefs": [
255
                "aoColumnDefs": [
256
                    { "targets": [ "NoSort" ],"sortable": false,"searchable": false },
256
                    { "targets": [ "NoSort" ],"sortable": false,"searchable": false },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-3 / +3 lines)
Lines 4-10 Link Here
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE Categories %]
6
[% USE Categories %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% USE ItemTypes %]
8
[% USE ItemTypes %]
9
[% USE Price %]
9
[% USE Price %]
10
[% USE AuthorisedValues %]
10
[% USE AuthorisedValues %]
Lines 1049-1056 Link Here
1049
        var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
1049
        var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
1050
        var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
1050
        var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
1051
1051
1052
        columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1052
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1053
        columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
1053
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
1054
1054
1055
        [% IF borrowernumber and patron %]
1055
        [% IF borrowernumber and patron %]
1056
            if($.cookie("holdfor") != [% patron.borrowernumber | html %]){
1056
            if($.cookie("holdfor") != [% patron.borrowernumber | html %]){
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[%- USE Price -%]
5
[%- USE Price -%]
6
[%- USE ItemTypes -%]
6
[%- USE ItemTypes -%]
7
[%- USE Categories -%]
7
[%- USE Categories -%]
8
[%- USE ColumnsSettings -%]
8
[%- USE TablesSettings -%]
9
[% SET footerjs = 1 %]
9
[% SET footerjs = 1 %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
11
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate | html %]</title>
11
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate | html %]</title>
Lines 278-284 Link Here
278
        }
278
        }
279
279
280
        $(document).ready(function(){
280
        $(document).ready(function(){
281
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %];
281
            var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %];
282
            KohaTable("overduest", {
282
            KohaTable("overduest", {
283
                "sPaginationType": "full",
283
                "sPaginationType": "full",
284
                "aaSorting": [[0, 'asc']],
284
                "aaSorting": [[0, 'asc']],
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% USE KohaDates %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[%- USE Branches -%]
7
[%- USE Branches -%]
8
[%- USE ItemTypes -%]
8
[%- USE ItemTypes -%]
Lines 246-252 Link Here
246
    [% INCLUDE 'columns_settings.inc' %]
246
    [% INCLUDE 'columns_settings.inc' %]
247
    <script>
247
    <script>
248
        $(document).ready(function() {
248
        $(document).ready(function() {
249
          var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
249
          var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
250
          var holdst = KohaTable("holdst", {
250
          var holdst = KohaTable("holdst", {
251
            "aoColumnDefs": [
251
            "aoColumnDefs": [
252
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
252
                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt (-2 / +2 lines)
Lines 4-10 Link Here
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
10
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
Lines 169-175 Link Here
169
    [% INCLUDE 'datatables.inc' %]
169
    [% INCLUDE 'datatables.inc' %]
170
    [% INCLUDE 'columns_settings.inc' %]
170
    [% INCLUDE 'columns_settings.inc' %]
171
    <script>
171
    <script>
172
        var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
172
        var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
173
        $(document).ready(function() {
173
        $(document).ready(function() {
174
            $(".ratiolimit").on("click", function(e) {
174
            $(".ratiolimit").on("click", function(e) {
175
                e.preventDefault();
175
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +2 lines)
Lines 6-12 Link Here
6
[% USE Borrowers %]
6
[% USE Borrowers %]
7
[% USE ItemTypes %]
7
[% USE ItemTypes %]
8
[% USE AuthorisedValues %]
8
[% USE AuthorisedValues %]
9
[% USE ColumnsSettings %]
9
[% USE TablesSettings %]
10
[% SET footerjs = 1 %]
10
[% SET footerjs = 1 %]
11
[% BLOCK display_bormessagepref %]
11
[% BLOCK display_bormessagepref %]
12
    [% IF ( bormessagepref ) %]
12
    [% IF ( bormessagepref ) %]
Lines 940-946 Link Here
940
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | uri %]&amp;biblionumber=[% biblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]');
940
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber | uri %]&amp;biblionumber=[% biblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]');
941
            [% END %]
941
            [% END %]
942
942
943
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
943
            var columns_settings = [% TablesSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
944
            var returns_table = KohaTable("checkedintable", {
944
            var returns_table = KohaTable("checkedintable", {
945
                    "bFilter":false,
945
                    "bFilter":false,
946
                    "bPaginate":false,
946
                    "bPaginate":false,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE ItemTypes %]
5
[% USE ItemTypes %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% USE Koha %]
9
[% USE Koha %]
10
[% SET footerjs = 1 %]
10
[% SET footerjs = 1 %]
11
[% INCLUDE 'doc-head-open.inc' %]
11
[% INCLUDE 'doc-head-open.inc' %]
Lines 228-234 Link Here
228
            };
228
            };
229
            $('#holdst thead input').on('change keyup keydown', filterColumn);
229
            $('#holdst thead input').on('change keyup keydown', filterColumn);
230
230
231
            var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
231
            var columns_settings = [% TablesSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
232
            var holdst = KohaTable("holdst", {
232
            var holdst = KohaTable("holdst", {
233
                "aaSorting": [[ 3, "asc" ]],
233
                "aaSorting": [[ 3, "asc" ]],
234
                "aoColumns": [
234
                "aoColumns": [
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-2 / +2 lines)
Lines 3-9 Link Here
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE ItemTypes %]
4
[% USE ItemTypes %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Course reserves &rsaquo; Course details for [% course.course_name | html %]</title>
9
<title>Koha &rsaquo; Course reserves &rsaquo; Course details for [% course.course_name | html %]</title>
Lines 245-251 Link Here
245
    [% INCLUDE 'datatables.inc' %]
245
    [% INCLUDE 'datatables.inc' %]
246
    [% INCLUDE 'columns_settings.inc' %]
246
    [% INCLUDE 'columns_settings.inc' %]
247
    <script>
247
    <script>
248
        var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
248
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
249
        $(document).ready(function(){
249
        $(document).ready(function(){
250
            var rtable = KohaTable("course_reserves_table", {
250
            var rtable = KohaTable("course_reserves_table", {
251
                "sPaginationType": "full",
251
                "sPaginationType": "full",
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Course reserves</title>
7
<title>Koha &rsaquo; Course reserves</title>
Lines 79-85 Link Here
79
    [% INCLUDE 'datatables.inc' %]
79
    [% INCLUDE 'datatables.inc' %]
80
    [% INCLUDE 'columns_settings.inc' %]
80
    [% INCLUDE 'columns_settings.inc' %]
81
    <script>
81
    <script>
82
        var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
82
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'courses', 'course_reserves_table', 'json' ) | $raw %];
83
        $(document).ready(function() {
83
        $(document).ready(function() {
84
            var ctable = KohaTable("course_reserves_table", {
84
            var ctable = KohaTable("course_reserves_table", {
85
                "sPaginationType": "full",
85
                "sPaginationType": "full",
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% USE Price %]
9
[% USE Price %]
10
10
11
[% INCLUDE 'doc-head-open.inc' %]
11
[% INCLUDE 'doc-head-open.inc' %]
Lines 538-544 Link Here
538
    <script>
538
    <script>
539
        var prefilters = '[% prefilters | $raw %]';
539
        var prefilters = '[% prefilters | $raw %]';
540
        // Set column settings
540
        // Set column settings
541
        var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
541
        var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
542
    </script>
542
    </script>
543
    [% INCLUDE 'ill-list-table-strings.inc' %]
543
    [% INCLUDE 'ill-list-table-strings.inc' %]
544
    [% Asset.js("js/ill-list-table.js") | $raw %]
544
    [% Asset.js("js/ill-list-table.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-2 / +2 lines)
Lines 3-9 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE Price %]
8
[% USE Price %]
9
[% USE Branches %]
9
[% USE Branches %]
Lines 126-132 Link Here
126
126
127
            var txtActivefilter = _("Filter paid transactions");
127
            var txtActivefilter = _("Filter paid transactions");
128
            var txtInactivefilter = _("Show all transactions");
128
            var txtInactivefilter = _("Show all transactions");
129
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %];
129
            var columns_settings = [% TablesSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %];
130
            var table_account_fines = KohaTable("table_account_fines", {
130
            var table_account_fines = KohaTable("table_account_fines", {
131
                "sPaginationType": "full",
131
                "sPaginationType": "full",
132
                'aaSorting': [[0, 'desc']],
132
                'aaSorting': [[0, 'desc']],
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-2 / +2 lines)
Lines 4-10 Link Here
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% USE ItemTypes %]
8
[% USE ItemTypes %]
9
[% SET footerjs = 1 %]
9
[% SET footerjs = 1 %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
Lines 130-136 Link Here
130
    [% Asset.js("js/members-menu.js") | $raw %]
130
    [% Asset.js("js/members-menu.js") | $raw %]
131
    <script>
131
    <script>
132
        $(document).ready(function() {
132
        $(document).ready(function() {
133
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
133
            var columns_settings = [% TablesSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
134
            [% UNLESS show_itemtype_column %]
134
            [% UNLESS show_itemtype_column %]
135
              //Remove item type column settings
135
              //Remove item type column settings
136
              columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
136
              columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
9
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
11
<title>Koha &rsaquo; Patrons &rsaquo; ILL requests history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
11
<title>Koha &rsaquo; Patrons &rsaquo; ILL requests history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
Lines 47-53 Link Here
47
        <script>
47
        <script>
48
            var prefilters = '[% prefilters | html %]';
48
            var prefilters = '[% prefilters | html %]';
49
            // Set column settings
49
            // Set column settings
50
            var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
50
            var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
51
        </script>
51
        </script>
52
        [% INCLUDE 'ill-list-table-strings.inc' %]
52
        [% INCLUDE 'ill-list-table-strings.inc' %]
53
        [% Asset.js("js/ill-list-table.js") | $raw %]
53
        [% Asset.js("js/ill-list-table.js") | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE Categories %]
6
[% USE Categories %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
Lines 401-407 Link Here
401
            });
401
            });
402
402
403
            // Apply DataTables on the results table
403
            // Apply DataTables on the results table
404
            var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %];
404
            var columns_settings = [% TablesSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %];
405
            [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %]
405
            [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %]
406
                [%# Remove the first column if we do not display the checkbox %]
406
                [%# Remove the first column if we do not display the checkbox %]
407
                columns_settings.splice(0, 1);
407
                columns_settings.splice(0, 1);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +2 lines)
Lines 4-10 Link Here
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% USE Price %]
8
[% USE Price %]
9
[% SET footerjs = 1 %]
9
[% SET footerjs = 1 %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
Lines 881-887 Link Here
881
        var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
881
        var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
882
        var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
882
        var MSG_CONFIRM_DELETE_MESSAGE = _("Are you sure you want to delete this message? This cannot be undone.");
883
883
884
        columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
884
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
885
885
886
        $(document).ready(function() {
886
        $(document).ready(function() {
887
            if ( $('#clubs-tab').length ) {
887
            if ( $('#clubs-tab').length ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-2 / +2 lines)
Lines 4-10 Link Here
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE Price %]
6
[% USE Price %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% USE KohaDates %]
8
[% USE KohaDates %]
9
[% SET footerjs = 1 %]
9
[% SET footerjs = 1 %]
10
[% PROCESS 'accounts.inc' %]
10
[% PROCESS 'accounts.inc' %]
Lines 219-225 Link Here
219
                $(".add-note").show();
219
                $(".add-note").show();
220
            });
220
            });
221
221
222
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %];
222
            var columns_settings = [% TablesSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %];
223
            KohaTable("finest", {
223
            KohaTable("finest", {
224
                "columnDefs": [
224
                "columnDefs": [
225
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
225
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-2 / +2 lines)
Lines 4-10 Link Here
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
10
<title>Circulation History for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
Lines 131-137 Link Here
131
    [% INCLUDE 'columns_settings.inc' %]
131
    [% INCLUDE 'columns_settings.inc' %]
132
    <script id="js">
132
    <script id="js">
133
        $(document).ready(function() {
133
        $(document).ready(function() {
134
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %];
134
            var columns_settings = [% TablesSettings.GetColumns('members', 'checkouthistory', 'checkouthistory-table', 'json') %];
135
            var table = KohaTable("table_readingrec", {
135
            var table = KohaTable("table_readingrec", {
136
                "sPaginationType": "full",
136
                "sPaginationType": "full",
137
                "aaSorting": [[10, 'desc']],
137
                "aaSorting": [[10, 'desc']],
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt (-2 / +2 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ColumnsSettings %]
4
[% USE TablesSettings %]
5
[% SET footerjs = 1 %]
5
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'columns_settings.inc' %]
7
[% INCLUDE 'columns_settings.inc' %]
Lines 186-192 Link Here
186
        $(document).ready(function() {
186
        $(document).ready(function() {
187
            $('#patrons_to_add_fieldset').hide();
187
            $('#patrons_to_add_fieldset').hide();
188
188
189
                var columns_settings_table = [% ColumnsSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
189
                var columns_settings_table = [% TablesSettings.GetColumns('members', 'patron-lists', 'patron-list-table', 'json') | $raw %]
190
                KohaTable('patron-list-table', {
190
                KohaTable('patron-list-table', {
191
                    "order": [[ 3, "asc" ]],
191
                    "order": [[ 3, "asc" ]],
192
                    "aoColumns": [
192
                    "aoColumns": [
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% USE JSON.Escape %]
6
[% USE JSON.Escape %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
8
Lines 1280-1286 canned reports and writing custom SQL reports.</p> Link Here
1280
            [% END %]
1280
            [% END %]
1281
1281
1282
            $('[data-toggle="tooltip"]').tooltip();
1282
            $('[data-toggle="tooltip"]').tooltip();
1283
            var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
1283
            var columns_settings = [% TablesSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
1284
1284
1285
            $('#limit').change(function() {
1285
            $('#limit').change(function() {
1286
                $('#limitselect').submit();
1286
                $('#limitselect').submit();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE AuthorisedValues %]
3
[% USE AuthorisedValues %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% USE KohaDates %]
6
[% USE KohaDates %]
7
[% USE ItemTypes %]
7
[% USE ItemTypes %]
8
[% USE Price %]
8
[% USE Price %]
Lines 194-200 Link Here
194
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
194
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
195
    <script>
195
    <script>
196
        $(document).ready(function() {
196
        $(document).ready(function() {
197
            var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
197
            var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
198
            var lostitems_table = KohaTable("lostitems-table", {
198
            var lostitems_table = KohaTable("lostitems-table", {
199
                "dom": 'B<"clearfix">t',
199
                "dom": 'B<"clearfix">t',
200
                "aaSorting": [],
200
                "aaSorting": [],
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +1 lines)
Lines 959-965 Link Here
959
            itemAlreadyOnHold: _("Patron already has hold for this item"),
959
            itemAlreadyOnHold: _("Patron already has hold for this item"),
960
            cannotBeTransferred: _("Cannot be transferred to pickup library")
960
            cannotBeTransferred: _("Cannot be transferred to pickup library")
961
        }
961
        }
962
        columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
962
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
963
963
964
        $(document).ready(function() {
964
        $(document).ready(function() {
965
            [% UNLESS clubs %]
965
            [% UNLESS clubs %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE Branches %]
5
[% USE Branches %]
6
[% USE AuthorisedValues %]
6
[% USE AuthorisedValues %]
7
[% USE Price %]
7
[% USE Price %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% SET footerjs = 1 %]
9
[% SET footerjs = 1 %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
11
<title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title>
11
<title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title>
Lines 513-519 Link Here
513
                return false;
513
                return false;
514
            })
514
            })
515
515
516
            var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
516
            var columns_settings = [% TablesSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
517
            var table = KohaTable("orders", {
517
            var table = KohaTable("orders", {
518
                "aoColumnDefs": [
518
                "aoColumnDefs": [
519
                    { "bVisible": false, "aTargets": [ 'NoVisible' ] },
519
                    { "bVisible": false, "aTargets": [ 'NoVisible' ] },
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
<title>
8
<title>
Lines 552-558 Link Here
552
        var MSG_EMPTY_TEMPLATES = _("Please fill at least one template.");
552
        var MSG_EMPTY_TEMPLATES = _("Please fill at least one template.");
553
        var MSG_LOADING = _("Loading");
553
        var MSG_LOADING = _("Loading");
554
        var MSG_NO_NOTICE_FOUND = _("No matching notices found");
554
        var MSG_NO_NOTICE_FOUND = _("No matching notices found");
555
        var columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %];
555
        var columns_settings = [% TablesSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %];
556
     </script>
556
     </script>
557
    [% Asset.js("js/letter.js") | $raw %]
557
    [% Asset.js("js/letter.js") | $raw %]
558
[% END %]
558
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt (-3 / +3 lines)
Lines 3-9 Link Here
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE ColumnsSettings %]
6
[% USE TablesSettings %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
<title>Koha &rsaquo; Stock rotation</title>
9
<title>Koha &rsaquo; Stock rotation</title>
Lines 573-580 Link Here
573
    [% INCLUDE 'columns_settings.inc' %]
573
    [% INCLUDE 'columns_settings.inc' %]
574
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
574
    [% Asset.js("js/pages/stockrotation.js") | $raw %]
575
    <script>
575
    <script>
576
        var stock_rotation_items_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
576
        var stock_rotation_items_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation_manage_items', 'json' ) | $raw %];
577
        var stock_rotation_columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
577
        var stock_rotation_columns_settings = [% TablesSettings.GetColumns( 'tools', 'stockrotation', 'stock_rotation', 'json' ) | $raw %];
578
        $("#addStageModal, #addItemsModal").on("shown.bs.modal", function(){
578
        $("#addStageModal, #addItemsModal").on("shown.bs.modal", function(){
579
            $("#branch, #barcode").focus();
579
            $("#branch, #barcode").focus();
580
        });
580
        });
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/columns_settings.inc (-1 / +1 lines)
Lines 1-4 Link Here
1
[% USE ColumnsSettings %]
1
[% USE TablesSettings %]
2
2
3
<script>
3
<script>
4
function KohaTable(selector, dt_parameters, columns_settings) {
4
function KohaTable(selector, dt_parameters, columns_settings) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-3 / +3 lines)
Lines 4-10 Link Here
4
[% USE Koha %]
4
[% USE Koha %]
5
[% USE KohaDates %]
5
[% USE KohaDates %]
6
[% USE Branches %]
6
[% USE Branches %]
7
[% USE ColumnsSettings %]
7
[% USE TablesSettings %]
8
[% USE AuthorisedValues %]
8
[% USE AuthorisedValues %]
9
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %]
9
[% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %]
10
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %]
10
[% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %]
Lines 1500-1506 Link Here
1500
            });
1500
            });
1501
        [% END %]
1501
        [% END %]
1502
1502
1503
        var columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1503
        var columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1504
1504
1505
        KohaTable("#holdingst", {
1505
        KohaTable("#holdingst", {
1506
            dom: '<"clearfix">t',
1506
            dom: '<"clearfix">t',
Lines 1522-1528 Link Here
1522
            "autoWidth": false
1522
            "autoWidth": false
1523
        }, columns_settings);
1523
        }, columns_settings);
1524
1524
1525
        var serial_column_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1525
        var serial_column_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1526
1526
1527
        KohaTable("#subscriptionst", {
1527
        KohaTable("#subscriptionst", {
1528
            dom: '<"clearfix">t',
1528
            dom: '<"clearfix">t',
(-)a/t/db_dependent/ColumnsSettings.t (-6 / +5 lines)
Lines 5-11 use Test::More tests => 2; Link Here
5
use Test::MockModule;
5
use Test::MockModule;
6
6
7
use C4::Context;
7
use C4::Context;
8
use C4::Utils::DataTables::ColumnsSettings;
8
use C4::Utils::DataTables::TablesSettings;
9
use Koha::Database;
9
use Koha::Database;
10
10
11
my $schema = Koha::Database->new->schema;
11
my $schema = Koha::Database->new->schema;
Lines 14-20 my $dbh = C4::Context->dbh; Link Here
14
14
15
$dbh->do(q|DELETE FROM columns_settings|);
15
$dbh->do(q|DELETE FROM columns_settings|);
16
16
17
my $module = new Test::MockModule('C4::Utils::DataTables::ColumnsSettings');
17
my $module = new Test::MockModule('C4::Utils::DataTables::TablesSettings');
18
$module->mock(
18
$module->mock(
19
    'get_yaml',
19
    'get_yaml',
20
    sub {
20
    sub {
Lines 58-64 $module->mock( Link Here
58
    }
58
    }
59
);
59
);
60
60
61
C4::Utils::DataTables::ColumnsSettings::update_columns(
61
C4::Utils::DataTables::TablesSettings::update_columns(
62
    {
62
    {
63
        columns => [
63
        columns => [
64
            {
64
            {
Lines 114-120 C4::Utils::DataTables::ColumnsSettings::update_columns( Link Here
114
    }
114
    }
115
);
115
);
116
116
117
my $modules = C4::Utils::DataTables::ColumnsSettings::get_modules();
117
my $modules = C4::Utils::DataTables::TablesSettings::get_modules();
118
118
119
my $modules_expected = {
119
my $modules_expected = {
120
    'admin' => {
120
    'admin' => {
Lines 173-179 for my $m ( keys %$modules ) { Link Here
173
    for my $p ( keys %{ $modules->{$m} } ) {
173
    for my $p ( keys %{ $modules->{$m} } ) {
174
        for my $t ( keys %{ $modules->{$m}{$p} } ) {
174
        for my $t ( keys %{ $modules->{$m}{$p} } ) {
175
            my $columns =
175
            my $columns =
176
              C4::Utils::DataTables::ColumnsSettings::get_columns( $m, $p, $t );
176
              C4::Utils::DataTables::TablesSettings::get_columns( $m, $p, $t );
177
            is_deeply(
177
            is_deeply(
178
                $columns,
178
                $columns,
179
                $modules->{$m}{$p}{$t},
179
                $modules->{$m}{$p}{$t},
180
- 

Return to bug 24156