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

(-)a/Koha/Template/Plugin/TablesSettings.pm (-1 / +7 lines)
Lines 134-140 sub GetTableSettings { Link Here
134
    my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings( $module, $page, $table );
134
    my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings( $module, $page, $table );
135
    my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table );
135
    my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table );
136
136
137
    $settings->{columns} = $columns;
137
    $settings = {
138
        %$settings,
139
        columns => $columns,
140
        module  => $module,
141
        page    => $page,
142
        table   => $table,
143
    };
138
144
139
    return $format eq 'json'
145
    return $format eq 'json'
140
        ? to_json( $settings || {} )
146
        ? to_json( $settings || {} )
(-)a/admin/columns_settings.pl (-2 / +2 lines)
Lines 74-81 if ( $action eq 'save' ) { Link Here
74
if ( $action eq 'list' ) {
74
if ( $action eq 'list' ) {
75
    my $modules = C4::Utils::DataTables::TablesSettings::get_modules;
75
    my $modules = C4::Utils::DataTables::TablesSettings::get_modules;
76
    $template->param(
76
    $template->param(
77
        panel   => ( $input->param('panel') || 0 ),
77
        module_tab  => scalar $input->param('module'),
78
        modules => $modules,
78
        modules     => $modules,
79
    );
79
    );
80
}
80
}
81
81
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc (+11 lines)
Lines 153-158 function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { Link Here
153
        }
153
        }
154
    );
154
    );
155
155
156
    if ( CAN_user_parameters_manage_column_config ) {
157
        dt_parameters[ "buttons" ].push(
158
            {
159
                text: 'Configure this table',
160
                action: function() {
161
                    window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
162
                },
163
            }
164
        );
165
    }
166
156
    var table = $(selector);
167
    var table = $(selector);
157
    if ( add_filters ) {
168
    if ( add_filters ) {
158
        // Duplicate the table header row for columnFilter
169
        // Duplicate the table header row for columnFilter
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (+5 lines)
Lines 25-30 Link Here
25
25
26
<script>
26
<script>
27
var Koha = {};
27
var Koha = {};
28
[% IF CAN_user_parameters_manage_column_config %]
29
    var CAN_user_parameters_manage_column_config = 1;
30
[% ELSE %]
31
    var CAN_user_parameters_manage_column_config = 0;
32
[% END %]
28
</script>
33
</script>
29
34
30
[% IF lang && lang != 'en' %]
35
[% IF lang && lang != 'en' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/columns_settings.tt (-2 / +5 lines)
Lines 3-21 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
[% SET panel = 0 %]
6
[% BLOCK pagelist %]
7
[% BLOCK pagelist %]
7
    [% IF module.keys and module.keys.size > 0 %]
8
    [% IF module.keys and module.keys.size > 0 %]
8
        Jump to:
9
        Jump to:
9
        [% FOR pagename IN module.keys.sort %]
10
        [% FOR pagename IN module.keys.sort %]
10
            <a href="#[% pagename | url %]">[% pagename | html %]</a>
11
            <a href="#[% modulename | url %]_[% pagename | url %]">[% pagename | html %]</a>
11
            [% UNLESS loop.last %]<span class="separator"> | </span>[% END %]
12
            [% UNLESS loop.last %]<span class="separator"> | </span>[% END %]
12
        [% END %]
13
        [% END %]
13
    [% END %]
14
    [% END %]
15
    [% IF module_tab && module_tab == modulename %]
16
        [% panel = panel_id %]
17
    [% END %]
14
    <div class="pagelist">
18
    <div class="pagelist">
15
        <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
19
        <form method="post" action="/cgi-bin/koha/admin/columns_settings.pl">
16
            <input type="hidden" name="action" value="save" />
20
            <input type="hidden" name="action" value="save" />
17
            <input type="hidden" name="module" value="[% modulename | html %]" />
21
            <input type="hidden" name="module" value="[% modulename | html %]" />
18
            <input type="hidden" name="panel" value="[% panel_id | html %]" />
19
            [% SET panel_id = panel_id + 1 %]
22
            [% SET panel_id = panel_id + 1 %]
20
            [% IF module.keys and module.keys.size > 0 %]
23
            [% IF module.keys and module.keys.size > 0 %]
21
                [% FOR pagename IN module.keys.sort %]
24
                [% FOR pagename IN module.keys.sort %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-1 / +11 lines)
Lines 797-802 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
797
            }
797
            }
798
        );
798
        );
799
799
800
        if ( CAN_user_parameters_manage_column_config ) {
801
            settings[ "buttons" ].push(
802
                {
803
                    text: 'Configure this table',
804
                    action: function() {
805
                        window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
806
                    },
807
                }
808
            );
809
        }
810
800
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
811
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
801
812
802
        if ( add_filters ) {
813
        if ( add_filters ) {
803
- 

Return to bug 29723