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 (-12 / +12 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 19-46 package Koha::Template::Plugin::ColumnsSettings; Link Here
19
19
20
=head1 NAME
20
=head1 NAME
21
21
22
Koha::Template::Plugin::ColumnsSettings
22
Koha::Template::Plugin::TablesSettings
23
23
24
=head2 SYNOPSYS
24
=head2 SYNOPSYS
25
25
26
    [% USE ColumnsSettings %]
26
    [% USE TablesSettings %]
27
27
28
    . . .
28
    . . .
29
29
30
    [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %]
30
    [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
31
        <th id="column" data-colname="column">Column title</th>
31
        <th id="column" data-colname="column">Column title</th>
32
    [% END %]
32
    [% END %]
33
33
34
    . . .
34
    . . .
35
35
36
    [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %]
36
    [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
37
        <td>[% row.column %]</td>
37
        <td>[% row.column %]</td>
38
    [% END %]
38
    [% END %]
39
39
40
    . . .
40
    . . .
41
41
42
    <script>
42
    <script>
43
        var columns_settings = [% ColumnsSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %];
43
        var columns_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %];
44
        var table = KohaTable("id", { "bAutoWidth": false }, columns_settings );
44
        var table = KohaTable("id", { "bAutoWidth": false }, columns_settings );
45
    </script>
45
    </script>
46
46
Lines 58-72 use YAML qw( LoadFile ); Link Here
58
use JSON qw( to_json );
58
use JSON qw( to_json );
59
59
60
use C4::Context qw( config );
60
use C4::Context qw( config );
61
use C4::Utils::DataTables::ColumnsSettings;
61
use C4::Utils::DataTables::TablesSettings;
62
62
63
=head1 FUNCTIONS
63
=head1 FUNCTIONS
64
64
65
=head2 GetColumns
65
=head2 GetColumns
66
66
67
    <script>
67
    <script>
68
        var columns_settings = [% ColumnsSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %];
68
        var tables_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %];
69
        var table = KohaTable("id", { "bAutoWidth": false }, columns_settings );
69
        var table = KohaTable("id", { "bAutoWidth": false }, tables_settings );
70
    </script>
70
    </script>
71
71
72
Used to get the full column settings configuration for datatables, usually requires a format of 'json' to pass into
72
Used to get the full column settings configuration for datatables, usually requires a format of 'json' to pass into
Lines 78-84 sub GetColumns { Link Here
78
    my ( $self, $module, $page, $table, $format ) = @_;
78
    my ( $self, $module, $page, $table, $format ) = @_;
79
    $format //= q{};
79
    $format //= q{};
80
80
81
    my $columns = C4::Utils::DataTables::ColumnsSettings::get_columns( $module, $page, $table );
81
    my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table );
82
82
83
    return $format eq 'json'
83
    return $format eq 'json'
84
        ? to_json( $columns )
84
        ? to_json( $columns )
Lines 87-93 sub GetColumns { Link Here
87
87
88
=head2 is_hidden
88
=head2 is_hidden
89
89
90
    [% UNLESS ColumnsSettings.is_hidden( 'module', 'page', 'table', 'column') %]
90
    [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %]
91
        <th id="column" data-colname="column">Column title</th>
91
        <th id="column" data-colname="column">Column title</th>
92
    [% END %]
92
    [% END %]
93
93
Lines 98-104 it may contain confidential information and should be fully hidden rather than j Link Here
98
98
99
sub is_hidden {
99
sub is_hidden {
100
    my ( $self, $module, $page, $table, $column_name ) = @_;
100
    my ( $self, $module, $page, $table, $column_name ) = @_;
101
    my $columns = C4::Utils::DataTables::ColumnsSettings::get_columns( $module, $page, $table );
101
    my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table );
102
    foreach my $keys(@$columns){
102
    foreach my $keys(@$columns){
103
        if($keys->{'columnname'} eq $column_name){
103
        if($keys->{'columnname'} eq $column_name){
104
            return $keys->{'is_hidden'};
104
            return $keys->{'is_hidden'};
(-)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 / +2 lines)
Lines 1-5 Link Here
1
[% USE ColumnsSettings %]
1
[% USE TablesSettings %]
2
<!-- columns_settings.inc -->
2
<!-- columns_settings.inc -->
3
3
<script>
4
<script>
4
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
5
function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) {
5
    var counter = 0;
6
    var counter = 0;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc (-1 / +1 lines)
Lines 20-25 Link Here
20
    var MSG_CONFIRM_DELETE_ITEM = _("Are you sure you want to delete this item?");
20
    var MSG_CONFIRM_DELETE_ITEM = _("Are you sure you want to delete this item?");
21
    var MSG_CONFIRM_ADD_ITEM = _("Are you sure you want to add a new item? Any changes made on this page will be lost.");
21
    var MSG_CONFIRM_ADD_ITEM = _("Are you sure you want to add a new item? Any changes made on this page will be lost.");
22
    var MSG_CONFIRM_SAVE = _("Are you sure you want to save?");
22
    var MSG_CONFIRM_SAVE = _("Are you sure you want to save?");
23
    var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %];
23
    var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'additem', 'itemst', 'json' ) | $raw %];
24
</script>
24
</script>
25
<!-- / str/cataloging_additem.inc -->
25
<!-- / str/cataloging_additem.inc -->
(-)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 924-930 Link Here
924
        [% END %]
924
        [% END %]
925
    [% END %]
925
    [% END %]
926
    <script>
926
    <script>
927
        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
927
        var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
928
        $(document).ready(function() {
928
        $(document).ready(function() {
929
            KohaTable("orders", {
929
            KohaTable("orders", {
930
                [% IF ( active ) %]
930
                [% 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
[% USE Price %]
6
[% USE Price %]
7
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
Lines 289-295 Link Here
289
289
290
        $(document).ready(function() {
290
        $(document).ready(function() {
291
291
292
            var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
292
            var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'lateorders', 'late_orders', 'json' ) | $raw %];
293
            late_orderst = KohaTable("late_orders", {
293
            late_orderst = KohaTable("late_orders", {
294
                "aoColumnDefs": [
294
                "aoColumnDefs": [
295
                    { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
295
                    { "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 483-489 Item types administration Link Here
483
    <script>
483
    <script>
484
         $(document).ready(function() {
484
         $(document).ready(function() {
485
            $('#icons').tabs();
485
            $('#icons').tabs();
486
            var columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
486
            var columns_settings = [% TablesSettings.GetColumns( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
487
            [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %]
487
            [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %]
488
                columns_settings.shift(); // Remove item type image column from configuration
488
                columns_settings.shift(); // Remove item type image column from configuration
489
            [% END %]
489
            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-3 / +3 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
[% PROCESS 'i18n.inc' %]
9
[% PROCESS 'i18n.inc' %]
10
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
10
[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
11
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
11
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
Lines 1122-1128 Note that permanent location is a code, and location may be an authval. Link Here
1122
1122
1123
        $(document).ready(function() {
1123
        $(document).ready(function() {
1124
            var ids = ['holdings_table', 'otherholdings_table'];
1124
            var ids = ['holdings_table', 'otherholdings_table'];
1125
            var columns_settings = [ [% ColumnsSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% ColumnsSettings.GetColumns('catalogue', 'detail','otherholdings_table','json')  | $raw %] ];
1125
            var columns_settings = [ [% TablesSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetColumns('catalogue', 'detail','otherholdings_table','json')  | $raw %] ];
1126
            for (var i in ids) {
1126
            for (var i in ids) {
1127
                var id = ids[i];
1127
                var id = ids[i];
1128
                var dt_parameters = {
1128
                var dt_parameters = {
Lines 1140-1146 Note that permanent location is a code, and location may be an authval. Link Here
1140
            }
1140
            }
1141
1141
1142
            [% IF Koha.Preference('AcquisitionDetails') %]
1142
            [% IF Koha.Preference('AcquisitionDetails') %]
1143
                var columns_settings = [% ColumnsSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
1143
                var columns_settings = [% TablesSettings.GetColumns('catalogue', 'detail', 'acquisitiondetails-table', 'json') %];
1144
                var acquisitiondetails_table = KohaTable("orders", {
1144
                var acquisitiondetails_table = KohaTable("orders", {
1145
                    "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1145
                    "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
1146
                    'bPaginate': false,
1146
                    '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 242-248 Link Here
242
    [% INCLUDE 'columns_settings.inc' %]
242
    [% INCLUDE 'columns_settings.inc' %]
243
    <script>
243
    <script>
244
        $(document).ready(function(){
244
        $(document).ready(function(){
245
            var columns_settings = [% ColumnsSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
245
            var columns_settings = [% TablesSettings.GetColumns( 'cataloguing', 'z3950_search', 'resultst', 'json' ) | $raw %];
246
            var thetable = KohaTable("resultst", {
246
            var thetable = KohaTable("resultst", {
247
                "aoColumnDefs": [
247
                "aoColumnDefs": [
248
                    { "targets": [ "NoSort" ],"sortable": false,"searchable": false },
248
                    { "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 1066-1073 Link Here
1066
    [% Asset.js("js/holds.js") | $raw %]
1066
    [% Asset.js("js/holds.js") | $raw %]
1067
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
1067
    [% Asset.js("js/circ-patron-search-results.js") | $raw %]
1068
    <script>
1068
    <script>
1069
        columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1069
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1070
        columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
1070
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
1071
1071
1072
        [% IF borrowernumber and patron %]
1072
        [% IF borrowernumber and patron %]
1073
            if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){
1073
            if( Cookies.get("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 178-184 Link Here
178
    [% INCLUDE 'datatables.inc' %]
178
    [% INCLUDE 'datatables.inc' %]
179
    [% INCLUDE 'columns_settings.inc' %]
179
    [% INCLUDE 'columns_settings.inc' %]
180
    <script>
180
    <script>
181
        var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
181
        var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
182
        $(document).ready(function() {
182
        $(document).ready(function() {
183
            $(".ratiolimit").on("click", function(e) {
183
            $(".ratiolimit").on("click", function(e) {
184
                e.preventDefault();
184
                e.preventDefault();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE Koha %]
5
[% USE Koha %]
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% PROCESS 'member-display-address-style.inc' %]
9
[% PROCESS 'member-display-address-style.inc' %]
10
[% SET footerjs = 1 %]
10
[% SET footerjs = 1 %]
11
[% BLOCK display_bormessagepref %]
11
[% BLOCK display_bormessagepref %]
Lines 933-939 Link Here
933
                Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
933
                Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
934
            [% END %]
934
            [% END %]
935
935
936
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
936
            var columns_settings = [% TablesSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
937
            var returns_table = KohaTable("checkedintable", {
937
            var returns_table = KohaTable("checkedintable", {
938
                    "bFilter":false,
938
                    "bFilter":false,
939
                    "bPaginate":false,
939
                    "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/circ/waitingreserves.tt (-3 / +3 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; Circulation &rsaquo; Holds awaiting pickup</title>
9
<title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
Lines 123-130 Link Here
123
    [% INCLUDE 'datatables.inc' %]
123
    [% INCLUDE 'datatables.inc' %]
124
    [% INCLUDE 'columns_settings.inc' %]
124
    [% INCLUDE 'columns_settings.inc' %]
125
    <script>
125
    <script>
126
        var holdst_columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %];
126
        var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %];
127
        var holdso_columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %];
127
        var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %];
128
128
129
        $(document).ready(function() {
129
        $(document).ready(function() {
130
130
(-)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 269-275 Link Here
269
    [% INCLUDE 'datatables.inc' %]
269
    [% INCLUDE 'datatables.inc' %]
270
    [% INCLUDE 'columns_settings.inc' %]
270
    [% INCLUDE 'columns_settings.inc' %]
271
    <script>
271
    <script>
272
        var columns_settings = [% ColumnsSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
272
        var columns_settings = [% TablesSettings.GetColumns( 'coursereserves', 'reserves', 'course_reserves_table', 'json' ) | $raw %];
273
        $(document).ready(function(){
273
        $(document).ready(function(){
274
            var rtable = KohaTable("course_reserves_table", {
274
            var rtable = KohaTable("course_reserves_table", {
275
                "sPaginationType": "full",
275
                "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 772-778 Link Here
772
    <script>
772
    <script>
773
        var prefilters = '[% prefilters | $raw %]';
773
        var prefilters = '[% prefilters | $raw %]';
774
        // Set column settings
774
        // Set column settings
775
        var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
775
        var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
776
        $("#ill_checkout_duedate_input").datetimepicker({
776
        $("#ill_checkout_duedate_input").datetimepicker({
777
            hour: 23,
777
            hour: 23,
778
            minute: 59
778
            minute: 59
(-)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 313-319 Link Here
313
313
314
            var txtActivefilter = _("Filter paid transactions");
314
            var txtActivefilter = _("Filter paid transactions");
315
            var txtInactivefilter = _("Show all transactions");
315
            var txtInactivefilter = _("Show all transactions");
316
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %];
316
            var columns_settings = [% TablesSettings.GetColumns('members', 'fines', 'account-fines', 'json') | $raw %];
317
            var table_account_fines = KohaTable("table_account_fines", {
317
            var table_account_fines = KohaTable("table_account_fines", {
318
                "sPaginationType": "full",
318
                "sPaginationType": "full",
319
                'aaSorting': [[0, 'desc']],
319
                '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 50-56 Link Here
50
        <script>
50
        <script>
51
            var prefilters = '[% prefilters | html %]';
51
            var prefilters = '[% prefilters | html %]';
52
            // Set column settings
52
            // Set column settings
53
            var columns_settings = [% ColumnsSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
53
            var columns_settings = [% TablesSettings.GetColumns( 'illrequests', 'ill-requests', 'ill-requests', 'json' ) %];
54
        </script>
54
        </script>
55
        [% INCLUDE 'ill-list-table-strings.inc' %]
55
        [% INCLUDE 'ill-list-table-strings.inc' %]
56
        [% Asset.js("js/ill-list-table.js") | $raw %]
56
        [% 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 364-370 Link Here
364
            });
364
            });
365
365
366
            // Apply DataTables on the results table
366
            // Apply DataTables on the results table
367
            var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %];
367
            var columns_settings = [% TablesSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) | $raw %];
368
            [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %]
368
            [% UNLESS CAN_user_borrowers_edit_borrowers OR CAN_user_tools_manage_patron_lists %]
369
                [%# Remove the first column if we do not display the checkbox %]
369
                [%# Remove the first column if we do not display the checkbox %]
370
                columns_settings.splice(0, 1);
370
                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
[% PROCESS 'member-display-address-style.inc' %]
9
[% PROCESS 'member-display-address-style.inc' %]
10
[% PROCESS 'member-display-alt-address-style.inc' %]
10
[% PROCESS 'member-display-alt-address-style.inc' %]
Lines 907-913 Link Here
907
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
907
    [% Asset.js("js/messaging-preference-form.js") | $raw %]
908
    <script>
908
    <script>
909
909
910
        columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
910
        columns_settings_issues_table = [% TablesSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
911
911
912
        $(document).ready(function() {
912
        $(document).ready(function() {
913
913
(-)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 220-226 Link Here
220
                $(".add-note").show();
220
                $(".add-note").show();
221
            });
221
            });
222
222
223
            var columns_settings = [% ColumnsSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %];
223
            var columns_settings = [% TablesSettings.GetColumns('members', 'pay', 'pay-fines-table', 'json') | $raw %];
224
            KohaTable("finest", {
224
            KohaTable("finest", {
225
                "columnDefs": [
225
                "columnDefs": [
226
                    { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
226
                    { "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 1494-1500 Link Here
1494
            [% END %]
1494
            [% END %]
1495
1495
1496
            $('[data-toggle="tooltip"]').tooltip();
1496
            $('[data-toggle="tooltip"]').tooltip();
1497
            var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
1497
            var columns_settings = [% TablesSettings.GetColumns( 'reports', 'saved-sql', 'table_reports', 'json' ) | $raw %];
1498
1498
1499
            $('#limit').change(function() {
1499
            $('#limit').change(function() {
1500
                $('#limitselect').submit();
1500
                $('#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 958-964 Link Here
958
            itemAlreadyOnHold: _("Patron already has hold for this item"),
958
            itemAlreadyOnHold: _("Patron already has hold for this item"),
959
            cannotBeTransferred: _("Cannot be transferred to pickup library")
959
            cannotBeTransferred: _("Cannot be transferred to pickup library")
960
        }
960
        }
961
        columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
961
        columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
962
962
963
        $(document).ready(function() {
963
        $(document).ready(function() {
964
            [% SET active = clubs ? 1 : 0 %]
964
            [% SET active = clubs ? 1 : 0 %]
(-)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/suggestion/suggestion.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE KohaDates %]
6
[% USE KohaDates %]
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; Acquisitions  &rsaquo;
11
<title>Koha &rsaquo; Acquisitions  &rsaquo;
Lines 1004-1010 Link Here
1004
            $(document).ready(function() {
1004
            $(document).ready(function() {
1005
                $('#suggestiontabs').tabs();
1005
                $('#suggestiontabs').tabs();
1006
1006
1007
                columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1007
                columns_settings = [% TablesSettings.GetColumns( 'acqui', 'suggestions', 'suggestions', 'json' ) | $raw %]
1008
                [% FOREACH suggestion IN suggestions %]
1008
                [% FOREACH suggestion IN suggestions %]
1009
                    [% IF ( suggestion.suggestions_loop ) %]
1009
                    [% IF ( suggestion.suggestions_loop ) %]
1010
                        KohaTable("table_[% loop.count| html %]", {
1010
                        KohaTable("table_[% loop.count| html %]", {
(-)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 558-564 Link Here
558
        var MSG_EMPTY_TEMPLATES = _("Please fill at least one template.");
558
        var MSG_EMPTY_TEMPLATES = _("Please fill at least one template.");
559
        var MSG_LOADING = _("Loading");
559
        var MSG_LOADING = _("Loading");
560
        var MSG_NO_NOTICE_FOUND = _("No matching notices found");
560
        var MSG_NO_NOTICE_FOUND = _("No matching notices found");
561
        var columns_settings = [% ColumnsSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %];
561
        var columns_settings = [% TablesSettings.GetColumns( 'tools', 'notices', 'lettert', 'json' ) | $raw %];
562
     </script>
562
     </script>
563
    [% Asset.js("js/letter.js") | $raw %]
563
    [% Asset.js("js/letter.js") | $raw %]
564
[% END %]
564
[% 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-course-details.tt (-2 / +2 lines)
Lines 5-11 Link Here
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE Branches %]
7
[% USE Branches %]
8
[% USE ColumnsSettings %]
8
[% USE TablesSettings %]
9
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name | html %]</title>
10
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name | html %]</title>
11
[% INCLUDE 'doc-head-close.inc' %]
11
[% INCLUDE 'doc-head-close.inc' %]
Lines 110-116 Link Here
110
    [% INCLUDE 'columns_settings.inc' %]
110
    [% INCLUDE 'columns_settings.inc' %]
111
    <script>
111
    <script>
112
    $(document).ready(function() {
112
    $(document).ready(function() {
113
        columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
113
        columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course-items-table', 'json' ) | $raw %];
114
        KohaTable("#course-items-table", {
114
        KohaTable("#course-items-table", {
115
            "dom": '<"top"flp>rt<"clear">',
115
            "dom": '<"top"flp>rt<"clear">',
116
            "sorting": [[ 1, "asc" ]],
116
            "sorting": [[ 1, "asc" ]],
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt (-2 / +2 lines)
Lines 2-8 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
5
[% USE ColumnsSettings %]
5
[% USE TablesSettings %]
6
6
7
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
8
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses</title>
8
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Courses</title>
Lines 68-74 Link Here
68
    <script>
68
    <script>
69
69
70
    $(document).ready(function() {
70
    $(document).ready(function() {
71
        columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
71
        columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'course_reserves_table', 'json' ) | $raw %]
72
72
73
        KohaTable("#course_reserves_table", {
73
        KohaTable("#course_reserves_table", {
74
            "dom": '<"top"flp>rt<"clear">',
74
            "dom": '<"top"flp>rt<"clear">',
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-5 / +5 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 1148-1154 Link Here
1148
        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
1148
        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
1149
                <th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>[% END %]
1149
                <th id="item_shelving_location" data-colname="item_shelving_location" class="shelving_location">Shelving location</th>[% END %]
1150
                <th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th>
1150
                <th id="item_callnumber" data-colname="item_callnumber" class="call_no">Call number</th>
1151
        [% UNLESS ColumnsSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1151
        [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1152
                <th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>[% END %]
1152
                <th id="item_materials" data-colname="item_materials" class="materials">Materials specified</th>[% END %]
1153
        [% IF ( itemdata_enumchron ) %]
1153
        [% IF ( itemdata_enumchron ) %]
1154
                <th id="item_enumchron" data-colname="item_enumchron" class="vol_info">Vol info</th>[% END %]
1154
                <th id="item_enumchron" data-colname="item_enumchron" class="vol_info">Vol info</th>[% END %]
Lines 1252-1258 Link Here
1252
                            [% END %]
1252
                            [% END %]
1253
                        [% END %]
1253
                        [% END %]
1254
                    </td>
1254
                    </td>
1255
                    [% UNLESS ColumnsSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1255
                    [% UNLESS TablesSettings.is_hidden( 'opac', 'biblio-detail', 'holdingst', 'item_materials') %]
1256
                        <td class="materials">[% ITEM_RESULT.materials | html %]</td>
1256
                        <td class="materials">[% ITEM_RESULT.materials | html %]</td>
1257
                    [% END %]
1257
                    [% END %]
1258
                    [% IF ( itemdata_enumchron ) %]
1258
                    [% IF ( itemdata_enumchron ) %]
Lines 1463-1469 Link Here
1463
            });
1463
            });
1464
        [% END %]
1464
        [% END %]
1465
1465
1466
        var columns_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1466
        var columns_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %];
1467
1467
1468
        KohaTable("#holdingst", {
1468
        KohaTable("#holdingst", {
1469
            dom: '<"clearfix">t',
1469
            dom: '<"clearfix">t',
Lines 1485-1491 Link Here
1485
            "autoWidth": false
1485
            "autoWidth": false
1486
        }, columns_settings);
1486
        }, columns_settings);
1487
1487
1488
        var serial_column_settings = [% ColumnsSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1488
        var serial_column_settings = [% TablesSettings.GetColumns( 'opac', 'biblio-detail', 'subscriptionst', 'json' ) | $raw %];
1489
1489
1490
        KohaTable("#subscriptionst", {
1490
        KohaTable("#subscriptionst", {
1491
            dom: '<"clearfix">t',
1491
            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