Bugzilla – Attachment 175046 Details for
Bug 38594
Table settings for courses reserves not working in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38594: Remove unused TablesSettings.GetColumns
Bug-38594-Remove-unused-TablesSettingsGetColumns.patch (text/plain), 2.51 KB, created by
Jonathan Druart
on 2024-12-02 10:25:57 UTC
(
hide
)
Description:
Bug 38594: Remove unused TablesSettings.GetColumns
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-12-02 10:25:57 UTC
Size:
2.51 KB
patch
obsolete
>From 044ab48c4719964398275327c328d69c83871a41 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 2 Dec 2024 11:24:47 +0100 >Subject: [PATCH] Bug 38594: Remove unused TablesSettings.GetColumns > >This is no longer used, and should not. > >Test plan: > git grep TablesSettings.GetColumns >should not return any results > > git grep GetColumns >should not return results related to this method >--- > Koha/Template/Plugin/TablesSettings.pm | 38 ++------------------------ > 1 file changed, 2 insertions(+), 36 deletions(-) > >diff --git a/Koha/Template/Plugin/TablesSettings.pm b/Koha/Template/Plugin/TablesSettings.pm >index 9e6eccc4333..bed439b6e73 100644 >--- a/Koha/Template/Plugin/TablesSettings.pm >+++ b/Koha/Template/Plugin/TablesSettings.pm >@@ -40,8 +40,8 @@ Koha::Template::Plugin::TablesSettings > . . . > > <script> >- var columns_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; >- var table = KohaTable("id", { "autoWidth": false }, columns_settings ); >+ var table_settings = [% TablesSettings.GetTableSettings( 'module', 'page', 'table', 'json' ) | $raw %]; >+ var table = $("#id").kohaTable({ "autoWidth": false }, table_settings ); > </script> > > This plugin allows to get the column configuration for a table. It should be used both in table markup >@@ -61,40 +61,6 @@ use C4::Utils::DataTables::TablesSettings; > > =head1 FUNCTIONS > >-=head2 GetColumns >- >- <script> >- var tables_settings = [% TablesSettings.GetColumns( 'module', 'page', 'table', 'json' ) | $raw %]; >- var table = KohaTable("id", { "autoWidth": false }, tables_settings ); >- </script> >- >-Used to get the full column settings configuration for datatables, usually requires a format of 'json' to pass into >-datatables instantiator. >- >-=cut >- >-=head3 GetColumns >- >-var columns_settings = [% TablesSettings.GetColumns( module, page, table 'json' ) | $raw%] >- >-This method is usually be used to retrieve the columns settings for a DataTable init. >- >-So the 'json' format will be provided and the columns_settings JS var will be >-passed as argument of the constructor. >- >-=cut >- >-sub GetColumns { >- my ( $self, $module, $page, $table, $format ) = @_; >- $format //= q{}; >- >- my $columns = C4::Utils::DataTables::TablesSettings::get_columns( $module, $page, $table ); >- >- return $format eq 'json' >- ? to_json( $columns ) >- : $columns >-} >- > =head2 is_hidden > > [% UNLESS TablesSettings.is_hidden( 'module', 'page', 'table', 'column') %] >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38594
:
175045
|
175046
|
175055
|
175056
|
175060
|
175061