From 555fab57e4fcb8a1076bc952b7cc291b2edab535 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 4 Oct 2024 15:22:25 +0000 Subject: [PATCH] Bug 38096: Staff: Display 857 to detail and results pages Content-Type: text/plain; charset=utf-8 This work DRYs the 856 display logic to renderMARCOnlineResourceField. This was previously written in detail and results pages. Once this single function exists, 857 can also make use of it to be displayed using the same logic/features already present for 856. 1) If testing k-t-d, add the test data for test plan (otherwise prep instructions below): updatedatabase 2) Force reindex of this biblio by saving it, visit the biblio: /cgi-bin/koha/catalogue/detail.pl?biblionumber=76 3) Click "Edit" -> "Edit record" -> "Save" 4) Open the following URL's, preferably on 4 different browser tabs (we're using biblio 76 for this test): /cgi-bin/koha/catalogue/search.pl?q=music (first record [76] is the one we're testing) /cgi-bin/koha/catalogue/detail.pl?biblionumber=76 /cgi-bin/koha/opac-search.pl?idx=&q=music (first record [76] is the one we're testing) /cgi-bin/koha/opac-detail.pl?biblionumber=76 5) Verify that on all pages there are 3 instances of 856 (Online resources) and 3 instances of 857 (Online archive resources) with their respective link labels and URLs. 6) Click on the "Koha community no protocol" link for 856 and 857, notice the 'http://' protocol is added. 7) Change the values of OPACDisplay856uAsImage + Display856uAsImage and refresh the respective page. Verify it works as expected (respects the system preference). Note: This only applies for 856, not 857 (out of scope here). 8) Change the value of OPACURLOpenInNewWindow and click on the links before and after. Verify they respect the system preference. If not on k-t-d and updatedatabase not available: perl /kohadevbox/koha/installer/data/mysql/updatedatabase.pl or koha-shell -c "perl /kohadevbox/koha/installer/data/mysql/updatedatabase.pl" If CLI not available (preparation on UI): A) Add field 857 to the 'Default' framework B) Edit the field: /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=857&frameworkcode= C) Check the 'Editor' checkbox for subfields q, u and z (Add these if not there already) D) Edit the record in question, visit: /cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=76 E) Click 'Settings' dropdown and pick 'Default' framework. F) Add MARC data that corresponds to the following: 3 instances of 856 as below. 3 instances of 857 as below. Koha community no protocol koha-community.org/ Koha community with protocol https://koha-community.org/ Koha logo image jpeg https://koha-community.org/files/2013/09/cropped-kohabanner3.jpg Koha community no protocol koha-community.org/ Koha community with protocol https://koha-community.org/ KohaCon 2024 logo image jpeg https://2024.kohacon.org/wp-content/uploads/2024/01/kohacon24_fr_verticale_vert_noir.png G) At this point you're ready to start the original test plan from step 4) Signed-off-by: Caroline Cyr La Rose Signed-off-by: Marcel de Rooy --- .../en/xslt/MARC21slim2intranetDetail.xsl | 56 +++++++------------ .../en/xslt/MARC21slim2intranetResults.xsl | 52 ++++++----------- .../prog/en/xslt/MARC21slimUtils.xsl | 49 ++++++++++++++++ .../en/xslt/MARC21slim2OPACResults.xsl | 1 + 4 files changed, 87 insertions(+), 71 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 076aa9edd1..2b0e7b16f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -960,45 +960,29 @@ + - Online resources: - + + + + + Online archive resources: + + 857 + + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl index 5e488366c5..c59915bdb9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -977,47 +977,29 @@ + Online resources: - - - - - - - - + + 856 + + - - - - - 100 - - - - y3z + + + + + + + + + Online archive resources: + + 857 + - - - - - - - - Click here to access online - - - - - - - - | - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index b6902bb243..8fd64811b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -730,6 +730,55 @@ + + + + + + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index df44fa7af2..cba5105e29 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1214,6 +1214,7 @@ 857 + -- 2.39.5