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

(-)a/C4/Utils/DataTables/TablesSettings.pm (+16 lines)
Lines 59-64 sub get_columns { Link Here
59
    return $columns;
59
    return $columns;
60
}
60
}
61
61
62
=head3 get_table_settings
63
64
my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings(
65
    {
66
        module                 => $module,
67
        pag                    => $page,
68
        tablename              => $tablename,
69
    }
70
);
71
72
Returns the settings for a given table.
73
74
The settings are default_display_length and default_sort_order.
75
76
=cut
77
62
sub get_table_settings {
78
sub get_table_settings {
63
    my ( $module, $page, $tablename ) = @_;
79
    my ( $module, $page, $tablename ) = @_;
64
    my $list = get_yaml;
80
    my $list = get_yaml;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt (-1 / +1 lines)
Lines 3-9 Link Here
3
[% USE TablesSettings %]
3
[% USE TablesSettings %]
4
[% SET footerjs = 1 %]
4
[% SET footerjs = 1 %]
5
[% SET panel_id = 0 %]
5
[% SET panel_id = 0 %]
6
[% USE Dumper %]
7
[% BLOCK pagelist %]
6
[% BLOCK pagelist %]
8
    [% IF module.keys and module.keys.size > 0 %]
7
    [% IF module.keys and module.keys.size > 0 %]
9
        Jump to:
8
        Jump to:
Lines 101-106 Link Here
101
                                            [% IF table_settings.default_display_length == 10 %]
100
                                            [% IF table_settings.default_display_length == 10 %]
102
                                                <option value="10" selected="selected">10</option>
101
                                                <option value="10" selected="selected">10</option>
103
                                            [% ELSE %]
102
                                            [% ELSE %]
103
                                                <option value="10">10</option>
104
                                            [% END %]
104
                                            [% END %]
105
                                            [% IF table_settings.default_display_length == 20 %]
105
                                            [% IF table_settings.default_display_length == 20 %]
106
                                                <option value="20" selected="selected">20</option>
106
                                                <option value="20" selected="selected">20</option>
(-)a/t/db_dependent/Koha/Template/Plugin/ColumnsSettings.t (-3 / +2 lines)
Lines 10-19 use Test::More tests => 3; Link Here
10
use t::lib::Mocks;
10
use t::lib::Mocks;
11
11
12
BEGIN {
12
BEGIN {
13
    use_ok('Koha::Template::Plugin::ColumnsSettings', "Can use Koha::Template::Plugin::ColumnsSettings");
13
    use_ok('Koha::Template::Plugin::TablesSettings', "Can use Koha::Template::Plugin::TablesSettings");
14
}
14
}
15
15
16
ok( my $settings = Koha::Template::Plugin::ColumnsSettings->new(), 'Able to instantiate template plugin' );
16
ok( my $settings = Koha::Template::Plugin::TablesSettings->new(), 'Able to instantiate template plugin' );
17
17
18
subtest "is_hidden" => sub {
18
subtest "is_hidden" => sub {
19
    plan tests => 2;
19
    plan tests => 2;
20
- 

Return to bug 24156