Bugzilla – Attachment 129983 Details for
Bug 29965
MARC preview for authority search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29965: Preview MARC in authority search results
Bug-29965-Preview-MARC-in-authority-search-results.patch (text/plain), 6.20 KB, created by
Aleisha Amohia
on 2022-01-31 00:03:44 UTC
(
hide
)
Description:
Bug 29965: Preview MARC in authority search results
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-01-31 00:03:44 UTC
Size:
6.20 KB
patch
obsolete
>From 3f07806155c8314f7c7398177bdd37661b407969 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 28 Jan 2022 02:58:55 +0000 >Subject: [PATCH] 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 >--- > .../prog/en/includes/authority-detail-modal.inc | 17 +++++++++++++ > .../modules/authorities/searchresultlist-auth.tt | 18 +------------- > .../en/modules/authorities/searchresultlist.tt | 28 ++++++++++++++++++++++ > 3 files changed, 46 insertions(+), 17 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/authority-detail-modal.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authority-detail-modal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authority-detail-modal.inc >new file mode 100644 >index 0000000000..7cb0f9864f >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authority-detail-modal.inc >@@ -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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >index 71396e85e2..2fa5990fc7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >@@ -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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index 3baec6db23..0c5f33ec8b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -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' %] >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29965
:
129918
|
129983
|
130635
|
130880
|
130881
|
130882
|
130907
|
130908
|
130909
|
130910