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> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
482f9bdeb9
commit
051dd6bf0b
|
|
@ -498,7 +498,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"),
|
||||
|
|
@ -520,7 +519,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"),
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -300,7 +300,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,
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -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 | url %][% biblionumber | url -%]
|
||||
[%- END %]
|
||||
|
||||
[% BLOCK subfields_for_item %]
|
||||
<ol>
|
||||
[% FOREACH subfield IN subfields %]
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -440,7 +431,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>
|
||||
|
|
@ -449,7 +440,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>
|
||||
|
|
@ -460,7 +451,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>
|
||||
|
|
|
|||
|
|
@ -934,23 +934,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>
|
||||
|
|
|
|||
|
|
@ -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 ) %]
|
||||
[% ELSIF Koha.Preference('IntranetBiblioDefaultView') == 'labeled_marc' %]
|
||||
<form action="/cgi-bin/koha/catalogue/labeledMARCdetail.pl" method="post">
|
||||
[% ELSIF ( BiblioDefaultViewisbd ) %]
|
||||
[% ELSIF 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">
|
||||
|
|
|
|||
|
|
@ -71,13 +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 %]">
|
||||
[% END %]
|
||||
<a href="[% PROCESS biblio_a_href biblionumber => loopcel.reference %]">
|
||||
[% END %]
|
||||
[% IF ( loopcel.value ) %][% loopcel.value | html %][% END %]
|
||||
[% IF ( loopcel.reference ) %]</a>[% END %]
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 | url %][% biblionumber | url -%]
|
||||
[%- END %]
|
||||
|
|
|
|||
|
|
@ -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 ) %]
|
||||
|
|
|
|||
|
|
@ -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 -->
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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' ) %]
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ if ($date) {
|
|||
numsubscription => scalar @subscriptions_loop,
|
||||
date => $date,
|
||||
subscriptions_loop => \@subscriptions_loop,
|
||||
"BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
|
||||
searched => 1,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue