Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Branches %]
5 [% USE AuthorisedValues %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="ser_subscription-detail" class="ser">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'serials-search.inc' %]
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Details for subscription #[% subscriptionid | html %]</div>
17
18 <div id="doc3" class="yui-t2">
19    
20    <div id="bd">
21         <div id="yui-main">
22         <div class="yui-b">
23         [% INCLUDE 'serials-toolbar.inc' %]
24
25     <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1>
26     [% IF ( abouttoexpire ) %]
27       [% UNLESS closed %]
28         <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
29       [% END %]
30     [% END %]
31     [% IF ( NEEDSCONFIRMATION ) %]
32     <div id="circ_needsconfirmation" class="dialog alert">
33         <h3>Please confirm subscription deletion</h3>
34
35                         <ul>
36                         [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %] 
37                         [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
38                         [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
39                         </ul>
40                         <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
41                         <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
42                         <input type="hidden" name="issueconfirmed" value="1" />
43                         <input type="hidden" name="op" value="del" />
44             <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
45                         </form>
46                         <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
47                         <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
48             <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
49                         </form>
50
51         </div>
52         [% END %] <!-- NEEDSCONFIRMATION -->
53
54 <div id="subscription_description" class="toptabs">
55 <ul class="ui-tabs-nav">
56     <li><a href="#subscription_info">Information</a></li>
57     <li><a href="#subscription_planning">Planning</a></li>
58     <li><a href="#subscription_issues">Issues</a></li>
59     <li><a href="#subscription_summary">Summary</a></li>
60 </ul>
61
62 <div id="subscription_info">
63     <div class="yui-g">
64     <div class="yui-u first">
65     <div class="rows">
66                 <ol>
67                 <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
68         <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
69         <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | html %]">[% aqbooksellername | html %]</a></li>
70         <li><span class="label">Biblio:</span>  <a href="/cgi-bin/koha/catalogue/[% default_bib_view | html %].pl?biblionumber=[% bibnum | html %]">[% bibliotitle | html %]</a> <i>([% bibnum | html %])</i></li>
71         [% IF ( OPACBaseURL ) %]
72             <li>
73                 <span class="label">OPAC view:</span>
74                 <a id="view-subscription-in-opac" target="_blank" href="[% Koha.Preference('OPACBaseURL') | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | html %]">Open in new window.</a>
75             </li>
76         [% END %]
77 [% IF ( branchcode ) %]<li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>[% END %]
78         [% IF ( serialsadditems ) %]
79             <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
80         [% ELSE %]
81             <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
82         [% END %]
83         <li>
84             <span class="label">Serial number:</span>
85             [% IF skip_serialseq %]
86                 Serial number is skipped when an irregularity is found.
87             [% ELSE %]
88                 Serial number is kept when an irregularity is found.
89             [% END %]
90         </li>
91         <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
92         </ol>
93     </div>
94     </div>
95     <div class="yui-u">
96     <div class="rows">
97         <ol>
98         [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
99         [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
100                 [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
101         [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
102         [% IF ( letter ) %]
103             <li>
104                 <span class="label">Patron notification:</span> [% letter | html %]
105                 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | html %]">subscribers</a>)
106             </li>
107         [% END %]
108         [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
109      </ol>
110      </div>
111      </div>
112      </div>
113
114      [% IF additional_fields_for_subscription %]
115     <div class="yui-g">
116       <div class="yui-u first">
117         <div class="rows">
118           <legend>Additional fields:</legend>
119           <ol>
120             [% FOR field IN additional_fields_for_subscription %]
121               <li>
122                 <span class="label">[% field.name | html %]:</span>
123                 [% IF field.authorised_value_category %]
124                   [% AuthorisedValues.GetByCode( field.authorised_value_category, additional_fields.${field.name} ) | html %]
125                 [% ELSE %]
126                   [% additional_fields.${field.name} | html %]
127                 [% END %]
128               </li>
129             [% END %]
130           </ol>
131         </div>
132       </div>
133       </div>
134      [% END %]
135 </div>
136
137     <div id="subscription_planning">
138     <div class="yui-g">
139     <div class="rows">
140         <ol>
141             <li><span class="label">Beginning date:</span> [% startdate | html %]
142             </li>
143             <li><span class="label">Frequency:</span>
144                 [% frequency.description | html %]
145             </li>
146             <li>
147               <span class="label">Manual history: </span>
148                 [% IF ( manualhistory ) %]
149                     Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | html %]">Edit history</a>
150                 [% ELSE %]
151                     Disabled
152                 [% END %]
153             </li>
154             <li><span class="label">Number pattern:</span>
155                 [% numberpattern.label | html %]
156             </li>
157             <li><table>
158             <tr>
159                 <td>Starting with:</td>
160                 [% IF (has_X) %]
161                     <td align="center">[% lastvalue1 | html %]</td>
162                 [% END %]
163                 [% IF (has_Y) %]
164                     <td align="center">[% lastvalue2 | html %]</td>
165                 [% END %]
166                 [% IF (has_Z) %]
167                     <td align="center">[% lastvalue3 | html %]</td>
168                 [% END %]
169             </tr>
170             <tr>
171                 <td>Rollover:</td>
172                 [% IF (has_X) %]
173                     <td align="center">[% numberpattern.whenmorethan1 | html %]</td>
174                 [% END %]
175                 [% IF (has_Y) %]
176                     <td align="center">[% numberpattern.whenmorethan2 | html %]</td>
177                 [% END %]
178                 [% IF (has_Z) %]
179                     <td align="center">[% numberpattern.whenmorethan3 | html %]</td>
180                 [% END %]
181             </tr>
182             </table></li>
183             [% IF ( irregular_issues ) %]
184             <li><span class="label">Irregularity:</span> [% irregular_issues | html %] issues
185             </li>
186             [% END %]
187             <li><span class="label">First arrival:</span> [% firstacquidate | html %]
188             </li>
189         [% IF ( numberlength ) %]<li><span class="label">Number of issues:</span> [% numberlength | html %]</li>[% END %]
190         [% IF ( weeklength ) %]<li><span class="label">Number of weeks:</span> [% weeklength | html %]</li>[% END %]
191         [% IF ( monthlength ) %]<li><span class="label">Number of months:</span> [% monthlength | html %]</li>[% END %]
192         </ol>
193     </div>
194     </div>
195     </div>
196     <div id="subscription_numbering" style="display:none;">
197         <h3>Numbering calculation</h3>
198         <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
199         <table>
200             <tr>
201                 <th>&nbsp;</th>
202                 <th>X</th>
203                 <th>Y</th>
204                 <th>Z</th>
205                 </tr>
206                 <tr>
207                     <td>Add</td>
208                     <td>
209                         [% add1 | html %]
210                     </td>
211                     <td>
212                         [% add2 | html %]
213                     </td>
214                     <td>
215                         [% add3 | html %]
216                     </td>
217                 </tr>
218                 <tr>
219                     <td>once every</td>
220                     <td>[% every1 | html %]</td>
221                     <td>[% every2 | html %]</td>
222                     <td>[% every3 | html %]</td>
223                 </tr>
224                 <tr>
225                     <td>When more than</td>
226                     <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
227                         <i>(is [% innerloop1 | html %])</i>[% END %]</td>
228                     <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
229                         <i>(is [% innerloop2 | html %])</i>[% END %]</td>
230                     <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
231                         <i>(is [% innerloop3 | html %])</i>[% END %]</td>
232                 </tr>
233                 <tr>
234                     <td>Set back to</td>
235                     <td>[% setto1 | html %]</td>
236                     <td>[% setto2 | html %]</td>
237                     <td>[% setto3 | html %]</td>
238                 </tr>
239                 <tr>
240                     <td>
241                             Inner counter
242                     </td>
243                     <td>[% innerloop1 | html %]</td>
244                     <td>[% innerloop2 | html %]</td>
245                     <td>[% innerloop3 | html %]</td>
246                 </tr>
247                 <tr>
248                     <td>
249                             Last value
250                     </td>
251                     <td>[% lastvalue1 | html %]</td>
252                     <td>[% lastvalue2 | html %]</td>
253                     <td>[% lastvalue3 | html %]</td>
254                 </tr>
255             </table>
256     </div>
257     <div id="subscription_issues">
258         <table>
259         <tr>
260             <th>Issue number</th>
261             <th>Planned date</th>
262             <th>Published date</th>
263             <th>Published date (text)</th>
264             <th>Status</th>
265         </tr>
266         [% FOREACH serialslis IN serialslist %]
267             <tr>
268                 <td>
269                     [% serialslis.serialseq | html %]
270                 </td>
271                 <td>
272                     [% IF serialslis.planneddate %]
273                       [% serialslis.planneddate | html %]
274                     [% ELSE %]
275                       Unknown
276                     [% END %]
277                 </td>
278                 <td>
279                     [% IF serialslis.publisheddate %]
280                       [% serialslis.publisheddate | html %]
281                     [% ELSE %]
282                       Unknown
283                     [% END %]
284                 </td>
285                 <td>
286                     [% serialslis.publisheddatetext | html %]
287                 </td>
288                 <td>
289                     [% IF ( serialslis.status1 ) %]Expected[% END %]
290                     [% IF ( serialslis.status2 ) %]Arrived[% END %]
291                     [% IF ( serialslis.status3 ) %]Late[% END %]
292                     [% IF ( serialslis.status4 ) %]Missing[% END %]
293                     [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
294                     [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
295                     [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
296                     [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
297                     [% IF ( serialslis.status5 ) %]Not issued[% END %]
298                     [% IF ( serialslis.status6 ) %]Delete[% END %]
299                     [% IF ( serialslis.status7 ) %]
300                       Claimed
301                       [% IF ( serialslis.claimdate ) %]
302                         [% serialslis.claimdate | html %]
303                       [% END %]
304                     [% END %]
305                     [% IF ( serialslis.status8 ) %]Stopped[% END %]
306                 </td>
307             </tr>
308         [% END %]
309         </table>
310     </div>
311     <div id="subscription_summary">
312     <div class="yui-g">
313     <div class="rows">
314         <ol>
315             <li><span class="label">Start date:</span> [% startdate | html %] </li>
316             <li><span class="label">End date:</span> [% enddate | html %]</li>
317             <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
318             <li><span class="label">History end date:</span> [% histenddate | html %]</li>
319             <li><span class="label">Received issues:</span>[% recievedlist | html %]</li>
320             <li><span class="label">Missing issues:</span>[% missinglist | html %]</li>
321             <li><span class="label">Nonpublic note:</span>[% internalnotes FILTER html_line_break | html %]</li>
322             <li><span class="label">Public note:</span>[% notes FILTER html_line_break | html %]</li>
323             <li><span class="label">History staff note:</span>[% librariannote FILTER html_line_break | html %]</li>
324             <li><span class="label">History OPAC note:</span>[% opacnote FILTER html_line_break | html %]</li>
325         </ol>
326     </div>
327     </div>
328     </div>
329     </div>
330
331     [% IF ( show_acquisition_details ) %]
332         <div id="acquisition_details">
333             <h2>Acquisition details</h2>
334             <table>
335                 <thead>
336                     <tr><th></th><th>Price exc. taxes</th><th>Price inc. taxes</th><th>Fund</th><th></th></tr>
337                 </thead>
338                 <tbody>
339                     <tr>
340                         <td>Ordered amount</td>
341                         <td>[% value_tax_excluded_ordered | html %]</td>
342                         <td>[% value_tax_included_ordered | html %]</td>
343                         <td>[% budget_name_ordered | html %]</td>
344                         <td>
345                             [% IF ( ordered_exists ) %]
346                                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">See basket information</a>
347                             [% END %]
348                         </td>
349                     </tr>
350                     <tr>
351                         <td>Spent amount</td>
352                         <td>[% value_tax_excluded_spent | html %]</td>
353                         <td>[% value_tax_included_spent | html %]</td>
354                         <td>[% budget_name_spent | html %]</td>
355                         <td>
356                             [% IF ( spent_exists ) %]
357                                 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | html %]">See invoice information</a>
358                             [% END %]
359                         </td>
360                     </tr>
361                 </tbody>
362             </table>
363         </div>
364     [% END %]
365
366
367
368 </div>
369 </div>
370
371 <div class="yui-b">
372 [% INCLUDE 'serials-menu.inc' %]
373 </div>
374 </div>
375
376 [% MACRO jsinclude BLOCK %]
377     <script type="text/javascript">
378         var subscriptionid = "[% subscriptionid | html %]";
379         var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
380         var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
381         var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
382     </script>
383     [% Asset.js("js/serials-toolbar.js") | $raw %]
384     <script type="text/javascript">
385         // the english words used in display purposes
386         var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
387         "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
388         $(document).ready(function() {
389             $("#subscription_description").tabs();
390             $("#renewsub").click(function(){
391                 popup([% subscriptionid | html %]);
392                 return false;
393             })
394         });
395     </script>
396 [% END %]
397
398 [% INCLUDE 'intranet-bottom.inc' %]