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