Description
Marjorie Barry-Vila
2018-09-11 13:52:15 UTC
Created attachment 130208 [details] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 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 2) and 3) and notice the display This is a similar bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30036 Comment on attachment 130208 [details] Bug 21330: Add xslt for authority normal view in OPAC >From fb4cd8de85a004d6a51b48cca1f1fcb1638495c0 Mon Sep 17 00:00:00 2001 >From: jeremy breuillard <jeremy.breuillard@biblibre.com> >Date: Mon, 7 Feb 2022 12:00:00 +0100 >Subject: [PATCH] Bug 21330: Add xslt for authority normal view in OPAC > >This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view >5)Apply patch >6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" >7)Write the path where your file is, ex: '/home/koha/src/UNIMARCauthResults.xsl' >8)Save changes >9)Repeat 2) and 3) and notice the display > >This is a similar bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30036 >--- > .gitignore | 1 + > ...spref-AuthorityXSLTOpacDetailsDisplay.perl | 9 ++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../admin/preferences/staff_interface.pref | 4 + > .../bootstrap/en/modules/opac-auth-detail.tt | 96 ++----------------- > opac/opac-authoritiesdetail.pl | 29 +++++- > 6 files changed, 45 insertions(+), 95 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/add-syspref-AuthorityXSLTOpacDetailsDisplay.perl > >diff --git a/.gitignore b/.gitignore >index c70d94a1dd..b0f5f623e8 100644 >--- a/.gitignore >+++ b/.gitignore >@@ -5,3 +5,4 @@ > node_modules/ > koha-tmpl/opac-tmpl/bootstrap/css/maps/ > koha-tmpl/intranet-tmpl/prog/css/maps/ >+UNIMARCauthResults.xsl >\ No newline at end of file >diff --git a/installer/data/mysql/atomicupdate/add-syspref-AuthorityXSLTOpacDetailsDisplay.perl b/installer/data/mysql/atomicupdate/add-syspref-AuthorityXSLTOpacDetailsDisplay.perl >new file mode 100644 >index 0000000000..868113b885 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/add-syspref-AuthorityXSLTOpacDetailsDisplay.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; >+if (CheckVersion($DBversion)) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) >+ VALUES ('AuthorityXSLTResultsDisplay','','','Enable XSL stylesheet control over authority results page display on intranet','Free') >+ }); >+ >+ NewVersion($DBversion, '11083', 'Add syspref AuthorityXSLTResultsDisplay'); >+} >\ No newline at end of file >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index dd83a00fd8..01cbd8f8e8 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -69,6 +69,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AuthorityMergeLimit','50',NULL,'Maximum number of biblio records updated immediately when an authority record has been modified.','integer'), > ('AuthorityMergeMode','loose','loose|strict','Authority merge mode','Choice'), > ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), >+('AuthorityXSLTOpacDetailsDisplay','','','Enable XSL stylesheet control over authority details page display on opac','Free'), > ('AuthSuccessLog','0',NULL,'If enabled, log successful authentications','YesNo'), > ('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'), > ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >index 10c41c581d..4e63e68439 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_interface.pref >@@ -1,6 +1,10 @@ > Staff interface: > Appearance: > - >+ - 'Display authority details in the opac interface using XSLT stylesheet at: ' >+ - pref: AuthorityXSLTOpacDetailsDisplay >+ class: file >+ - '<br />Options:<ul><li>Put a path to define a xslt file</li><li>Put an URL for an external specific stylesheet.</li></ul>{langcode} will be replaced with current interface language and {authtypecode} will be replaced by the authority type code' > - "Display language selector on " > - pref: StaffLangSelectorMode > choices: >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt >index f0d9fbcc2d..9629aaf05f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.tt >@@ -50,17 +50,12 @@ > </span> > </div> > >- [% IF ( displayhierarchy ) %] >- <div id="hierarchies"> >- [% PROCESS showhierarchy trees = loophierarchies %] >- </div> >- [% END %] >- > <h1>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</h1> > > <div class="usedin"> > [% IF count %]<a href="/cgi-bin/koha/opac-search.pl?type=opac&q=[% authid | uri %]&idx=an,phr">Number of records used in: [% count | html %]</a>[% ELSE %]This authority is not used in any records.[% END %] > </div> >+ <br> > > <div class="authstanza"> > [% FOREACH authorize IN summary.authorized %] >@@ -72,91 +67,12 @@ > [% PROCESS otherscript headings=summary.otherscript wantcategory='preferred' %] > </div> > >- [% IF summary.seefrom.size %] >- <div class="authstanza seefrom"> >- <div class="authstanzaheading">Used for/see from:</div> >- <ul class="seefrom"> >- [% FOREACH seefro IN summary.seefrom %] >- <li class="heading seefrom auth[% seefro.field | html %]"> >- [% IF seefro.type && seefro.type != 'seefrom' %] >- <span class="label">[% PROCESS authtypelabel type=seefro.type | trim %]:</span> >- [% END %] >- <span class="seefrom">[% PROCESS authheadingdisplay heading=seefro.heading search=seefrosearch authid=seefro.authid %]</span> >- </li> >- [% END %] >- [% PROCESS otherscript headings=summary.otherscript wantcategory='seefrom' %] >- </ul> >- </div> >- [% END %] >- >- [% IF summary.seealso.size %] >- <div class="authstanza seealso"> >- <div class="authstanzaheading">See also:</div> >- <ul class="seelso"> >- [% FOREACH seeals IN summary.seealso %] >- <li class="heading seealso auth[% seeals.field | html %]"> >- [% IF seeals.type && seeals.type != 'seealso' %] >- <span class="label">[% PROCESS authtypelabel type=seeals.type | trim %]:</span> >- [% END %] >- <span class="seealso">[% PROCESS authheadingdisplay heading=seeals.heading search=seeals.search authid=seeals.authid %]</span> >- </li> >- [% END %] >- [% PROCESS otherscript headings=summary.otherscript wantcategory='seealso' %] >- </ul> >- </div> >- [% END %] >- >- [% IF marcflavour == 'UNIMARC' && summary.otherscript %] >- <div class="authstanza"> >- <div class="authstanzaheading">Other forms:</div> >- <ul> >- [% FOREACH otherscrip IN summary.otherscript %] >- <li> >- [% PROCESS language lang=otherscrip.lang | trim %]: >- <span class="otherscript">[% otherscrip.term | html %]</span> >- </li> >- [% END %] >- </ul> >- </div> >+ [% IF authresult.html %] >+ [% authresult.html | $raw %] >+ [% ELSE %] >+ [% PROCESS authresult summary=authresult.summary authid=authresult.authid %] > [% END %] >- >- [% IF ( MARCURLS ) %] >- <div class="authstanza online_resources"> >- <span class="label">Online resources:</span> >- <ul> >- [% FOREACH MARCurl IN MARCURLS %] >- <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %] >- [% IF ( Koha.Preference('OPACURLOpenInNewWindow') ) %] >- <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer"> >- [% ELSE %] >- <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]"> >- [% END %] >- [% MARCurl.linktext | html %]</a> >- [% IF ( MARCurl.notes ) %] >- <ul> >- [% FOREACH note IN MARCurl.notes %] >- <li>[% note.note | html %]</li> >- [% END %] >- </ul> >- [% END %] >- </li> >- [% END # /FOREACH MARCURLS %] >- </ul> >- </div> >- [% END # / IF MARCURLS %] >- >- <div id="authdescriptions" class="toptabs"> >- <ul> >- <li id="tab_descriptions"><a href="#descriptions">Notes</a></li> >- </ul> >- <div id="descriptions"> >- <div class="content_set"> >- [% FOREACH note IN summary.notes %] >- <p class="note auth[% note.field | html %]">[% note.note | html %]</p> >- [% END %] >- </div> >- </div> >- </div> >+ > </div> <!-- / .#userauthdetails --> > </div> <!-- / .col-lg-10/12 --> > </div> <!-- / .row --> >diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl >index ed0a1c7014..c3ac12fed2 100755 >--- a/opac/opac-authoritiesdetail.pl >+++ b/opac/opac-authoritiesdetail.pl >@@ -69,8 +69,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $authid = $query->param('authid'); > $authid = int($authid); >-my $record = GetAuthority( $authid ); >-if ( ! $record ) { >+my $authresult = GetAuthority( $authid ); >+if ( ! $authresult ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early > exit; > } >@@ -86,7 +86,25 @@ if ($display_hierarchy){ > my $count = $authority ? $authority->get_usage_count : 0; > > my $authority_types = Koha::Authority::Types->search( {}, { order_by => ['authtypecode'] } ); >-my $marcurlsarray = GetMarcUrls( $record, $marcflavour ); >+my $marcurlsarray = GetMarcUrls( $authresult, $marcflavour ); >+ >+my $AuthorityXSLTResultsDisplay = C4::Context->preference('AuthorityXSLTResultsDisplay'); >+ if ($authresult && $AuthorityXSLTResultsDisplay) { >+ my $lang = C4::Languages::getlanguage(); >+ >+ my $xsl = $AuthorityXSLTResultsDisplay; >+ >+ $xsl =~ s/\{langcode\}/$lang/g; >+ $xsl =~ s/\{authtypecode\}/$authtypecode/g; >+ my $xslt_engine = Koha::XSLT::Base->new; >+ my $output = $xslt_engine->transform({ xml => $authority->marcxml, file => $xsl }); >+ if ($xslt_engine->err) { >+ warn "XSL transformation failed ($xsl): " . $xslt_engine->err; >+ next; >+ } >+ $authresult->{html} = $output; >+ >+ } > > $template->param( > authority_types => $authority_types, >@@ -94,6 +112,7 @@ $template->param( > authid => $authid, > count => $count, > MARCURLS => $marcurlsarray, >+ authresult => $authresult, > ); > > # find the marc field/subfield used in biblio by this authority >@@ -114,7 +133,7 @@ if ($show_marc) { > my @loop_data = (); > > # loop through each tag >- my @fields = $record->fields(); >+ my @fields = $authresult->fields(); > foreach my $field (@fields) { > my @subfields_data; > >@@ -166,7 +185,7 @@ if ($show_marc) { > } > $template->param( "Tab0XX" => \@loop_data ); > } else { >- my $summary = BuildSummary($record, $authid, $authtypecode); >+ my $summary = BuildSummary($authresult, $authid, $authtypecode); > $template->{VARS}->{'summary'} = $summary; > } > >-- >2.17.1 Created attachment 130224 [details] [review] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 5)Apply patch 6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 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 display This is a similar bug: Bug 30036 Created attachment 130231 [details] [review] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 5)Apply patch 6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 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 display This is a similar bug: Bug 30036 Created attachment 130235 [details] [review] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 5)Apply patch 6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 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 display This is a similar bug: Bug 30036 Created attachment 130276 [details] [review] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 5)Apply patch 6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 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 display This is a similar bug: Bug 30036 Patch no longer applies + whitespace errors 8-(.. git bz apply 21330 Bug 21330 - Add XSLT for authority normal view in OPAC 130276 - Bug 21330: Add xslt for authority normal view in OPAC Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 21330: Add xslt for authority normal view in OPAC .git/rebase-apply/patch:76: trailing whitespace. [% ELSE %] .git/rebase-apply/patch:287: trailing whitespace. .git/rebase-apply/patch:289: trailing whitespace. .git/rebase-apply/patch:299: trailing whitespace. warning: 4 lines add 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-auth-detail.tt .git/rebase-apply/patch:76: trailing whitespace. [% ELSE %] .git/rebase-apply/patch:287: trailing whitespace. .git/rebase-apply/patch:289: trailing whitespace. .git/rebase-apply/patch:299: trailing whitespace. warning: 4 lines applied after fixing whitespace errors. Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-detail.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 21330: Add xslt for authority normal view in OPAC Created attachment 138515 [details] [review] Bug 21330: Add xslt for authority normal view in OPAC This patch provides a xslt stylesheet on authority normal view in OPAC. Have a look on opac-authoritiesdetail.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)Click details on a result and notice the view 5)Apply patch 6)INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 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 display This is a similar bug: Bug 30036 (In reply to David Nind from comment #8) Trailing whitespaces are removed ! thanks :) Created attachment 140333 [details] [review] Bug 21330: Allow XSLT for authority detail view in OPAC This patch adds a syspref that allow to customize the authority detail view in OPAC with XSLT. Test plan: 1. Make sure to have at least one or more authorities 2. OPAC: Home > Authority search(Submit) > Authority search results 3. Click details on a result and notice the view 4. Apply patch 5. INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 6. Write the path where your file is. You can try with the XSLT for biblio for instance: .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl 7. Save changes 8. Repeat 2-3 and notice the display Patch rebased on master Apologies for taking so long to retest! Just a question and a suggestion: 1. Is this for UNIMARC only, or should this work with UNIMARC and MARC21? The example XSLT file suggested only displays "Number of records displayed in: X" (where X = the number of records) for MARC21, but for a UNIMARC installation additional fields are displayed, which I presume is what is expected - that is, pointing to a file on the server will change the display of the details page. 2. Wording for the new system preference (happy to add my suggestions as a follow-up patch). Display authority details in the OPAC using the XSLT stylesheet at: _________ Options: * Enter a path to a custom XSLT file on the server. * Enter a URL for an external stylesheet. If you have multiple stylesheets for different: * languages: use the placeholder {langcode} - this will be replaced with the current interface language * authority types: use the placeholder {authtypecode} - this will be replaced with the current authority type code. (In reply to David Nind from comment #13) > 1. Is this for UNIMARC only, or should this work with UNIMARC and MARC21?.. Answering my own questions: applies to both UNIMARC and MARC21 instances. > 2. Wording for the new system preference (happy to add my suggestions as a > follow-up patch). Will add a follow-up patch with my suggestions, then sign-off. David Created attachment 140408 [details] [review] Bug 21330: Allow XSLT for authority detail view in OPAC This patch adds a syspref that allow to customize the authority detail view in OPAC with XSLT. Test plan: 1. Make sure to have at least one or more authorities 2. OPAC: Home > Authority search(Submit) > Authority search results 3. Click details on a result and notice the view 4. Apply patch 5. INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 6. Write the path where your file is. You can try with the XSLT for biblio for instance: .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl 7. Save changes 8. Repeat 2-3 and notice the display Signed-off-by: David Nind <david@davidnind.com> Created attachment 140409 [details] [review] Bug 21330: (follow-up) Update system preference description Signed-off-by: David Nind <david@davidnind.com> This one does not apply for me, I haven't seen that error before: Applying: Bug 21330: Allow XSLT for authority detail view in OPAC Using index info to reconstruct a base tree... M installer/data/mysql/mandatory/sysprefs.sql Falling back to patching base and 3-way merge... error: The following untracked working tree files would be overwritten by merge: installer/data/mysql/atomicupdate/bug-21330.pl Please move or remove them before you merge. Aborting error: Failed to merge in the changes. Julian, when you are back here: Can you please change 'intranet' to 'staff interface' in descriptions and move the pref to the OPAC tab? Created attachment 148853 [details] [review] Bug 21330: Allow XSLT for authority detail view in OPAC This patch adds a syspref that allow to customize the authority detail view in OPAC with XSLT. Test plan: 1. Make sure to have at least one or more authorities 2. OPAC: Home > Authority search(Submit) > Authority search results 3. Click details on a result and notice the view 4. Apply patch 5. INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 6. Write the path where your file is. You can try with the XSLT for biblio for instance: .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl 7. Save changes 8. Repeat 2-3 and notice the display Signed-off-by: David Nind <david@davidnind.com> Created attachment 148854 [details] [review] Bug 21330: (follow-up) Update system preference description Signed-off-by: David Nind <david@davidnind.com> Created attachment 148855 [details] [review] Bug 21330: (follow-up) Fix new preference text and place Atomic updated fixed : intranet => OPAC Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay New preference moved to opac.pref Bug 30036 is enhancement so this one also. New feature can sound scary ;) Created attachment 148969 [details] [review] Bug 21330: Allow XSLT for authority detail view in OPAC This patch adds a syspref that allow to customize the authority detail view in OPAC with XSLT. Test plan: 1. Make sure to have at least one or more authorities 2. OPAC: Home > Authority search(Submit) > Authority search results 3. Click details on a result and notice the view 4. Apply patch 5. INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 6. Write the path where your file is. You can try with the XSLT for biblio for instance: .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl 7. Save changes 8. Repeat 2-3 and notice the display Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Created attachment 148970 [details] [review] Bug 21330: (follow-up) Update system preference description Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Created attachment 148971 [details] [review] Bug 21330: (follow-up) Fix new preference text and place Atomic updated fixed : intranet => OPAC Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay New preference moved to opac.pref Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Created attachment 149366 [details] [review] Bug 21330: Allow XSLT for authority detail view in OPAC This patch adds a syspref that allow to customize the authority detail view in OPAC with XSLT. Test plan: 1. Make sure to have at least one or more authorities 2. OPAC: Home > Authority search(Submit) > Authority search results 3. Click details on a result and notice the view 4. Apply patch 5. INTRA: Home > Administration > System preferences ->find "AuthorityXSLTOpacDetailsDisplay" 6. Write the path where your file is. You can try with the XSLT for biblio for instance: .../koha/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl 7. Save changes 8. Repeat 2-3 and notice the display Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Created attachment 149367 [details] [review] Bug 21330: (follow-up) Update system preference description Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Created attachment 149368 [details] [review] Bug 21330: (follow-up) Fix new preference text and place Atomic updated fixed : intranet => OPAC Changed to be more like the one adding AuthorityXSLTOpacResultsDisplay New preference moved to opac.pref Signed-off-by: Thibault <thibault.keromnes@univ-paris8.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 149369 [details] [review] Bug 21330: (QA follow-up) Add 'empty' option to system preference description This adds another list item to match the preference description for the results page: * Empty. No XSLT will be applied (default) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> No XSLT? <.< Pushed to master for 23.05. Nice work everyone, thanks! If possible, we would like to see this backported to 22.11.x Enhancement - not backporting to 22.11.x We discussed as a team and agreed on pushing this. Thanks everyone! Pushed to 22.11.x for the next release. Great :D thanks to all |