@@ -, +, @@ "New from Z39.50" Button - "New from Z39.50" has been added to the "New authority" dropdown. - "Edit" is now a dropdown, like on the bibliographic detail page: - Edit record - Edit as new (duplicate) - Replace record via Z39.50/SRU - Delete record - On the authorities home page and the authorities search results page, the "New authority" menu should have a "New from Z39.50" link. - View the details for an authority record. The menus should appear as described above. Test each option. --- authorities/detail.pl | 9 +++ .../prog/en/includes/authorities-toolbar.inc | 85 ++++++++++++---------- .../prog/en/includes/authorities_js.inc | 21 +++--- 3 files changed, 66 insertions(+), 49 deletions(-) --- a/authorities/detail.pl +++ a/authorities/detail.pl @@ -51,6 +51,7 @@ use Koha::Authorities; use Koha::Authority::Types; use Koha::Token; +use Koha::Z3950Servers; our ($tagslib); @@ -214,6 +215,13 @@ chop $biblio_fields if $biblio_fields; build_tabs ($template, $record, $dbh,"",$query); +my $servers = Koha::Z3950Servers->search( + { + recordtype => 'authority', + servertype => ['zed', 'sru'], + }, +); + my $type = $authority_types->find($authtypecode); $template->param( authid => $authid, @@ -223,6 +231,7 @@ $template->param( authtypecode => $authtypecode, authority_types => $authority_types, csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $query->cookie('CGISESSID') }), + servers => $servers, ); $template->{VARS}->{marcflavour} = C4::Context->preference("marcflavour"); --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc @@ -1,47 +1,56 @@ [% INCLUDE 'blocking_errors.inc' %] [% IF ( authid || CAN_user_editauthorities) %] -
- -[% IF ( authid ) %] - [% IF ( CAN_user_editauthorities ) %] -
Edit
-
Duplicate
- [% UNLESS ( count ) %] -
Delete
+
+ [% IF ( CAN_user_editauthorities ) %] +
+ + New authority + + + +
[% END %] - [% END %] - - -[% END %] -[% IF ( CAN_user_editauthorities ) %] -
- New authority - - - + + + [% END %]
- [% IF servers.count > 0 %] - - [% END %] -[% END %] -
[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities_js.inc @@ -1,4 +1,4 @@ - + --