Bugzilla – Attachment 122142 Details for
Bug 12561
Remove non-XSLT views
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12561: Remove non-XSLT views
Bug-12561-Remove-non-XSLT-views.patch (text/plain), 48.45 KB, created by
Jonathan Druart
on 2021-06-18 14:22:42 UTC
(
hide
)
Description:
Bug 12561: Remove non-XSLT views
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-06-18 14:22:42 UTC
Size:
48.45 KB
patch
obsolete
>From e3472df8bf8abe46382a85be2bc1c49baf7ddd85 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 18 Jun 2021 15:27:40 +0200 >Subject: [PATCH] Bug 12561: Remove non-XSLT views > >--- > C4/Auth.pm | 4 - > C4/Search.pm | 59 +------ > catalogue/detail.pl | 11 +- > .../en/modules/admin/preferences/opac.pref | 6 +- > .../admin/preferences/staff_interface.pref | 2 +- > .../bootstrap/en/modules/opac-MARCdetail.tt | 8 +- > .../bootstrap/en/modules/opac-detail.tt | 155 +----------------- > .../bootstrap/en/modules/opac-results.tt | 92 +---------- > .../bootstrap/en/modules/opac-shelves.tt | 60 +------ > opac/opac-detail.pl | 27 +-- > opac/opac-shelves.pl | 28 ++-- > opac/opac-tags.pl | 30 ++-- > virtualshelves/shelves.pl | 10 +- > 13 files changed, 54 insertions(+), 438 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 2a2e3b67795..03485d13598 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -492,8 +492,6 @@ sub get_template_and_user { > item_level_itypes => C4::Context->preference('item-level_itypes'), > patronimages => C4::Context->preference("patronimages"), > singleBranchMode => ( Koha::Libraries->search->count == 1 ), >- XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), >- XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), > noItemTypeImages => C4::Context->preference("noItemTypeImages"), > marcflavour => C4::Context->preference("marcflavour"), > OPACBaseURL => C4::Context->preference('OPACBaseURL'), >@@ -612,8 +610,6 @@ sub get_template_and_user { > suggestion => "" . C4::Context->preference("suggestion"), > virtualshelves => "" . C4::Context->preference("virtualshelves"), > OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"), >- OPACXSLTDetailsDisplay => C4::Context->preference("OPACXSLTDetailsDisplay"), >- OPACXSLTResultsDisplay => C4::Context->preference("OPACXSLTResultsDisplay"), > SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"), > SyndeticsEnabled => C4::Context->preference("SyndeticsEnabled"), > SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"), >diff --git a/C4/Search.pm b/C4/Search.pm >index 0db460a8083..281fb7af767 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1661,17 +1661,10 @@ sub searchResults { > my ($bibliotag,$bibliosubf)=GetMarcFromKohaField( 'biblio.biblionumber' ); > > # set stuff for XSLT processing here once, not later again for every record we retrieved >- my $xslfile; >- my $xslsyspref; >- if( $is_opac ){ >- $xslsyspref = "OPACXSLTResultsDisplay"; >- $xslfile = C4::Context->preference( $xslsyspref ); >- } else { >- $xslsyspref = "XSLTResultsDisplay"; >- $xslfile = C4::Context->preference( $xslsyspref ) || "default"; >- } >- my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >- my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+ my $xslsyspref = $is_opac ? 'OPACXSLTResultsDisplay' : 'XSLTResultsDisplay'; >+ my $xslfile = C4::Context->preference( $xslsyspref ) || "default"; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); > > my $userenv = C4::Context->userenv; > my $logged_in_user >@@ -1725,50 +1718,6 @@ sub searchResults { > # Build summary if there is one (the summary is defined in the itemtypes table) > $oldbiblio->{description} = $itemtype ? $itemtype->{translated_description} : q{}; > >- # FIXME: this is only used in the deprecated non-XLST opac results >- if ( !$xslfile && $is_opac && $itemtype && $itemtype->{summary} ) { >- my $summary = $itemtypes{ $oldbiblio->{itemtype} }->{summary}; >- my @fields = $marcrecord->fields(); >- >- my $newsummary; >- foreach my $line ( "$summary\n" =~ /(.*)\n/g ){ >- my $tags = {}; >- foreach my $tag ( $line =~ /\[(\d{3}[\w|\d])\]/ ) { >- $tag =~ /(.{3})(.)/; >- if($marcrecord->field($1)){ >- my @abc = $marcrecord->field($1)->subfield($2); >- $tags->{$tag} = $#abc + 1 ; >- } >- } >- >- # We catch how many times to repeat this line >- my $max = 0; >- foreach my $tag (keys(%$tags)){ >- $max = $tags->{$tag} if($tags->{$tag} > $max); >- } >- >- # we replace, and repeat each line >- for (my $i = 0 ; $i < $max ; $i++){ >- my $newline = $line; >- >- foreach my $tag ( $newline =~ /\[(\d{3}[\w|\d])\]/g ) { >- $tag =~ /(.{3})(.)/; >- >- if($marcrecord->field($1)){ >- my @repl = $marcrecord->field($1)->subfield($2); >- my $subfieldvalue = $repl[$i]; >- $newline =~ s/\[$tag\]/$subfieldvalue/g; >- } >- } >- $newsummary .= "$newline\n"; >- } >- } >- >- $newsummary =~ s/\[(.*?)]//g; >- $newsummary =~ s/\n/<br\/>/g; >- $oldbiblio->{summary} = $newsummary; >- } >- > # Pull out the items fields > my @fields = $marcrecord->field($itemtag); > my $marcflavor = C4::Context->preference("marcflavour"); >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 14b4f1794b5..7249b6f555a 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -117,12 +117,11 @@ my $fw = GetFrameworkCode($biblionumber); > my $showallitems = $query->param('showallitems'); > my $marcflavour = C4::Context->preference("marcflavour"); > >-# XSLT processing of some stuff >-my $xslfile = C4::Context->preference('XSLTDetailsDisplay') || "default"; >-my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >-my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >- >-if ( $xslfile ) { >+{ >+ # XSLT processing of some stuff >+ my $xslfile = C4::Context->preference('XSLTDetailsDisplay') || "default"; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); > > my $searcher = Koha::SearchEngine::Search->new( > { index => $Koha::SearchEngine::BIBLIOS_INDEX } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 49ffe1b2d62..72331ff8a65 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -90,17 +90,17 @@ OPAC: > - 'Display lists in the OPAC using XSLT stylesheet at: ' > - pref: OPACXSLTListsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="default">default</a>" for the default one</li><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.' >+ - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTListsDisplay" data-value="default">default</a>" for the default one</li><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.' > - > - 'Display OPAC results using XSLT stylesheet at: ' > - pref: OPACXSLTResultsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTResultsDisplay" data-value="">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTResultsDisplay" data-value="default">default</a>" for the default one</li><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.' >+ - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTResultsDisplay" data-value="default">default</a>" for the default one</li><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.' > - > - 'Display OPAC details using XSLT stylesheet at: ' > - pref: OPACXSLTDetailsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="OPACXSLTDetailsDisplay" data-value="">leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><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.' >+ - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="OPACXSLTDetailsDisplay" data-value="default">default</a>" for the default one</li><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.' > - > - "Show itemtype icons in the OPAC: " > - pref: OpacNoItemTypeImages >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 a2b25e51680..654944e54a2 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 >@@ -71,7 +71,7 @@ Staff interface: > - 'Display lists in the staff interface using XSLT stylesheet at: ' > - pref: XSLTListsDisplay > class: file >- - '<br />Options:<ul><li><a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="">Leave empty</a> for "no xslt"</li><li>enter "<a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="default">default</a>" for the default one</li><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' >+ - '<br />Options:<ul><li>Enter "<a href="#" class="set_syspref" data-syspref="XSLTListsDisplay" data-value="default">default</a>" for the default one</li><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' > - > - 'Display results in the staff interface using XSLT stylesheet at: ' > - pref: XSLTResultsDisplay >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >index c7043a383dd..929b904f564 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt >@@ -33,10 +33,8 @@ > </div> > <h1 class="title">[% bibliotitle | html %] (Record no. [% biblio.biblionumber | html %])</h1> > >- [% IF ( OPACXSLTDetailsDisplay ) %] >- <div id="switchview_div">[ <a id="switchview" href="/cgi-bin/koha/opac-showmarc.pl?id=[% biblio.biblionumber | html %]&viewas=html">view plain</a> ]</div> >- <div id="plainmarc"></div> >- [% END %] >+ <div id="switchview_div">[ <a id="switchview" href="/cgi-bin/koha/opac-showmarc.pl?id=[% biblio.biblionumber | html %]&viewas=html">view plain</a> ]</div> >+ <div id="plainmarc"></div> > > <div id="labeledmarc"> > <table id="marc" class="table table-bordered table-striped"> >@@ -177,7 +175,6 @@ > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] > <script> >-[% IF ( OPACXSLTDetailsDisplay ) %] > $(document).ready(function(){ > var loaded = 0; > var toggle = 0; >@@ -210,6 +207,5 @@ > } > }); > }); >-[% END %] > </script> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 353504ef574..27210f40244 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -138,161 +138,8 @@ > <span class="view"><a id="ISBDview" class="btn btn-link" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-list-ul" aria-hidden="true"></i> ISBD view</a></span> > [% END %] > </div> >- [% IF ( OPACXSLTDetailsDisplay ) %] >- [% XSLTBloc | $raw %] >- [% ELSE %] >- <h1 class="title">[% INCLUDE 'biblio-title.inc' %]</h1> >- [% IF ( author ) %] >- <span class="results_summary author h3">by <a class="contributors" href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author | html %]</a></span> >- [% END %] >- >- <span class="results_summary"> >- [% IF ( unititle ) %], [% unititle | html %][% END %] >- </span> >- >- [% IF ( MARCAUTHORS ) %] >- <div class="results_summary"> >- <span class="label">Additional authors:</span> >- [% FOREACH MARCAUTHOR IN MARCAUTHORS %] >- [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %] >- [% MARCAUTHOR_SUBFIELDS_LOO.separator | html %] >- [% IF ( MARCAUTHOR.authoritylink ) %] >- <a title="â¡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" class="contributors authority_link" data-authid="[% MARCAUTHOR.authoritylink | html %]" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]"> >- [% ELSE %] >- <a title="â¡[% MARCAUTHOR_SUBFIELDS_LOO.code | html %] [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]" class="contributors" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN MARCAUTHOR_SUBFIELDS_LOO.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]"> >- [% END %] >- [% MARCAUTHOR_SUBFIELDS_LOO.value | html %]</a> >- [% END %] >- [% IF (MARCAUTHOR.authoritylink) %] >- <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCAUTHOR.authoritylink | html %]"><i class="fa fa-search" aria-hidden="true"></i></a> >- [% END %] >- [% IF IDREF and MARCAUTHOR.unimarc3 %] >- <a href="/cgi-bin/koha/opac-idref.pl?unimarc3=[% MARCAUTHOR.unimarc3 | uri %]" title="IdRef" rel="gb_page_center[600,500]">IdRef</a> >- [% END %] >- [% UNLESS ( loop.last ) %]|[% END %] >- [% END # /FOREACH MARCAUTHORS %] >- </div> >- [% END # IF MARCAUTHORS %] >- >- [% IF ( MARCSERIES ) %] >- <span class="results_summary series"><span class="label">Series:</span> >- [% FOREACH MARCSERIE IN MARCSERIES %] >- [% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %] >- [% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %] >- <a href="/cgi-bin/koha/opac-search.pl?q=se:[% MARCSERIES_SUBFIELDS_LOO.value |url %]">[% MARCSERIES_SUBFIELDS_LOO.value | html %]</a> >- [% END %] >- [% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %] >- . [% MARCSERIES_SUBFIELDS_LOO.volumenum | html %] >- [% END %] >- [% END %] >- [% UNLESS ( loop.last ) %]|[% END %] >- [% END # / FOREACH MARCSERIES %] >- </span> >- [% END # /MARCSERIES %] >- >- [% IF ( editionstatement ) %] >- <span class="results_summary edition"><span class="label">Edition statement:</span>[% editionstatement | html %][% IF ( editionresponsibility ) %]/[% editionresponsibility | html %][% END %]</span> >- [% END %] >- [% IF ( publishercode ) %] >- <span class="results_summary publisher"><span class="label">Published by :</span> >- <a href="/cgi-bin/koha/opac-search.pl?q=pb:[% publishercode |url %] "> >- [% publishercode | html %] >- </a> [% IF ( place ) %]([% place | html %])[% END %] [% IF ( publicationyear ) %], [% publicationyear | html %][% END %] >- </span> >- [% END %] >- >- [% IF ( pages ) %] >- <span class="results_summary physical"><span class="label">Physical details:</span> [% pages | html %] [% illus | html %] [% size | html %]</span> >- [% END %] >- >- [% IF ( MARCISBNS ) %] >- <span class="results_summary isbn"><span class="label">ISBN:</span>[% FOREACH MARCISBN IN MARCISBNS %][% MARCISBN | html %][% IF ( loop.last ) %].[% ELSE %]; [% END %][% END %]</span> >- [% ELSE %] >- [% IF ( normalized_isbn ) %] >- <span class="results_summary isbn"><span class="label">ISBN: </span>[% normalized_isbn | html %]</span> >- [% END %] >- [% END %] >- >- [% IF ( issn ) %] >- <span class="results_summary issn"><span class="label">ISSN:</span>[% issn | html %]</span> >- [% END %] >- >- [% IF ( collectiontitle ) %] >- <span class="results_summary collection"><span class="label">Collection: </span> >- [% collectiontitle | html %] >- [% IF ( collectionissn ) %] [% ', ISSN ' _ collectionissn | html %][% END %] >- [% IF ( collectionvolume ) %] [% ' ; ' _ collectionvolume | html %] [% END %] > >- </span> >- [% END %] >- >- [% IF ( unititles ) %] >- <span class="results_summary unititle"><span class="label">Uniform titles:</span> >- [% FOREACH unititle IN unititles %] >- [% unititle.unititle | html %] ; >- [% END %] >- </span> >- [% END %] >- >- [% IF ( MARCSUBJCTS ) %] >- <div class="results_summary subjects"> >- <span class="label">Subject(s):</span> >- >- [% FOREACH MARCSUBJCT IN MARCSUBJCTS %] >- [% subjectsloop = loop %] >- [% FOREACH SUBFIELD IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %] >- [% SUBFIELD.separator | html %] >- <a title="[% '$' _ SUBFIELD.code _ ' ' _ SUBFIELD.value | html %]" class="subject" href="/cgi-bin/koha/opac-search.pl?q=[% FOREACH link_loo IN SUBFIELD.link_loop %][% link_loo.operator |url %][% link_loo.limit |url %]:[% link_loo.link |url %][% END %]">[% SUBFIELD.value | html %]</a> >- [% END %] >- [% IF (MARCSUBJCT.authoritylink) %] >- <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% MARCSUBJCT.authoritylink | html %]"><i class="fa fa-search" aria-hidden="true"></i></a> >- [% END %] >- [% UNLESS ( loop.last ) %] | [% END %] >- [% END # / FOREACH MARCSUBJCTS %] >- </div> >- [% ELSE # /IF MARCSUBJCTS %] >- [% IF ( subjects ) %] >- <span class="results_summary subjects"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a class="subject" href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject | html %]</a> | [% END %]</span> >- [% END %] >- [% END # /IF MARCSUBJCTS %] >- >- [% IF ( copyrightdate ) %] >- <span class="results_summary year"><span class="label">Year: </span>[% copyrightdate | html %]</span> >- [% END %] >- >- [% IF ( MARCURLS ) %] >- <div class="results_summary online_resources"><span class="label">Online resources:</span> >- <ul> >- [% FOREACH MARCurl IN MARCURLS %] >- <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %] >- >- [% IF ( OPACURLOpenInNewWindow ) %] >- [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >- <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer"> >- [% ELSE %] >- <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer"> >- [% END %] >- [% ELSE %] >- [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] >- <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]"> >- [% ELSE %] >- <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]"> >- [% END %] >- [% 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 %] >- [% END # / IF OPACXSLTDetailsDisplay %] >+ [% XSLTBloc | $raw %] > > [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %] > <span class="results_summary itemtype"><span class="label">Item type: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 9fb16173c4b..6a5251a8e98 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -445,98 +445,8 @@ > <span class="Z3988" title="[% SEARCH_RESULT.coins | html %]"></span> > [% END %] > <div id="title_summary_[% SEARCH_RESULT.biblionumber | html %]" class="title_summary"> >- [% IF ( OPACXSLTResultsDisplay ) %] >- [% SEARCH_RESULT.XSLTResultsRecord | $raw %] >- [% ELSE %] >- [% IF ( BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title"> >- [% ELSE %] >- [% IF ( BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | url %]" title="View details for this title"> >- [% END %] >- [% END %] >- >- [% INCLUDE 'biblio-title.inc' biblio=SEARCH_RESULT %] > >- [% IF ( SEARCH_RESULT.author ) %] >- by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author | url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author | html %]</a> >- [% ELSE %] >- >- [% END %] >- >- <span class="results_summary publisher"> >- <span class="label">Publication:</span> >- [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %] >- [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %] >- [% IF ( SEARCH_RESULT.publicationyear ) %] >- [% SEARCH_RESULT.publicationyear | html %] >- [% ELSE %] >- [% IF ( SEARCH_RESULT.copyrightdate ) %] >- [% SEARCH_RESULT.copyrightdate | html %] >- [% END %] >- [% END %] >- [% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages | html %][% END %] >- [% IF ( SEARCH_RESULT.notes ) %], [% SEARCH_RESULT.notes | html %][% END %] >- [% IF ( SEARCH_RESULT.size ) %] [% SEARCH_RESULT.size | html %][% END %] >- [% IF ( SEARCH_RESULT.timestamp ) %] <em>(modified on [% SEARCH_RESULT.timestamp | html %])</em>[% END %] >- </span> >- >- [% IF ( SEARCH_RESULT.summary ) %] >- <span class="result_summary"> >- [% SEARCH_RESULT.summary | html %] >- </span> >- [% END %] >- >- [% IF ( SEARCH_RESULT.copyrightdate ) %] >- <span class="results_summary date"> >- <span class="label">Date:</span> >- [% SEARCH_RESULT.copyrightdate | html %] >- </span> >- [% END %] >- >- <span class="results_summary"> >- <span class="label">Availability:</span> >- [% IF ( SEARCH_RESULT.available_items_loop.size() ) %] >- <span class="available"><strong>Items available:</strong> >- [% FOREACH available_items_loo IN SEARCH_RESULT.available_items_loop %] >- <span> >- [% IF ( singleBranchMode ) %] >- <span class="shelvingloc">[% available_items_loo.location | html %]</span> >- [% ELSE %] >- [% available_items_loo.branchname | html %] >- [% END %] >- >- [% IF ( OPACItemsResultsDisplay ) %] >- [% UNLESS ( singleBranchMode ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %] >- [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/opac-search.pl?q=callnum:%22[% available_items_loo.itemcallnumber | url %]%22">[% available_items_loo.itemcallnumber | html %]</a>][% END %] >- [% END %] >- ([% available_items_loo.count | html %]), >- </span> >- [% END # / FOREACH available_items_loo %] >- </span> >- [% ELSE %] >- [% IF ( SEARCH_RESULT.ALTERNATEHOLDINGS ) %] >- [% FOREACH ALTERNATEHOLDING IN SEARCH_RESULT.ALTERNATEHOLDINGS %] >- <span id="alternateholdings">[% ALTERNATEHOLDING.holding | html %]</span>, >- [% END %] >- [% ELSE %] >- <span class="unavailable">No items available:</span> >- [% END %] >- [% END # / IF SEARCH_RESULT.available_items_loop.size %] >- >- <span class="unavailable"> >- [% IF ( SEARCH_RESULT.onloancount ) %] Checked out ([% SEARCH_RESULT.onloancount | html %]), [% END %] >- [% IF ( SEARCH_RESULT.withdrawncount ) %] Withdrawn ([% SEARCH_RESULT.withdrawncount | html %]), [% END %] >- [% UNLESS ( SEARCH_RESULT.hidelostitems ) %][% IF ( SEARCH_RESULT.itemlostcount ) %] Lost ([% SEARCH_RESULT.itemlostcount | html %]),[% END %][% END %] >- [% IF ( SEARCH_RESULT.damagedcount ) %] Damaged ([% SEARCH_RESULT.damagedcount | html %]),[% END %] >- [% IF ( SEARCH_RESULT.orderedcount ) %] On order ([% SEARCH_RESULT.orderedcount | html %]),[% END %] >- [% IF ( SEARCH_RESULT.onholdcount ) %] On hold ([% SEARCH_RESULT.onholdcount | html %]),[% END %] >- [% IF ( SEARCH_RESULT.intransitcount ) %] In transit ([% SEARCH_RESULT.intransitcount | html %]),[% END %] >- </span> >- </span> <!-- / .results_summary --> >- [% END # / IF OPACXSLTResultsDisplay %] >+ [% SEARCH_RESULT.XSLTResultsRecord | $raw %] > > [% IF ( SEARCH_RESULT.score_avg ) %] > <div class="results_summary"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 2b767b11f10..402e563663d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -480,66 +480,8 @@ > [% END %] > > </div> >- [% IF ( itemsloo.XSLTBloc ) %] >- [% itemsloo.XSLTBloc | $raw %] >- [% ELSE %] >- >- [% IF ( itemsloo.BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- [% IF ( itemsloo.BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]" title="View details for this title"> >- [% END %] >- [% END %] >- >- [% INCLUDE 'biblio-title.inc' biblio=itemsloo %] >- </a> > >- [% IF ( itemsloo.author ) %] >- by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author | html %]</a> >- [% ELSE %] >- >- [% END %] >- >- <span class="results_summary"> >- <span class="label">Publication:</span> >- [% IF ( itemsloo.place ) %] >- [% itemsloo.place | html %] >- [% END %] >- [% IF ( itemsloo.publishercode ) %] >- [% itemsloo.publishercode | html %] >- [% END %] >- [% IF ( itemsloo.publicationyear ) %] >- [% itemsloo.publicationyear | html %] >- [% ELSE %] >- [% IF ( itemsloo.copyrightdate ) %] >- [% itemsloo.copyrightdate | html %] >- [% END %] >- [% END %] >- [% IF ( itemsloo.pages ) %]. [% itemsloo.pages | html %][% END %] >- [% IF ( itemsloo.notes ) %], [% itemsloo.notes | html %][% END %] >- [% IF ( itemsloo.item('size') ) %] [% itemsloo.item('size') | html %][% END %] >- </span> >- <span class="results_summary"> >- <span class="label">Holdings:</span> >- [% IF ( itemsloo.ITEM_RESULTS ) %] >- [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %] >- [% ITEM_RESULT.homebranch | html %] >- [% IF ( ITEM_RESULT.location_opac ) %] >- <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span> >- [% END %] >- [% IF ( ITEM_RESULT.itemcallnumber ) %] >- ([% ITEM_RESULT.itemcallnumber | html %]) >- [% IF ( loop.last ) %].[% ELSE %],[% END %] >- [% END %] >- [% END %] >- [% ELSE %] >- This record has no items. >- [% END %] >- </span> >- [% END # / IF itemsloo.XSLTBloc %] >+ [% itemsloo.XSLTBloc | $raw %] > > [% IF ( TagsShowEnabled && itemsloo.TagLoop.size ) %] > <div class="results_summary tags"> >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index dff6d3ac5ed..49609aebb89 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -173,12 +173,12 @@ SetUTF8Flag($record); > my $marcflavour = C4::Context->preference("marcflavour"); > my $ean = GetNormalizedEAN( $record, $marcflavour ); > >-# XSLT processing of some stuff >-my $xslfile = C4::Context->preference('OPACXSLTDetailsDisplay'); >-my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >-my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+{ > >-if ( $xslfile ) { >+ # XSLT processing of some stuff >+ my $xslfile = C4::Context->preference('OPACXSLTDetailsDisplay') || "default"; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); > > my $searcher = Koha::SearchEngine::Search->new( > { index => $Koha::SearchEngine::BIBLIOS_INDEX } >@@ -764,23 +764,6 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { > } > } > >-## get notes and subjects from MARC record >-if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { >- my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); >- my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); >- my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); >- my $marcseriesarray = GetMarcSeries ($record,$marcflavour); >- my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >- >- $template->param( >- MARCSUBJCTS => $marcsubjctsarray, >- MARCAUTHORS => $marcauthorsarray, >- MARCSERIES => $marcseriesarray, >- MARCURLS => $marcurlsarray, >- MARCISBNS => $marcisbnsarray, >- ); >-} >- > my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour, opac => 1 }); > > if( C4::Context->preference('ArticleRequests') ) { >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 483876188e9..aa80b91512c 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -293,9 +293,9 @@ if ( $op eq 'view' ) { > } > > # Lists display falls back to search results configuration >- my $xslfile = C4::Context->preference('OPACXSLTListsDisplay'); >- my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >- my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+ my $xslfile = C4::Context->preference('OPACXSLTListsDisplay') || "default"; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); > > my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' }); > >@@ -317,18 +317,16 @@ if ( $op eq 'view' ) { > }); > $record_processor->process($record); > >- if ($xslfile) { >- my $variables = { >- anonymous_session => ($loggedinuser) ? 0 : 1 >- }; >- $this_item->{XSLTBloc} = XSLTParse4Display( >- $biblionumber, $record, >- "OPACXSLTListsDisplay", 1, >- undef, $sysxml, >- $xslfile, $lang, >- $variables >- ); >- } >+ my $variables = { >+ anonymous_session => ($loggedinuser) ? 0 : 1 >+ }; >+ $this_item->{XSLTBloc} = XSLTParse4Display( >+ $biblionumber, $record, >+ "OPACXSLTListsDisplay", 1, >+ undef, $sysxml, >+ $xslfile, $lang, >+ $variables >+ ); > > my $marcflavour = C4::Context->preference("marcflavour"); > my $itemtype = Koha::Biblioitems->search({ biblionumber => $content->biblionumber })->next->itemtype; >diff --git a/opac/opac-tags.pl b/opac/opac-tags.pl >index 05a4c1a74ae..8eb9151a897 100755 >--- a/opac/opac-tags.pl >+++ b/opac/opac-tags.pl >@@ -287,22 +287,20 @@ if ($loggedinuser) { > # BZ17530: 'Intelligent' guess if result can be article requested > $tag->{artreqpossible} = ( $art_req_itypes->{ $tag->{itemtype} // q{} } || $art_req_itypes->{ '*' } ) ? 1 : q{}; > >- my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay'); >- my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >- my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >- >- if ($xslfile) { >- my $variables = { >- anonymous_session => ($loggedinuser) ? 0 : 1 >- }; >- $tag->{XSLTBloc} = XSLTParse4Display( >- $tag->{biblionumber}, $record, >- "OPACXSLTResultsDisplay", 1, >- $hidden_items, $sysxml, >- $xslfile, $lang, >- $variables >- ); >- } >+ my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay') || "default"; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); >+ >+ my $variables = { >+ anonymous_session => ($loggedinuser) ? 0 : 1 >+ }; >+ $tag->{XSLTBloc} = XSLTParse4Display( >+ $tag->{biblionumber}, $record, >+ "OPACXSLTResultsDisplay", 1, >+ $hidden_items, $sysxml, >+ $xslfile, $lang, >+ $variables >+ ); > > my $date = $tag->{date_created} || ''; > $date =~ /\s+(\d{2}\:\d{2}\:\d{2})/; >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index d233eb1355b..b15ca9cd2df 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -254,8 +254,8 @@ if ( $op eq 'view' ) { > ); > > my $xslfile = C4::Context->preference('XSLTListsDisplay'); >- my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >- my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+ my $lang = C4::Languages::getlanguage(); >+ my $sysxml = C4::XSLT::get_xslt_sysprefs(); > > my @items; > while ( my $content = $contents->next ) { >@@ -263,10 +263,8 @@ if ( $op eq 'view' ) { > my $biblionumber = $content->biblionumber; > my $record = GetMarcBiblio({ biblionumber => $biblionumber }); > >- if ( $xslfile ) { >- $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay", >- 1, undef, $sysxml, $xslfile, $lang); >- } >+ $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay", >+ 1, undef, $sysxml, $xslfile, $lang); > > my $marcflavour = C4::Context->preference("marcflavour"); > my $itemtype = Koha::Biblioitems->search({ biblionumber => $content->biblionumber })->next->itemtype; >-- >2.20.1
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 12561
:
122141
|
122142
|
122143
|
122144
|
122600
|
122601
|
122607
|
122608
|
122609
|
122610
|
123262
|
123263
|
123264
|
123265
|
123267
|
123268
|
123269
|
123270
|
123300
|
123301
|
123302
|
123303
|
123305
|
123306
|
123307
|
123308