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 122-127 function KohaTable(id_selector, dt_parameters, table_settings, add_filters) { Link Here
122
        }
122
        }
123
    );
123
    );
124
124
125
    if ( CAN_user_parameters_manage_column_config ) {
126
        dt_parameters[ "buttons" ].push(
127
            {
128
                text: 'Configure this table',
129
                action: function() {
130
                    window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
131
                },
132
            }
133
        );
134
    }
135
125
    var table = $(selector);
136
    var table = $(selector);
126
    if ( add_filters ) {
137
    if ( add_filters ) {
127
        // Duplicate the table header row for columnFilter
138
        // Duplicate the table header row for columnFilter
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc (+1 lines)
Lines 25-30 Link Here
25
25
26
<script>
26
<script>
27
var Koha = {};
27
var Koha = {};
28
var CAN_user_parameters_manage_column_config = [% CAN_user_parameters_manage_column_config ? 1 : 0 %];
28
</script>
29
</script>
29
30
30
[% IF lang && lang != 'en' %]
31
[% 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 781-786 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
781
            }
781
            }
782
        );
782
        );
783
783
784
        if ( CAN_user_parameters_manage_column_config ) {
785
            settings[ "buttons" ].push(
786
                {
787
                    text: 'Configure this table',
788
                    action: function() {
789
                        window.location = '/cgi-bin/koha/admin/columns_settings.pl?module=' + table_settings['module'] + '#' + table_settings['page'] + '#' + table_settings['table'];
790
                    },
791
                }
792
            );
793
        }
794
784
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
795
        $(".dt_button_clear_filter, .columns_controls, .export_controls").tooltip();
785
796
786
        if ( add_filters ) {
797
        if ( add_filters ) {
787
- 

Return to bug 29723