Bugzilla – Attachment 129618 Details for
Bug 29609
Links to guess the biblio default view need to be centralized
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29609: Centralized code to build the link to a biblio detail page
Bug-29609-Centralized-code-to-build-the-link-to-a-.patch (text/plain), 41.39 KB, created by
Martin Renvoize (ashimema)
on 2022-01-19 15:50:17 UTC
(
hide
)
Description:
Bug 29609: Centralized code to build the link to a biblio detail page
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-01-19 15:50:17 UTC
Size:
41.39 KB
patch
obsolete
>From 672b400f50ad00e90616e47e785c48264baeb653 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Dec 2021 15:12:17 +0100 >Subject: [PATCH] Bug 29609: Centralized code to build the link to a biblio > detail page > >There are 2 prefs that control the default view of biblio detail pages: >IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC. >There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't >allow access to those page for staff members. > >This code need to be in a single place to avoid discrepancy. > >Test plan: >Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm >that the links of biblio point to the correct view. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 2 -- > basket/basket.pl | 9 -------- > .../value_builder/marc21_linking_section.pl | 2 -- > .../value_builder/unimarc_field_4XX.pl | 3 --- > circ/pendingreserves.pl | 1 - > .../prog/en/includes/biblio-title.inc | 12 ++-------- > .../prog/en/includes/html_helpers.inc | 13 +++++++++++ > .../modules/acqui/neworderempty_duplicate.tt | 5 +---- > .../prog/en/modules/catalogue/results.tt | 15 +++---------- > .../prog/en/modules/cataloguing/addbiblio.tt | 20 +++-------------- > .../prog/en/modules/cataloguing/moveitem.tt | 6 ++--- > .../prog/en/modules/reports/cat_issues_top.tt | 7 +----- > .../prog/en/modules/serials/serials-edit.tt | 2 +- > .../en/modules/serials/subscription-detail.tt | 2 +- > .../bootstrap/en/includes/html_helpers.inc | 11 ++++++++++ > .../bootstrap/en/modules/opac-basket.tt | 2 +- > .../bootstrap/en/modules/opac-imageviewer.tt | 22 ++++--------------- > .../bootstrap/en/modules/opac-opensearch.tt | 10 ++------- > .../en/modules/opac-readingrecord.tt | 8 +------ > .../bootstrap/en/modules/opac-shelves.tt | 10 +-------- > .../bootstrap/en/modules/opac-showreviews.tt | 22 +++---------------- > opac/opac-basket.pl | 9 -------- > serials/checkexpiration.pl | 1 - > serials/serials-edit.pl | 17 -------------- > serials/subscription-detail.pl | 18 --------------- > 25 files changed, 51 insertions(+), 178 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 1cfeed48cc..5f9566eaa2 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -481,7 +481,6 @@ sub get_template_and_user { > my $minPasswordLength = C4::Context->preference('minPasswordLength'); > $minPasswordLength = 3 if not $minPasswordLength or $minPasswordLength < 3; > $template->param( >- "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, > EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), > GoogleJackets => C4::Context->preference("GoogleJackets"), > OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), >@@ -503,7 +502,6 @@ sub get_template_and_user { > $template->param( > AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), > AutoLocation => C4::Context->preference("AutoLocation"), >- "BiblioDefaultView" . C4::Context->preference("IntranetBiblioDefaultView") => 1, > PatronAutoComplete => C4::Context->preference("PatronAutoComplete"), > FRBRizeEditions => C4::Context->preference("FRBRizeEditions"), > IndependentBranches => C4::Context->preference("IndependentBranches"), >diff --git a/basket/basket.pl b/basket/basket.pl >index 80a30ecee5..af74865139 100755 >--- a/basket/basket.pl >+++ b/basket/basket.pl >@@ -108,15 +108,6 @@ foreach my $biblionumber ( @bibs ) { > $dat->{MARCURLS} = $marcurlsarray; > $dat->{HASAUTHORS} = $hasauthors; > >- if ( C4::Context->preference("IntranetBiblioDefaultView") eq "normal" ) { >- $dat->{dest} = "/cgi-bin/koha/catalogue/detail.pl"; >- } >- elsif ( C4::Context->preference("IntranetBiblioDefaultView") eq "marc" ) { >- $dat->{dest} = "/cgi-bin/koha/catalogue/MARCdetail.pl"; >- } >- else { >- $dat->{dest} = "/cgi-bin/koha/catalogue/ISBDdetail.pl"; >- } > push( @results, $dat ); > } > >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 5bff56495d..ad25daecb9 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -255,7 +255,6 @@ my $launcher = sub { > } else { > $to = $from + $resultsperpage; > } >- my $defaultview = 'BiblioDefaultView' . C4::Context->preference('BiblioDefaultView'); > > # my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search"; > # foreach my $sort (@sort_by){ >@@ -285,7 +284,6 @@ my $launcher = sub { > to => $to, > numbers => \@numbers, > search => $search, >- $defaultview => 1, > Search => 0 > ); > >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index 83dcaf3c8c..da6e5242e7 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -439,8 +439,6 @@ sub plugin { > }else{ > $to = $from + $resultsperpage ; > } >- my $defaultview = >- 'BiblioDefaultView' . C4::Context->preference('BiblioDefaultView'); > # my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search"; > # foreach my $sort (@sort_by){ > # $link.="&sort_by=".$sort."&"; >@@ -469,7 +467,6 @@ sub plugin { > to => $to, > numbers => \@numbers, > search => $search, >- $defaultview => 1, > Search => 0 > ); > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 8ca7245b3c..db3187e9b0 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -298,7 +298,6 @@ $template->param( > from => $startdate, > to => $enddate, > holds_info => \@holds_info, >- "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, > HoldsToPullStartDate => C4::Context->preference('HoldsToPullStartDate') || PULL_INTERVAL, > HoldsToPullEndDate => C4::Context->preference('ConfirmFutureHolds') || 0, > messages => \@messages, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc >index a714f4ca80..f3c79154e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc >@@ -1,13 +1,5 @@ > [% IF ( link ) %] >- [% IF ( BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblio.biblionumber |url %]"> >- [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] >- <a class="title" href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblio.biblionumber |url %]"> >- [% ELSIF ( BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblio.biblionumber |url %]"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber |url %]"> >- [% END %] >+ <a href="[% PROCESS biblio_a_href biblionumber => biblio.biblionumber %]" class="title"> > [% END %] > > [% IF ( biblio.title ) %] >@@ -36,4 +28,4 @@ > > [% IF ( link ) %] > </a> >-[% END %] >\ No newline at end of file >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 802e6621ce..16c3f4ac6e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -69,6 +69,19 @@ > [% END %] > [% END %] > >+[% BLOCK biblio_a_href -%] >+ [%- IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' && Koha.Preference('viewMARC') -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=" -%] >+ [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' && Koha.Preference('viewLabeledMARC') -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=" -%] >+ [%- ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' && Koha.Preference('viewISBD') -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=" -%] >+ [%- ELSE -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" -%] >+ [%- END -%] >+ [%- this_biblio_href %][% biblionumber | url -%] >+[%- END %] >+ > [% BLOCK subfields_for_item %] > <ol> > [% FOREACH subfield IN subfields %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt >index cd2beae0ce..bd9bb5d41c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty_duplicate.tt >@@ -34,10 +34,7 @@ > > <div class="dialog alert"> > <h4>Duplicate warning</h4> >-<p>You selected a record from an external source that matches an existing record in your catalog: [% IF ( BiblioDefaultViewmarc ) %]<a target="_blank" title="Open in new window" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblionumber |url %]"> >-[% ELSIF ( BiblioDefaultViewlabeled_marc ) %]<a target="_blank" title="Open in new window" href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblionumber |url %]"> >-[% ELSIF ( BiblioDefaultViewisbd ) %]<a target="_blank" title="Open in new window" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblionumber |url %]"> >-[% ELSE %]<a target="_blank" title="Open in new window" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber |url %]">[% END %] <i class="fa fa-window-restore"></i> [% duplicatetitle | html %]</a></p> >+<p>You selected a record from an external source that matches an existing record in your catalog: <a target="_blank" title="Open in new window" href="[% PROCESS biblio_a_href biblionumber => biblionumber %]"><i class="fa fa-window-restore"></i> [% duplicatetitle | html %]</a></p> > </div> > > <div class="row"> >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 4115ddacf7..c910393ba5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -7,15 +7,6 @@ > [% PROCESS 'i18n.inc' %] > [% SET footerjs = 1 %] > [% USE AuthorisedValues %] >-[% IF BiblioDefaultViewmarc %] >- [% SET DetailPage="MARCdetail.pl" %] >-[% ELSIF BiblioDefaultViewlabeled_marc %] >- [% SET DetailPage="labeledMARCdetail.pl" %] >-[% ELSIF BiblioDefaultViewisbd %] >- [% SET DetailPage="ISBDdetail.pl" %] >-[% ELSE %] >- [% SET DetailPage="detail.pl" %] >-[% END %] > [% INCLUDE 'doc-head-open.inc' %] > > <title>[% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %] › Catalog › Koha</title> >@@ -438,7 +429,7 @@ > <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]"> > [% IF ( LocalCoverImages ) %][% SEARCH_RESULT.localimage | html %] > <div id="local-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image local-coverimg"> >- <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >+ <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'> > <img src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&biblionumber=[% SEARCH_RESULT.biblionumber | uri %]" alt="Local cover image" /> > </a> > <div class="hint">Local cover image</div> >@@ -447,7 +438,7 @@ > > [% IF ( AmazonCoverImages && SEARCH_RESULT.normalized_isbn ) %] > <div id="amazon-bookcoverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image amazon-bookcoverimg"> >- <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >+ <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'> > <img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="Cover image from Amazon.com" /> > </a> > <div class="hint">Amazon cover image</div> >@@ -458,7 +449,7 @@ > [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %] > [% IF ( coce_id ) %] > <div id="coce-coverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image coce-coverimg"> >- <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber | url %]"> >+ <a href="[% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]" class => 'p1'> > <span style="block" title="[% SEARCH_RESULT.biblionumber | url %]" class="[% coce_id | html %]" id="coce-thumbnail[% SEARCH_RESULT.biblionumber | html %]"></span> > </a> > <div class="hint">Coce cover image</div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 5325d6e91f..c6cc41a7b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -928,23 +928,9 @@ function PopupMARCFieldDoc(field) { > </div> <!-- /.btn-group --> > [% UNLESS (circborrowernumber) %][%# Hide in fast cataloging %] > [% IF (biblionumber) %] >- [% IF ( BiblioDefaultViewmarc ) %] >- <div class="btn-group"> >- <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a> >- </div> >- [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] >- <div class="btn-group"> >- <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a> >- </div> >- [% ELSIF ( BiblioDefaultViewisbd ) %] >- <div class="btn-group"> >- <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% biblionumber |url %]">Cancel</a> >- </div> >- [% ELSE %] >- <div class="btn-group"> >- <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber |url %]">Cancel</a> >- </div> >- [% END %] >+ <div class="btn-group"> >+ <a href="[% PROCESS biblio_a_href biblionumber => biblionumber %]" class="btn btn-default" id="cancel">Cancel</a> >+ </div> > [% ELSE %] > <div class="btn-group"> > <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cancel</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >index 784034b5fd..edca69b821 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/moveitem.tt >@@ -31,11 +31,11 @@ > <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> > > [% BLOCK actions %] >- [% IF ( BiblioDefaultViewmarc ) %] >+ [% IF Koha.Preference('IntranetBiblioDefaultView') == 'marc' %] > <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="post"> >- [% ELSIF ( BiblioDefaultViewlabeled_marc ) %] >+ [% IF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' %] > <form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post"> >- [% ELSIF ( BiblioDefaultViewisbd ) %] >+ [% IF Koha.Preference('IntranetBiblioDefaultView') == 'isbd' %] > <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="post"> > [% ELSE %] > <form action="/cgi-bin/koha/catalogue/detail.pl" method="post"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >index 96bb85d177..0b82834f33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >@@ -71,12 +71,7 @@ > <td> > > [% IF ( loopcel.reference ) %] >-[% IF ( loopcel.BiblioDefaultViewmarc ) %] >- <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% loopcel.reference |url %]"> >-[% ELSIF ( loopcel.BiblioDefaultViewisbd ) %] >- <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% loopcel.reference |url %]"> >-[% ELSE %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopcel.reference |url %]"> >+ <a href="[% PROCESS biblio_a_href biblionumber => loopcel.reference %]"> > [% END %] > [% END %] > [% IF ( loopcel.value ) %][% loopcel.value | html %][% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 642dd2cc5e..20c24486a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -471,7 +471,7 @@ $(document).ready(function() { > [% END %] > [% END %] > [% END %] >- <li><a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% biblionumber | uri %]" title="go to [% bibliotitle | html %]">Show biblio</a></li></ul> >+ <li><a href="[% PROCESS biblio_a_href biblionumber => biblionumber %]" title="go to [% bibliotitle | html %]">Show biblio</a></li></ul> > </aside> > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >index 2ec7fefd52..184afcc1a8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt >@@ -111,7 +111,7 @@ > <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li> > <li><span class="label">Librarian identity:</span> [% librarian | html %]</li> > <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li> >- <li><span class="label">Biblio:</span> <a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% bibnum | uri %]">[% bibliotitle | html %]</a> <em>([% bibnum | html %])</em></li> >+ <li><span class="label">Biblio:</span> <a href="[% PROCESS biblio_a_href biblionumber => bibnum %]">[% bibliotitle | html %]</a> <em>([% bibnum | html %])</em></li> > [% IF ( OPACBaseURL ) %] > <li> > <span class="label">OPAC view:</span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >index 7a964de596..f483abba75 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/html_helpers.inc >@@ -22,3 +22,14 @@ > </div> > [% END %] > [% END %] >+ >+[% BLOCK biblio_a_href -%] >+ [%- IF Koha.Preference('BiblioDefaultView') == 'marc' -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=" -%] >+ [%- ELSIF Koha.Preference('BiblioDefaultView') == 'isbd' -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=" -%] >+ [%- ELSE -%] >+ [%- SET this_biblio_href = "/cgi-bin/koha/opac-detail.pl?biblionumber=" -%] >+ [%- END -%] >+ [%- this_biblio_href %][% biblionumber | url -%] >+[%- END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index 5c3e6beaa9..4e6219c0bd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -286,7 +286,7 @@ > <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]"> > </td> > <td> >- <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest | html %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a> >+ <a href="#" onclick="openBiblio('[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a> > <!-- COinS / Openurl --> > <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span> > [% IF ( TagsInputEnabled && loggedinusername ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >index d968ce98e0..36d4d51eb4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >@@ -45,15 +45,8 @@ > <a href="/cgi-bin/koha/opac-main.pl">Home</a> > </li> > <li class="breadcrumb-item"> >- [% IF ( BiblioDefaultViewmarc ) %] >- <a href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]"> >- [% ELSE %] >- [% IF ( BiblioDefaultViewisbd ) %] >- <a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]"> >- [% ELSE %] >- <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]"> >- [% END %] >- [% END %][% INCLUDE 'biblio-title.inc' %]</a> >+ <a href="[% PROCESS biblio_a_href biblionumber => biblionumber %]"> >+ [% INCLUDE 'biblio-title.inc' %]</a> > </li> > <li class="breadcrumb-item active"> > <a href="#" aria-current="page">Images</a> >@@ -77,15 +70,8 @@ > <div class="row"> > <div class="col-lg-9 maincontent"> > <h1 class="title">Images for >- [% IF ( BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- [% IF ( BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title"> >- [% END %] >- [% END %][% INCLUDE 'biblio-title.inc' %]</a> [% biblio.author | html %] >+ <a class="title" href="[% PROCESS biblio_a_href biblionumber => biblionumber %]" title="View details for this title"> >+ [% INCLUDE 'biblio-title.inc' %]</a> [% biblio.author | html %] > </h1> > </div> <!-- / col-lg-9 --> > </div> <!-- / .row --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >index de69346dc4..798c724c7d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >@@ -42,13 +42,7 @@ > <item> > <title>[% INCLUDE 'biblio-title-head.inc' biblio=SEARCH_RESULT %]</title> > <dc:identifier>ISBN:[% SEARCH_RESULT.isbn | html %]</dc:identifier> >- [% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %] >- <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link> >- [% ELSIF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %] >- <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link> >- [% ELSE %] >- <link>[% OPACBaseURL | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | uri %]</link> >- [% END %] >+ <link>[% OPACBaseURL | url %][% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]</link> > <description><![CDATA[ > [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %]<img src="https://images-na.ssl-images-amazon.com/images/P/[% SEARCH_RESULT.normalized_isbn | uri %].01.TZZZZZZZ.jpg" alt="" />[% END %][% END %] > [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %]<img src="http://www.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | uri %]/SC.GIF&client=[% SEARCH_RESULT.SyndeticsClientCode | uri %]&type=xw10[% IF ( SEARCH_RESULT.normalized_upc ) %]&upc=[% SEARCH_RESULT.normalized_upc | uri %][% END %][% IF ( SEARCH_RESULT.normalized_oclc ) %]&oclc=[% SEARCH_RESULT.normalized_oclc | uri %][% END %]" alt="" /> >@@ -116,7 +110,7 @@ > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <entry> > <title>[% SEARCH_RESULT.title | html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %]</title> >- <link>[% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% END %][% END %]</link> >+ <link>[% OPACBaseURL | url %][% PROCESS biblio_a_href biblionumber => SEARCH_RESULT.biblionumber %]</link> > <!-- <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> --> > <updated>[% SEARCH_RESULT.timestamp | html %]</updated> > <id>[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]</id> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 54290b47e6..6860faca33 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -139,13 +139,7 @@ > [% END %] > </td> > <td> >- [% IF issue.BiblioDefaultViewmarc %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a> >- [% ELSIF issue.BiblioDefaultViewisbd %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a> >- [% END %] >+ [% INCLUDE 'biblio-title.inc' biblio=issue, link => 1 %] > <p class="results-summary item-details">[% issue.author | html %]</p> > > [% IF ( Koha.Preference( 'OpacStarRatings' ) == 'all' ) %] >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 615fc44990..d2b95e5777 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -463,15 +463,7 @@ > [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %] > [% SET custom_cover_image_url = itemsloo.biblio_object.custom_cover_image_url %] > [% IF custom_cover_image_url %] >- [% IF ( itemsloo.BiblioDefaultViewmarc ) %] >- <a class="custom_cover_image" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]"> >- [% ELSE %] >- [% IF ( itemsloo.BiblioDefaultViewisbd ) %] >- <a class="custom_cover_image" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% itemsloo.biblionumber |url %]"> >- [% ELSE %] >- <a class="custom_cover_image" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% itemsloo.biblionumber |url %]"> >- [% END %] >- [% END %] >+ <a class="custom_cover_image" href="[% PROCESS biblio_a_href biblionumber => itemsloo.biblionumber %]"> > <img alt="Cover image" src="[% custom_cover_image_url | url %]" /></a> > [% END %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >index c0a4c518f1..dbcdbf421e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >@@ -44,16 +44,8 @@ > <tr> > <td> > <p> >- [% IF ( BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- [% IF ( BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title"> >- [% END %] >- [% END %] >- [% INCLUDE 'biblio-title.inc' biblio=review %] >+ <a class="title" href="[% PROCESS biblio_a_href biblionumber => review.biblionumber %]" title="View details for this title"> >+ [% INCLUDE 'biblio-title.inc' biblio=review %] > </a> > [% IF ( review.author ) %] > by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author | html %]</a> >@@ -118,15 +110,7 @@ > </p> > </td> > <td> >- [% IF ( review.BiblioDefaultViewmarc ) %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- [% IF ( review.BiblioDefaultViewisbd ) %] >- <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title"> >- [% ELSE %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title"> >- [% END %] >- [% END %] >+ <a class="title" href="[% PROCESS biblio_a_href biblionumber => review.biblionumber %]" title="View details for this title"> > [% IF ( OPACAmazonCoverImages ) %] > [% IF ( review.normalized_isbn ) %] > <img src="https://images-na.ssl-images-amazon.com/images/P/[% review.normalized_isbn | html %].01.TZZZZZZZ.jpg" alt="" class="thumbnail" /> >diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl >index ef137b95b0..1cea0e5756 100755 >--- a/opac/opac-basket.pl >+++ b/opac/opac-basket.pl >@@ -159,15 +159,6 @@ foreach my $biblionumber ( @bibs ) { > $dat->{MARCURLS} = $marcurlsarray; > $dat->{HASAUTHORS} = $hasauthors; > >- if ( C4::Context->preference("BiblioDefaultView") eq "normal" ) { >- $dat->{dest} = "opac-detail.pl"; >- } >- elsif ( C4::Context->preference("BiblioDefaultView") eq "marc" ) { >- $dat->{dest} = "opac-MARCdetail.pl"; >- } >- else { >- $dat->{dest} = "opac-ISBDdetail.pl"; >- } > push( @results, $dat ); > } > >diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl >index 6ce76af267..e253f1876b 100755 >--- a/serials/checkexpiration.pl >+++ b/serials/checkexpiration.pl >@@ -108,7 +108,6 @@ if ($date) { > numsubscription => scalar @subscriptions_loop, > date => $date, > subscriptions_loop => \@subscriptions_loop, >- "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, > searched => 1, > ); > } >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 8c5720e88f..2b7f17103e 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -425,7 +425,6 @@ if ( $op and $op eq 'serialchangestatus' ) { > } > } > my $location = $serialdatalist[0]->{'location'}; >-my $default_bib_view = get_default_view(); > > $template->param( > subscriptionid => $serialdatalist[0]->{subscriptionid}, >@@ -435,24 +434,8 @@ $template->param( > bibliotitle => $biblio->title, > biblionumber => $serialdatalist[0]->{'biblionumber'}, > serialslist => \@serialdatalist, >- default_bib_view => $default_bib_view, > location => $location, > (uc(C4::Context->preference("marcflavour"))) => 1 > > ); > output_html_with_http_headers $query, $cookie, $template->output; >- >-sub get_default_view { >- my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); >- my %views = C4::Search::enabled_staff_search_views(); >- if ( $defaultview eq 'isbd' && $views{can_view_ISBD} ) { >- return 'ISBDdetail'; >- } >- elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) { >- return 'MARCdetail'; >- } >- elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) { >- return 'labeledMARCdetail'; >- } >- return 'detail'; >-} >diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl >index 6e8204810f..7cae3806e7 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -122,8 +122,6 @@ my @irregular_issues = split /;/, $subs->{irregularity}; > my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subs->{periodicity}); > my $numberpattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subs->{numberpattern}); > >-my $default_bib_view = get_default_view(); >- > my $subscription_object = Koha::Subscriptions->find( $subscriptionid ); > $template->param( > available_additional_fields => [ Koha::AdditionalFields->search( { tablename => 'subscription' } ) ], >@@ -165,25 +163,9 @@ $template->param( > intranetstylesheet => C4::Context->preference('intranetstylesheet'), > intranetcolorstylesheet => C4::Context->preference('intranetcolorstylesheet'), > irregular_issues => scalar @irregular_issues, >- default_bib_view => $default_bib_view, > orders_grouped => $orders_grouped, > (uc(C4::Context->preference("marcflavour"))) => 1, > mana_comments => $subs->{comments}, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >- >-sub get_default_view { >- my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); >- my %views = C4::Search::enabled_staff_search_views(); >- if ( $defaultview eq 'isbd' && $views{can_view_ISBD} ) { >- return 'ISBDdetail'; >- } >- elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) { >- return 'MARCdetail'; >- } >- elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) { >- return 'labeledMARCdetail'; >- } >- return 'detail'; >-} >-- >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 29609
:
128129
|
129618
|
132297
|
132372