Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth-MARCdetail.tt
Martin Renvoize d43eea51dd Bug 28955: (follow-up) Set to fall back
This patch updates the original fix to only set the template parameter
for opac sessions and updates all occurences in templats to check first
for logged_in_user.branchcode before falling back to default_branch

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-24 14:35:36 -10:00

107 lines
5.1 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE AdditionalContents %]
[% PROCESS 'opac-authorities.inc' %]
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Entry [% authtypetext | html %] &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %]
[% IF ( displayhierarchy ) %]
[% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
[% END %]
[% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-authoritiesdetail' bodyclass='scrollto' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/cgi-bin/koha/opac-main.pl">Home</a>
</li>
<li class="breadcrumb-item">
<a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
</li>
<li class="breadcrumb-item active">
<a href="#" aria-current="page">Entry [% authtypetext | html %]</a>
</li>
</ol>
</nav> <!-- /#breadcrumbs -->
<div class="container-fluid">
<div class="row">
[% IF ( OpacNav || OpacNavBottom ) %]
<div class="col-lg-2">
<div id="navigation">
[% INCLUDE 'navigation.inc' %]
</div>
</div>
<div class="col-lg-10 order-first order-md-first order-lg-2">
[% ELSE %]
<div class="col order-first order-md-first order-lg-2">
[% END %]
<div id="userauthMARCdetails" class="maincontent">
<div id="views">
<span class="view">
<a id="Normalview" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid | html %]">Normal view</a>
</span>
<span class="view">
<span id="MARCview">MARC view</span>
</span>
</div>
[% IF ( displayhierarchy ) %]
<div id="hierarchies">
[% PROCESS showhierarchy trees = loophierarchies marc = 1 %]
</div>
[% END %]
<h1>Entry [% authtypetext | html %]</h1>
<p><a href="opac-search.pl?type=opac&amp;q=[% authid | uri %]&amp;idx=an,phr">Number of records used in: [% count | html %]</a></p>
[% FOREACH Tag0X IN Tab0XX %]
<p><strong>[% Tag0X.tag | html %]</strong></p>
<ul>
[% FOREACH subfiel IN Tag0X.subfield %]
<li><strong>[% subfiel.marc_lib | $raw %]:</strong>
[% IF subfiel.isurl %]<a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
[% ELSE %][% subfiel.marc_value | html %][% END %]</li>
[% END %]
</ul>
[% END %]
</div> <!-- / #userauthMARCdetails -->
</div> <!-- / .col-lg-10/12 -->
</div> <!-- / .row -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
<script>
$(document).ready(function() {
[% IF ( displayhierarchy ) %]
$('#hierarchies').jstree({
"types" : {
"default" : {
"icon" : "fa fa-file-o"
}
},
"plugins" : [ "types" ]
}).on('ready.jstree', function(){
$(this).jstree('open_all')
$("#hier"+[% authid | html %]+"_anchor").on("click",
function(e){e.preventDefault(); return false;}
).css("text-decoration", "none").css("color", "#333");
$(".currentauth").css("text-decoration", "none").css("color", "#333");
}).bind("select_node.jstree", function (e, data) {
e.preventDefault();
document.location.href = data.node.a_attr.href;
});
[% END %]
});
</script>
[% END %]