Bug 24156: Fix some QA failures
* Add POD to get_table_settings * Remove USE Dumper debug statement * Add missing "10" entry * Fix newly created test file (and renamed) Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
8bda9ce467
commit
2201edfe6e
|
|
@ -59,6 +59,22 @@ sub get_columns {
|
|||
return $columns;
|
||||
}
|
||||
|
||||
=head3 get_table_settings
|
||||
|
||||
my $settings = C4::Utils::DataTables::TablesSettings::get_table_settings(
|
||||
{
|
||||
module => $module,
|
||||
pag => $page,
|
||||
tablename => $tablename,
|
||||
}
|
||||
);
|
||||
|
||||
Returns the settings for a given table.
|
||||
|
||||
The settings are default_display_length and default_sort_order.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_table_settings {
|
||||
my ( $module, $page, $tablename ) = @_;
|
||||
my $list = get_yaml;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
[% USE TablesSettings %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% SET panel_id = 0 %]
|
||||
[% USE Dumper %]
|
||||
[% BLOCK pagelist %]
|
||||
[% IF module.keys and module.keys.size > 0 %]
|
||||
Jump to:
|
||||
|
|
@ -101,6 +100,7 @@
|
|||
[% IF table_settings.default_display_length == 10 %]
|
||||
<option value="10" selected="selected">10</option>
|
||||
[% ELSE %]
|
||||
<option value="10">10</option>
|
||||
[% END %]
|
||||
[% IF table_settings.default_display_length == 20 %]
|
||||
<option value="20" selected="selected">20</option>
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ use Test::More tests => 3;
|
|||
use t::lib::Mocks;
|
||||
|
||||
BEGIN {
|
||||
use_ok('Koha::Template::Plugin::ColumnsSettings', "Can use Koha::Template::Plugin::ColumnsSettings");
|
||||
use_ok('Koha::Template::Plugin::TablesSettings', "Can use Koha::Template::Plugin::TablesSettings");
|
||||
}
|
||||
|
||||
ok( my $settings = Koha::Template::Plugin::ColumnsSettings->new(), 'Able to instantiate template plugin' );
|
||||
ok( my $settings = Koha::Template::Plugin::TablesSettings->new(), 'Able to instantiate template plugin' );
|
||||
|
||||
subtest "is_hidden" => sub {
|
||||
plan tests => 2;
|
||||
Loading…
Reference in New Issue