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

(-)a/C4/Utils/DataTables/TablesSettings.pm (-5 / +14 lines)
Lines 7-12 use C4::Context; Link Here
7
use Koha::Database;
7
use Koha::Database;
8
use Koha::Caches;
8
use Koha::Caches;
9
9
10
=head1 NAME
11
12
C4::Utils::DataTables::TablesSettings - Koha DataTables Settings
13
14
=head1 API
15
16
=head2 Methods
17
18
=cut
19
10
sub get_yaml {
20
sub get_yaml {
11
    my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml';
21
    my $yml_path = C4::Context->config('intranetdir') . '/admin/columns_settings.yml';
12
    my $cache = Koha::Caches->get_instance();
22
    my $cache = Koha::Caches->get_instance();
Lines 61-73 sub get_columns { Link Here
61
71
62
=head3 get_table_settings
72
=head3 get_table_settings
63
73
64
my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings(
74
  my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings(
65
    {
75
    {
66
        module                 => $module,
76
        module                 => $module,
67
        pag                    => $page,
77
        pag                    => $page,
68
        tablename              => $tablename,
78
        tablename              => $tablename,
69
    }
79
    }
70
);
80
  );
71
81
72
Returns the settings for a given table.
82
Returns the settings for a given table.
73
83
Lines 140-146 sub update_columns { Link Here
140
150
141
=head3 update_table_settings
151
=head3 update_table_settings
142
152
143
C4::Utils::DataTables::TablesSettings::update_table_settings(
153
  C4::Utils::DataTables::TablesSettings::update_table_settings(
144
    {
154
    {
145
        module                 => $module,
155
        module                 => $module,
146
        pag                    => $page,
156
        pag                    => $page,
Lines 148-154 C4::Utils::DataTables::TablesSettings::update_table_settings( Link Here
148
        default_display_length => $default_display_length,
158
        default_display_length => $default_display_length,
149
        default_sort_order     => $default_sort_order
159
        default_sort_order     => $default_sort_order
150
    }
160
    }
151
);
161
  );
152
162
153
Will update the default_display_length and default_sort_order for the given table.
163
Will update the default_display_length and default_sort_order for the given table.
154
164
155
- 

Return to bug 29648