Bug 29965: Preview MARC in authority search results
This enhancement makes the authority MARC preview modal available for the general authority search results. To test: 1) Do a catalog search and edit a biblio record 2) Go to one of the authority tags (i.e. 1xx, 6xx, 7xx) and open the authority finder plugin 3) Do an authority search 4) Click on one of the search result headings to open the modal. Confirm it opens as expected. 5) Exit the biblio editor and go to Authorities 6) Do an authority search 7) Click on the Actions dropdown, then the MARC preview button, to open the modal. Confirm it opens as expected. Sponsored-by: Education Services Australia SCIS Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
f81cd2a2b9
commit
e3f82fe1ce
|
|
@ -0,0 +1,17 @@
|
|||
<!-- Authority details modal -->
|
||||
<div class="modal" id="authorityDetail" tabindex="-1" role="dialog" aria-labelledby="authorityDetailLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="authorityDetailLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -89,23 +89,7 @@
|
|||
</div>[% END %]
|
||||
</div>
|
||||
|
||||
<!-- Authority details modal -->
|
||||
<div class="modal" id="authorityDetail" tabindex="-1" role="dialog" aria-labelledby="authorityDetailLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="authorityDetailLabel"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[% INCLUDE 'authority-detail-modal.inc' %]
|
||||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
[% USE raw %]
|
||||
[% USE Asset %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% PROCESS 'authorities-search-results.inc' %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Authority search results › Authorities › Koha</title>
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
[% Asset.css("css/addbiblio.css") | $raw %]
|
||||
</head>
|
||||
|
||||
<body id="auth_searchresultlist" class="auth">
|
||||
|
|
@ -77,6 +79,9 @@
|
|||
[% UNLESS ( resul.used ) %]
|
||||
<li><a onclick='return confirm_deletion("[% resul.authid | html %]")'><i class="fa fa-trash"></i> Delete</a></li>
|
||||
[% END %]
|
||||
<li class="authorizedheading">
|
||||
<a data-authid="[% resul.authid | html %]" href="/cgi-bin/koha/authorities/detail.pl?authid=[% resul.authid | uri %]"><i class="fa fa-eye"></i> MARC preview</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
|
@ -86,6 +91,8 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
[% INCLUDE 'authority-detail-modal.inc' %]
|
||||
|
||||
<div class="pages">[% pagination_bar | $raw %]</div>
|
||||
|
||||
[% ELSE %]
|
||||
|
|
@ -96,6 +103,27 @@
|
|||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
[% INCLUDE 'authorities_js.inc' %]
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".authorizedheading a").on("click", function(e){
|
||||
e.preventDefault();
|
||||
var authid = $(this).data("authid");
|
||||
|
||||
$.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
|
||||
var auth_detail = $(data).find("#authoritiestabs");
|
||||
auth_detail.find("ul").remove();
|
||||
$("#authorityDetail .modal-title").html(_("Authority") + " " + authid );
|
||||
$("#authorityDetail .modal-body").html( auth_detail );
|
||||
});
|
||||
|
||||
$("#authorityDetail").modal("show");
|
||||
});
|
||||
$("#authorityDetail").on("hidden.bs.modal", function(){
|
||||
$("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
|
||||
$("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue