Bug 19987: If no z39.50/SRU servers the button should not show
Test plan:
[1.] Load the patch and make sure you have some Z39.50/SRU servers
(Administration => Z39.50/SRU servers administration)
[2.] Then go to authorities and notice that the 'New from
Z39.50/SRU' button is there
[3.] Next go to cataloging and notice that the 'New from Z39.50/SRU'
button is there too
[4.] Now make sure you have no Z39.50/SRU servers (remove the
servers)
(Administration => Z39.50/SRU servers administration)
[5.] Go to authorities and notice that the 'New from Z39.50/SRU'
button is not there
[6.] Lastly go to cataloging and notice that the 'New from Z39.50/SRU'
button is not there too
:)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I added a missing [% END %] during signoff. Hope no one minds!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
8329eb174a
commit
01af3bb7dd
|
|
@ -214,7 +214,19 @@ if ( $op eq '' ) {
|
|||
|
||||
}
|
||||
|
||||
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,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -133,8 +133,20 @@ for my $resultsbr (@resultsbr) {
|
|||
};
|
||||
}
|
||||
|
||||
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'],
|
||||
},
|
||||
);
|
||||
|
||||
my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
|
||||
$template->param(
|
||||
servers => $servers,
|
||||
frameworks => $frameworks,
|
||||
breeding_count => $countbr,
|
||||
breeding_loop => $breeding_loop,
|
||||
|
|
|
|||
|
|
@ -59,9 +59,11 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-sm" id="z3950submit" href="#"><i class="fa fa-search"></i> New from Z39.50</a>
|
||||
</div>
|
||||
[% IF servers.count > 0 %]
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-sm" id="z3950submit" href="#"><i class="fa fa-search"></i> New from Z39.50</a>
|
||||
</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
[% IF servers.count > 0 %]
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default btn-sm" id="z3950search"><i class="fa fa-search"></i> New from Z39.50/SRU</button>
|
||||
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
|
||||
|
|
@ -42,6 +43,7 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF ( total ) %]
|
||||
<div class="btn-group"><button type="submit" class="btn btn-default btn-sm merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue