Koha/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-toolbar.inc
Owen Leonard b6cf96dbfe Bug 15316 - Use Bootstrap modal for authority Z39.50 search results preview
In order to reduce the number of dependencies for common interactions we
should attempt to use Bootstrap modals in place of Greybox ones.

This patch modifies the authorities Z39.50 search results page so that
MARC previews are displayed in Bootstrap modals. This patch also
modifies the authorities toolbar include file to make the Z39.50 search
popup size match that in cataloging.

Because the modal is triggered from a pop-up window, the modal has been
reformated to exclude the footer and reduce the size of the modal
header.

To test:

1. Apply the patch and navigate to Authorities.
2. Click the "New from Z39.50" button to open the search
   window.
3. Perform any search which will return multiple results.
4. Test the visible "MARC" link for multiple results and
   confirm that the correct data is shown each time.
5. Click anywhere in the results table to show the hidden menu and test
   the "MARC" link it displays.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-30 15:25:46 +00:00

68 lines
3 KiB
HTML

<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$("#delAuth").click(function(){
confirm_deletion();
return false;
});
$("#z3950submit").click(function(){
[% IF ( authid ) %]
if (confirm(_("Please note that this Z39.50 search could replace the current record."))){
window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl?authid=[% authid %]","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
}
[% ELSE %]
window.open("/cgi-bin/koha/cataloguing/z3950_auth_search.pl","z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
[% END %]
return false;
});
});
//]]>
</script>
[% IF ( authid || CAN_user_editauthorities) %]
<div id="toolbar" class="btn-toolbar">
[% IF ( authid ) %]
[% IF ( CAN_user_editauthorities ) %]
<div class="btn-group"><a class="btn btn-small" id="editAuth" href="authorities.pl?authid=[% authid %]"><i class="fa fa-pencil"></i> Edit</a></div>
<div class="btn-group"><a class="btn btn-small" id="dupAuth" href="authorities.pl?authid=[% authid %]&amp;op=duplicate"><i class="fa fa-copy"></i> Duplicate</a></div>
[% UNLESS ( count ) %]
<div class="btn-group"><a href="#" class="btn btn-small" id="delAuth"><i class="fa fa-remove"></i> Delete</a></div>
[% END %]
[% END %]
<div class="btn-group">
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-download"></i> Save
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/cgi-bin/koha/authorities/export.pl?format=mads&amp;op=export&amp;authid=[% authid %]">MADS (XML)</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=marcxml&amp;op=export&amp;authid=[% authid %]">MARCXML</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=marc8&amp;op=export&amp;authid=[% authid %]">MARC (non-Unicode/MARC-8)</a></li>
<li><a href="/cgi-bin/koha/authorities/export.pl?format=utf8&amp;op=export&amp;authid=[% authid %]">MARC (Unicode/UTF-8)</a></li>
</ul>
</div>
[% END %]
[% IF ( CAN_user_editauthorities ) %]
<div class="btn-group">
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-plus"></i> New authority
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
[% FOREACH authtypesloo IN authtypesloop %]
<li><a href="/cgi-bin/koha/authorities/authorities.pl?authtypecode=[% authtypesloo.value %]">[% authtypesloo.authtypetext %]</a></li>
[% END %]
</ul>
</div>
<div class="btn-group">
<a class="btn btn-small" id="z3950submit" href="#"><i class="fa fa-search"></i> New from Z39.50</a>
</div>
[% END %]
</div>
[% END %]