@@ -, +, @@ show --- authorities/authorities-home.pl | 25 ++++++++++------------ cataloguing/addbooks.pl | 12 +++++------ .../prog/en/includes/authorities-toolbar.inc | 2 +- .../prog/en/modules/cataloguing/addbooks.tt | 4 ++-- 4 files changed, 20 insertions(+), 23 deletions(-) --- a/authorities/authorities-home.pl +++ a/authorities/authorities-home.pl @@ -214,22 +214,19 @@ if ( $op eq '' ) { } -4 if ( $op ne "do_search" ) { - my $schema = Koha::Database->new()->schema(); - my $rs = $schema->resultset('Z3950server')->search( - { - recordtype => 'biblio', - servertype => ['zed', 'sru'], - }, - { result_class => 'DBIx::Class::ResultClass::HashRefInflator', - order_by => ['rank', 'servername'], - }, - ); - $template->param( - serverloop => [ $rs->all ], - ) +my $schema = Koha::Database->new()->schema(); +my $servers = $schema->resultset('Z3950server')->search( + { + recordtype => 'biblio', + servertype => ['zed', 'sru'], + }, + { result_class => 'DBIx::Class::ResultClass::HashRefInflator', + order_by => ['rank', 'servername'], + }, +); $template->param( + servers => $servers, authority_types => $authority_types, op => $op, ); --- a/cataloguing/addbooks.pl +++ a/cataloguing/addbooks.pl @@ -133,20 +133,20 @@ for my $resultsbr (@resultsbr) { }; } -my $rs = $schema->resultset('Z3950server')->search( +my $schema = Koha::Database->new()->schema(); +my $servers = $schema->resultset('Z3950server')->search( { - recordtype => 'biblio', - servertype => ['zed', 'sru'], + recordtype => 'biblio', + servertype => ['zed', 'sru'], }, { result_class => 'DBIx::Class::ResultClass::HashRefInflator', order_by => ['rank', 'servername'], }, - ); - $template->param( - serverloop => [ $rs->all ], +); my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); $template->param( + servers => $servers, frameworks => $frameworks, breeding_count => $countbr, breeding_loop => $breeding_loop, --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc @@ -59,7 +59,7 @@ [% END %] - [% IF server %] + [% IF servers.count > 0 %]
New from Z39.50
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -30,13 +30,12 @@ [% END %] - [% IF server %] + [% IF servers.count > 0 %]
- [% END %]
+ [% END %] [% IF ( total ) %]
[% END %] --