Bug 30650: Prevent pickup to be created on holiday
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-auth-detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AdditionalContents %]
5 [% PROCESS 'opac-authorities.inc' %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %] &rsaquo; Authority search &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% BLOCK cssinclude %]
12     [% IF ( displayhierarchy ) %]
13         [% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
14     [% END %]
15 [% END %]
16 [%# FIXME authid is modified when passed authheadingdisplay %]
17 [%# It's then wrong in the JS %]
18 [% SET original_authid = authid %]
19 </head>
20 [% INCLUDE 'bodytag.inc' bodyid='opac-authoritiesdetail' bodyclass='scrollto' %]
21 [% INCLUDE 'masthead.inc' %]
22
23     <div class="main">
24         <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
25             <ol class="breadcrumb">
26                 <li class="breadcrumb-item">
27                     <a href="/cgi-bin/koha/opac-main.pl">Home</a>
28                 </li>
29                 <li class="breadcrumb-item">
30                     <a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
31                 </li>
32                 <li class="breadcrumb-item active">
33                     <a href="#" aria-current="page">[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</a>
34                 </li>
35             </ol>
36         </nav> <!-- /#breadcrumbs -->
37
38         <div class="container-fluid">
39             <div class="row">
40                 [% IF ( OpacNav || OpacNavBottom ) %]
41                     <div class="col col-lg-2 order-2 order-lg-1">
42                         <div id="navigation">
43                             [% INCLUDE 'navigation.inc' %]
44                         </div>
45                     </div>
46                     <div class="col-lg-10 order-first order-md-first order-lg-2">
47                 [% ELSE %]
48                     <div class="col order-first order-md-first order-lg-2">
49                 [% END %]
50                     <div id="userauthdetails" class="maincontent">
51                         <div id="views">
52                             <span class="view">
53                                 <span id="Normalview">Normal view</span>
54                             </span>
55                             <span class="view">
56                                 <a id="MARCview" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid | html %]&amp;marc=1">MARC view</a>
57                             </span>
58                         </div>
59
60                         [% IF ( displayhierarchy ) %]
61                             <div id="hierarchies">
62                                 [% PROCESS showhierarchy trees = loophierarchies %]
63                             </div>
64                         [% END %]
65
66                         <h1>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</h1>
67
68                         <div class="usedin">
69                             [% IF count %]<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;q=[% authid | uri %]&amp;idx=an,phr">Number of records used in: [% count | html %]</a>[% ELSE %]This authority is not used in any records.[% END %]
70                         </div>
71
72                         <div class="authstanza">
73                             [% FOREACH authorize IN summary.authorized %]
74                                 <div class="heading authorized auth[% seefro.field | html %]">
75                                     <span class="label">Preferred form: </span>
76                                     <span class="authorized">[% authorize.heading | html %]</span>
77                                 </div>
78                             [% END %]
79                             [% PROCESS otherscript headings=summary.otherscript wantcategory='preferred' %]
80                         </div>
81
82                         [% IF summary.seefrom.size %]
83                             <div class="authstanza seefrom">
84                                 <div class="authstanzaheading">Used for/see from:</div>
85                                 <ul class="seefrom">
86                                     [% FOREACH seefro IN summary.seefrom %]
87                                         <li class="heading seefrom auth[% seefro.field | html %]">
88                                             [% IF seefro.type && seefro.type != 'seefrom' %]
89                                                 <span class="label">[% PROCESS authtypelabel type=seefro.type | trim %]:</span>
90                                             [% END %]
91                                             <span class="seefrom">[% PROCESS authheadingdisplay heading=seefro.heading search=seefrosearch authid=seefro.authid %]</span>
92                                         </li>
93                                     [% END %]
94                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seefrom' %]
95                                 </ul>
96                             </div>
97                         [% END %]
98
99                         [% IF summary.seealso.size %]
100                             <div class="authstanza seealso">
101                                 <div class="authstanzaheading">See also:</div>
102                                 <ul class="seelso">
103                                     [% FOREACH seeals IN summary.seealso %]
104                                         <li class="heading seealso auth[% seeals.field | html %]">
105                                             [% IF seeals.type && seeals.type != 'seealso' %]
106                                                 <span class="label">[% PROCESS authtypelabel type=seeals.type | trim %]:</span>
107                                             [% END %]
108                                             <span class="seealso">[% PROCESS authheadingdisplay heading=seeals.heading search=seeals.search authid=seeals.authid %]</span>
109                                         </li>
110                                     [% END %]
111                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seealso' %]
112                                 </ul>
113                             </div>
114                         [% END %]
115
116                         [% IF marcflavour == 'UNIMARC' && summary.otherscript %]
117                             <div class="authstanza">
118                                 <div class="authstanzaheading">Other forms:</div>
119                                 <ul>
120                                     [% FOREACH otherscrip IN summary.otherscript %]
121                                         <li>
122                                             [% PROCESS language lang=otherscrip.lang | trim %]:
123                                             <span class="otherscript">[% otherscrip.term | html %]</span>
124                                         </li>
125                                     [% END %]
126                                 </ul>
127                             </div>
128                         [% END %]
129
130                         [% IF ( MARCURLS ) %]
131                             <div class="authstanza online_resources">
132                                 <span class="label">Online resources:</span>
133                                 <ul>
134                                     [% FOREACH MARCurl IN MARCURLS %]
135                                         <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %]
136                                             [% IF ( Koha.Preference('OPACURLOpenInNewWindow') ) %]
137                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
138                                             [% ELSE %]
139                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">
140                                             [% END %]
141                                             [% MARCurl.linktext | html %]</a>
142                                             [% IF ( MARCurl.notes ) %]
143                                                 <ul>
144                                                     [% FOREACH note IN MARCurl.notes %]
145                                                         <li>[% note.note | html %]</li>
146                                                     [% END %]
147                                                 </ul>
148                                             [% END %]
149                                         </li>
150                                     [% END # /FOREACH MARCURLS %]
151                                 </ul>
152                             </div>
153                         [% END # / IF MARCURLS %]
154
155                         <div id="authdescriptions" class="toptabs">
156                             <ul class="nav nav-tabs" role="tablist">
157                                 <li id="tab_descriptions" class="nav-item" role="presentation">
158                                     <a class="nav-link active" id="descriptions-tab" data-toggle="tab" href="#descriptions" role="tab" aria-controls="descriptions" aria-selected="true" href="#descriptions">Notes</a>
159                                 </li>
160                             </ul>
161                             <div class="tab-content">
162                                 <div class="tab-pane active" role="tabpanel" aria-labelledby="descriptions-tab" id="descriptions">
163                                     <div class="content_set">
164                                         [% FOREACH note IN summary.notes %]
165                                             <p class="note auth[% note.field | html %]">[% note.note | html %]</p>
166                                         [% END %]
167                                     </div>
168                                 </div>
169                             </div> <!-- /.tab-content -->
170                         </div>
171                     </div> <!-- / .#userauthdetails -->
172                 </div> <!-- / .col-lg-10/12 -->
173             </div> <!-- / .row -->
174         </div> <!-- / .container-fluid -->
175     </div> <!-- / .main -->
176
177 [% INCLUDE 'opac-bottom.inc' %]
178 [% BLOCK jsinclude %]
179 [% IF ( displayhierarchy ) %]
180     [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
181 [% END %]
182 <script>
183     $(document).ready(function() {
184         [% IF ( displayhierarchy ) %]
185             $('#hierarchies').jstree({
186                 "types" : {
187                     "default" : {
188                         "icon" : "fa fa-file-o"
189                     }
190                 },
191                 "plugins" : [ "types" ]
192             }).on('ready.jstree', function(){
193                 $(this).jstree('open_all');
194                 $("#hier"+[% original_authid | html %]+"_anchor").on("click",
195                     function(e){e.preventDefault(); return false;}
196                 ).css("text-decoration", "none").css("color", "#333");
197                 $(".currentauth").css("text-decoration", "none").css("color", "#333");
198             }).bind("select_node.jstree", function (e, data) {
199                 e.preventDefault();
200                 document.location.href = data.node.a_attr.href;
201             });
202         [% END %]
203     });
204 </script>
205 [% END %]