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/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc (+11 lines)
Lines 161-166 function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { Link Here
161
        }
161
        }
162
    );
162
    );
163
163
164
    if ( CAN_user_parameters_manage_column_config ) {
165
        dt_parameters[ "buttons" ].push(
166
            {
167
                text: 'Configure this table',
168
                action: function() {
169
                    window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
170
                },
171
            }
172
        );
173
    }
174
164
    var table = $(selector);
175
    var table = $(selector);
165
    if ( add_filters ) {
176
    if ( add_filters ) {
166
        // Duplicate the table header row for columnFilter
177
        // Duplicate the table header row for columnFilter
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (+5 lines)
Lines 29-34 Link Here
29
29
30
<script>
30
<script>
31
var Koha = {};
31
var Koha = {};
32
[% IF CAN_user_parameters_manage_column_config %]
33
    var CAN_user_parameters_manage_column_config = 1;
34
[% ELSE %]
35
    var CAN_user_parameters_manage_column_config = 0;
36
[% END %]
32
</script>
37
</script>
33
38
34
[% IF lang && lang != 'en' %]
39
[% IF lang && lang != 'en' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-1 / +11 lines)
Lines 813-818 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
813
            }
813
            }
814
        );
814
        );
815
815
816
        if ( CAN_user_parameters_manage_column_config ) {
817
            settings[ "buttons" ].push(
818
                {
819
                    text: 'Configure this table',
820
                    action: function() {
821
                        window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
822
                    },
823
                }
824
            );
825
        }
826
816
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
827
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
817
828
818
        if ( add_filters ) {
829
        if ( add_filters ) {
819
- 

Return to bug 29723