@@ -, +, @@ --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 27 ++++++++++--------- .../ERM/UsageStatisticsReportsViewer.vue | 4 +-- .../prog/js/vue/components/KohaTable.vue | 1 + 3 files changed, 18 insertions(+), 14 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ a/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -665,6 +665,7 @@ function _dt_buttons(params){ let included_ids = params.included_ids || []; let settings = params.settings || {}; let table_settings = params.table_settings; + let hasFilters = params.hasFilters; var exportColumns = ":visible:not(.noExport)"; if( settings.hasOwnProperty("exportColumns") ){ @@ -721,19 +722,21 @@ function _dt_buttons(params){ ]; let buttons = []; - buttons.push( - { - fade: 100, - className: "dt_button_clear_filter", - titleAttr: __("Clear filter"), - enabled: false, - text: ' ' + __("Clear filter") + '', - action: function ( e, dt, node, config ) { - dt.search( "" ).draw("page"); - node.addClass("disabled"); + if(hasFilters){ + buttons.push( + { + fade: 100, + className: "dt_button_clear_filter", + titleAttr: __("Clear filter"), + enabled: false, + text: ' ' + __("Clear filter") + '', + action: function ( e, dt, node, config ) { + dt.search( "" ).draw("page"); + node.addClass("disabled"); + } } - } - ); + ); + } if( included_ids.length > 0 ){ buttons.push( --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue +++ a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsReportsViewer.vue @@ -96,13 +96,13 @@ export default { ), options: { embed: this.embed, - dom: '<"top pager"<"table_entries"ilp>>tr<"bottom pager"ip>', + dom: '<"top pager"<"table_entries"ilpB>>tr<"bottom pager"ip>', }, url: () => this.tableURL(this.year, this.params), table_settings: this.report_type.includes("monthly") ? this.monthly_usage_table_settings : this.yearly_usage_table_settings, - add_filters: true, + add_filters: false, }, yearly_filter: null, params: this.params, --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue +++ a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue @@ -29,6 +29,7 @@ export default { let buttons = _dt_buttons({ included_ids, table_settings: this.table_settings, + hasFilters: this.add_filters, }) return { data: [], --