Bug 30036 - Add XSLT for authority results view in OPAC
Summary: Add XSLT for authority results view in OPAC
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-07 10:48 UTC by Jérémy Breuillard
Modified: 2023-08-01 21:12 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/669
Text to go in the release notes:
This enhancement enables the use of custom XSLT stylesheets for displaying OPAC authority search results.
Version(s) released in:
22.11.00


Attachments
Bug 30036: Add xslt for authority results normal view in OPAC (7.59 KB, patch)
2022-02-07 13:00 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 30036: Add xslt for authority results normal view in OPAC (7.64 KB, patch)
2022-02-07 14:43 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 30036: Add xslt for authority results normal view in OPAC (7.63 KB, patch)
2022-08-31 12:10 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 30036: Allow XSLT for authority results view in OPAC (7.22 KB, patch)
2022-09-08 08:48 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30036: Allow XSLT for authority results view in OPAC (7.26 KB, patch)
2022-09-11 18:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 30036: (follow-up) Update system preference description (1.88 KB, patch)
2022-09-11 18:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 30036: Allow XSLT for authority results view in OPAC (7.32 KB, patch)
2022-10-07 11:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30036: (follow-up) Update system preference description (1.94 KB, patch)
2022-10-07 11:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30036: (QA follow-up) Move system preference to OPAC tab (5.43 KB, patch)
2022-10-07 11:17 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30036: Fix trivial typo (943 bytes, patch)
2022-10-27 16:23 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30036: (QA follow-up) Add explanation about default value behavior (2.10 KB, patch)
2022-10-27 16:24 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jérémy Breuillard 2022-02-07 10:48:40 UTC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21330 offers to display OPAC details in XSLT.
We could do the same thing for the authority OPAC results searching ?
Comment 1 Jérémy Breuillard 2022-02-07 13:00:59 UTC Comment hidden (obsolete)
Comment 2 Jérémy Breuillard 2022-02-07 14:43:22 UTC
Created attachment 130232 [details] [review]
Bug 30036: Add xslt for authority results normal view in OPAC

This patch provides a xslt stylesheet on authority results normal view in OPAC. Have a look on opac-authorities-home.pl

Test plan:
1)You need the file 'UNIMARCauthResults.xsl' -> get it in the patch from Bug 11083
2)For testing make sure to have at least one or more authorities defined

3)OPAC: Home > Authority search(Submit) > Authority search results
4)Notice the normal view of results
5)Apply patch
6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacResultsDisplay"
7)Write the path where your file is, ex: '/home/koha/src/UNIMARCauthResults.xsl'
8)Save changes
9)Repeat 3) and 4) and notice the xslt view of results
Comment 3 David Nind 2022-06-19 19:52:37 UTC
Patch no longer applies + whitespace errors 8-(..

git bz apply 30036

Bug 30036 - Add xslt for authority results normal view in OPAC

130232 - Bug 30036: Add xslt for authority results normal view in OPAC

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 30036: Add xslt for authority results normal view in OPAC
.git/rebase-apply/patch:107: trailing whitespace.
            
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M	installer/data/mysql/mandatory/sysprefs.sql
M	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
M	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
.git/rebase-apply/patch:107: trailing whitespace.
            
warning: 1 line applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref
Auto-merging installer/data/mysql/mandatory/sysprefs.sql
CONFLICT (content): Merge conflict in installer/data/mysql/mandatory/sysprefs.sql
error: Failed to merge in the changes.
Patch failed at 0001 Bug 30036: Add xslt for authority results normal view in OPAC
Comment 4 Jérémy Breuillard 2022-08-31 12:10:27 UTC
Created attachment 140002 [details] [review]
Bug 30036: Add xslt for authority results normal view in OPAC

This patch provides a xslt stylesheet on authority results normal view in OPAC. Have a look on opac-authorities-home.pl

Test plan:
1)You need the file 'UNIMARCauthResults.xsl' -> get it in the patch from Bug 11083
2)For testing make sure to have at least one or more authorities defined

3)OPAC: Home > Authority search(Submit) > Authority search results
4)Notice the normal view of results
5)Apply patch
6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacResultsDisplay"
7)Write the path where your file is, ex: '/home/koha/src/UNIMARCauthResults.xsl'
8)Save changes
9)Repeat 3) and 4) and notice the xslt view of results
Comment 5 Julian Maurice 2022-09-08 08:48:20 UTC
Created attachment 140332 [details] [review]
Bug 30036: Allow XSLT for authority results view in OPAC

This patch adds a syspref to allow customizing the authority results
view at OPAC with XSLT

Test plan:
1. For testing make sure to have at least one or more authorities
   defined
2. OPAC: Home > Authority search(Submit) > Authority search results
   Notice the normal view of results
3. Apply patch
4. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacResultsDisplay"
5. Write the path where your file is. You can use the one for intranet:
   .../koha/koha-tmpl/intranet-tmpl/prog/en/XSLT/UNIMARCauthResults.xsl
6. Save changes
7. Repeat step 2 and notice the xslt view of results
Comment 6 Julian Maurice 2022-09-08 09:16:49 UTC
Patch rebased on master
Comment 7 David Nind 2022-09-11 18:00:48 UTC
Created attachment 140406 [details] [review]
Bug 30036: Allow XSLT for authority results view in OPAC

This patch adds a syspref to allow customizing the authority results
view at OPAC with XSLT

Test plan:
1. For testing make sure to have at least one or more authorities
   defined
2. OPAC: Home > Authority search(Submit) > Authority search results
   Notice the normal view of results
3. Apply patch
4. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacResultsDisplay"
5. Write the path where your file is. You can use the one for intranet:
   .../koha/koha-tmpl/intranet-tmpl/prog/en/XSLT/UNIMARCauthResults.xsl
6. Save changes
7. Repeat step 2 and notice the xslt view of results

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-09-11 18:00:53 UTC
Created attachment 140407 [details] [review]
Bug 30036: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2022-10-07 11:17:16 UTC
Created attachment 141493 [details] [review]
Bug 30036: Allow XSLT for authority results view in OPAC

This patch adds a syspref to allow customizing the authority results
view at OPAC with XSLT

Test plan:
1. For testing make sure to have at least one or more authorities
   defined
2. OPAC: Home > Authority search(Submit) > Authority search results
   Notice the normal view of results
3. Apply patch
4. INTRA: Home > Administration > System preferences ->find
   "AuthorityXSLTOpacResultsDisplay"
5. Write the path where your file is. You can use the one for intranet:
   .../koha/koha-tmpl/intranet-tmpl/prog/en/XSLT/UNIMARCauthResults.xsl
6. Save changes
7. Repeat step 2 and notice the xslt view of results

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 10 Katrin Fischer 2022-10-07 11:17:22 UTC
Created attachment 141494 [details] [review]
Bug 30036: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 11 Katrin Fischer 2022-10-07 11:17:32 UTC
Created attachment 141495 [details] [review]
Bug 30036: (QA follow-up) Move system preference to OPAC tab

* Moves the AuthorityXSLTOpacResultsDisplay from staff interface to OPAC tab
* Fixes some capitalization opac in the database pref description

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 12 Tomás Cohen Arazi 2022-10-27 16:23:35 UTC
Created attachment 142721 [details] [review]
Bug 30036: Fix trivial typo

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2022-10-27 16:24:13 UTC
Created attachment 142722 [details] [review]
Bug 30036: (QA follow-up) Add explanation about default value behavior

Devs forgot to mention the default value (empty) is for the current
behavior. This is particularly important as there's really no shipped
XSLT so a niche usage enhancement until related bugs are pushed. Those
only have UNIMARC files, though.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Tomás Cohen Arazi 2022-10-27 16:52:27 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 15 Lucas Gass 2022-11-10 23:58:51 UTC
This is marked as a rel_22_05_candidate but it looks like an enhancement. Do we need to backport it?
Comment 16 Katrin Fischer 2022-11-11 16:17:11 UTC
It looks like the keyword was set by Tomas in October - maybe it was just a mistake, meant to be 22.11?
Comment 17 Tomás Cohen Arazi 2022-11-11 17:01:55 UTC
(In reply to Katrin Fischer from comment #16)
> It looks like the keyword was set by Tomas in October - maybe it was just a
> mistake, meant to be 22.11?

(In reply to Lucas Gass from comment #15)
> This is marked as a rel_22_05_candidate but it looks like an enhancement. Do
> we need to backport it?

My mistake. Sorry