From 3187a61f78c6672e6dd320387af5e602194fb8db Mon Sep 17 00:00:00 2001
From: Aleisha Amohia
Date: Tue, 8 Feb 2022 00:52:55 +0000
Subject: [PATCH] Bug 30041: Add MARC and Card preview to biblio search results
This enhancement adds MARC preview and Card preview links to the normal
catalogue search results.
To test:
1) Do a catalogue search in the staff client (use the 'Search the
catalogue' tab, do not do a search that searches both the catalogue
and the reservoir).
2) Notice there is no quick way to view the MARC and Card previews for
each search result.
3) Apply patch and refresh the search results page
4) Confirm there are now links for both the MARC and Card previews
5) Confirm these popups show details of the records as expected
Sponsored-by: Education Services Australia SCIS
Signed-off-by: Lucas Gass
---
.../prog/en/modules/catalogue/results.tt | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
index 59def93d62..2985aac865 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
@@ -541,6 +541,14 @@
| OPAC view
[% END %]
+
+
+ | MARC preview
+
+
+
+ | Card preview
+
@@ -683,6 +691,24 @@
+
+
+
+
+
+
+
Loading
+
+
+
+
+
+
@@ -738,6 +764,20 @@
first_biblionumber: "[% SEARCH_RESULTS.first.biblionumber | html %]",
last_biblionumber: "[% SEARCH_RESULTS.last.biblionumber | html %]",
}
+ $(document).ready(function(){
+ $(".previewData").on("click", function(e){
+ e.preventDefault();
+ var ltitle = $(this).text();
+ var page = $(this).attr("href");
+ $("#dataPreviewLabel").text(ltitle);
+ $("#dataPreview .modal-body").load(page + " div");
+ $('#dataPreview').modal({show:true});
+ });
+ $("#dataPreview").on("hidden.bs.modal", function(){
+ $("#dataPreviewLabel").html("");
+ $("#dataPreview .modal-body").html("
"+_("Loading")+"
");
+ });
+ });
[% Asset.js("js/pages/results.js") | $raw %]
[% END %]
--
2.20.1