Bug 2780 - Capitalize strings consistently (serials)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-recieve.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Serials &rsaquo; Check in subscription for [% bibliotitle %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script language="JavaScript" type="text/javascript">
5 //<![CDATA[
6 function popup() {
7         window.open("subscription-renew.pl?subscriptionid=[% subscriptionid %]","subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
8 }
9
10 function barcode_check(){
11     [% IF ( count ) %]
12         var count = '[% count %]';
13         for(var i=1;i<=count;i++){
14
15                 var barcodenum = "barcode"+i;
16                 var statusnum = "status"+i;
17                 var elembarcode = "document.getElementById('"+barcodenum+"')";
18                 var elemstatus = "document.getElementById('"+statusnum+"')";
19 // alert(elembarcode+"\n"+eval(elembarcode+".value));
20 // alert(elemstatus+"\n"+eval(elemstatus+".value"));
21                 if(eval(elembarcode+".value") =='' && eval(elemstatus+".value") == 2){
22                         var answer = confirm("Leave barcode blank?\n - Note: unable to change this later");
23                         if (answer){
24                                 document.f.submit();
25                         } else {
26                                 return false;
27                         }
28                 }
29                 if(eval(elembarcode+".value".indexOf('TEMP')) > 0 && eval(elemstatus+".value") == 2){
30                         var answer = confirm("A barcode was not entered.\nDo you want to put in a barcode\nor do you want to use a system generated barcode?");
31                         if (answer){
32                                 document.f.submit();
33                         } else {
34                                 return false;
35                         }
36                 }
37         }
38     [% END %]
39 }
40 //]]>
41 </script>
42 </head>
43 <body id="ser_serials-recieve" class="ser">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'serials-search.inc' %]
46
47 <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; Check in subscription for <i>[% bibliotitle %]</i></div>
48
49 <div id="doc3" class="yui-t2">
50    
51    <div id="bd">
52         <div id="yui-main">
53         <div class="yui-b">
54
55 <h1>Check In subscription for <i>[% bibliotitle %]</i></h1>
56 <div id="action">
57     <a href="subscription-detail.pl?subscriptionid=[% subscriptionid %]" title="detail of the subscription">Subscription Details</a>
58     <!-- <a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=[% biblionumber %]" class="button" title="all subscriptions on [% bibliotitle %]">Search all subscriptions</a> -->
59     <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]" title="go to [% bibliotitle %]">Show biblio</a>
60     [% IF ( routing ) %]
61     <a href="routing.pl?subscriptionid=[% subscriptionid %]" title="subscription routing list">Routing list</a>
62     [% END %]
63 </div>
64
65 <h2>Expected or late</h2>
66         <form method="post" name="f" action="serials-recieve.pl" onsubmit="return barcode_check()">
67                 <input type="hidden" name="op" value="serialchangestatus" />
68                 <input type="hidden" name="serial" value="[% serial %]" />
69                 <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
70                 <input type="hidden" name="user" value="[% user %]" />
71         <table>
72         <tr>
73                 <th>Numbered</th>
74                 <th>Published on</th>
75         <th>Planned for</th>
76                 <th>Status</th>
77                 <th>Notes</th>
78         </tr>
79         [% FOREACH serialslis IN serialslist %]
80                 <tr>
81                         <td>
82                                 Issue <input type="text" name="serialseq" value="[% serialslis.serialseq %]" size="20" maxlength="100" />
83                         [% IF ( serialslis.serialadditems ) %]
84                                 <br /><br />
85                 Call number <input type="text" name="itemcallnumber" value="[% serialslis.callnumber %]" size="15" maxlength="100" />
86                                 Barcode <input type="text" name="barcode" value="[% serialslis.barcode %]" id="barcode[% serialslis.num %]" size="20" maxlength="20" />
87                         [% END %]
88                         </td>
89                         <td>
90                                 <input type="text" name="publisheddate" value="[% serialslis.publisheddate %]" size="10" maxlength="15" />
91                         [% IF ( serialslis.serialadditems ) %]
92                                 <br /><br />&nbsp;
93                         [% END %]
94                         </td>
95                         <td>
96                                 <input type="text" name="planneddate" value="[% serialslis.planneddate %]" size="10" maxlength="15" />
97                         [% IF ( serialslis.serialadditems ) %]
98                                 <br /><br />
99                                 <select name="branch">
100                                                 <option value="">Library</option>
101                         [% FOREACH branchloo IN serialslis.branchloop %][% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
102                                 [% ELSE %]
103                                 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
104                                 [% END %]
105                         [% END %]
106                                 </select>
107                         [% END %]
108                         </td>
109                         <td>
110                                 <input type="hidden" name="serialid" value="[% serialslis.serialid %]" />
111                                 <select name="status" id="status[% serialslis.num %]">
112                                         [% IF ( serialslis.status1 ) %]
113                                                 <option value="1" selected="selected">Expected</option>
114                                         [% END %]
115                                         [% IF ( serialslis.status2 ) %]
116                                                 <option value="2" selected="selected">Arrived</option>
117                                         [% ELSE %]
118                                                 <option value="2">Arrived</option>
119                                         [% END %]
120                                         [% IF ( serialslis.status3 ) %]
121                                                 <option value="3" selected="selected">Late</option>
122                                         [% ELSE %]
123                                                 <option value="3">Late</option>
124                                         [% END %]
125                                         [% IF ( serialslis.status4 ) %]
126                                                 <option value="4" selected="selected">Missing</option>
127                                         [% ELSE %]
128                                                 <option value="4">Missing</option>
129                                         [% END %]
130                                         [% IF ( serialslis.status5 ) %]
131                         <option value="5" selected="selected">Not available</option>
132                                         [% ELSE %]
133                         <option value="5">Not available</option>
134                                         [% END %]
135                                         [% IF ( serialslis.status6 ) %]
136                                                 <option value="6" selected="selected">Delete</option>
137                                         [% ELSE %]
138                                                 <option value="6">Delete</option>
139                                         [% END %]
140                                 </select>
141                         [% IF ( serialslis.serialadditems ) %]
142                                 <br /><br />
143                                 [% IF ( serialslis.itemstatus ) %]
144                                     [% IF ( serialslis.choice ) %]
145                                                 [% FOREACH itemstatusloo IN serialslis.itemstatusloop %]
146                                                         [% itemstatusloo.itemlib %]: 
147                                                         [% IF ( itemstatusloo.selected ) %]
148                                                         <input type="checkbox" name="itemstatus" value="[% itemstatusloo.itemval %]" checked="checked" />
149                                                         [% ELSE %]
150                                                         <input type="checkbox" name="itemstatus" value="[% itemstatusloo.itemval %]" />
151                                                         [% END %]
152                                                 [% END %]
153                                     [% ELSE %]
154                                         <select name="itemstatus">
155                         <option value="">Item status</option>
156                                                 [% FOREACH itemstatusloo IN serialslis.itemstatusloop %]
157                                                 [% IF ( itemstatusloo.selected ) %]
158                                                         <option value="[% itemstatusloo.itemval %]" selected="selected">[% itemstatusloo.itemlib %]</option>
159                                                         [% ELSE %]
160                                                         <option value="[% itemstatusloo.itemval %]">[% itemstatusloo.itemlib %]</option>
161                                                         [% END %]
162                                                 [% END %]
163                                         </select>
164                                     [% END %]
165                                 [% ELSE %]
166                                 &nbsp;
167                                 [% END %]
168                         [% END %]
169
170                         </td>
171                         <td>
172                                 <input type="text" name="notes" value="[% serialslis.notes %]" size="20" maxlength="255" />
173                         [% IF ( serialslis.serialadditems ) %]
174                                 <br /><br />
175                                 [% IF ( serialslis.itemlocation ) %]
176                                         <select name="location">
177                                                 <option value="">Location</option>
178                                                 [% FOREACH itemlocationloo IN serialslis.itemlocationloop %]
179                                                 [% IF ( itemlocationloo.selected ) %]
180                                                         <option value="[% itemlocationloo.value %]" selected="selected">[% itemlocationloo.itemlocationname %]</option>
181                                                         [% ELSE %]
182                                                         <option value="[% itemlocationloo.value %]">[% itemlocationloo.itemlocationname %]</option>
183                                                 [% END %]
184                                                 [% END %]
185                                         </select>
186                                 [% ELSE %]
187                                 &nbsp;
188                                 [% END %]
189                         [% END %]
190                         </td>
191                 </tr>
192         [% END %]
193         [% UNLESS ( hassubscriptionexpired ) %]
194                 <tr>
195                         <td>
196                                 Manual issue <input type="text" name="serialseq" size="30" maxlength="100" value="[% missingseq %]" />
197                         [% IF ( serialadditems ) %]
198                                 <br /><br />
199                 Call number <input type="text" name="itemcallnumber" value="" size="10" maxlength="15" />
200                                 Barcode <input type="text" name="barcode" value="" size="20" maxlength="20" />
201                         [% END %]
202                         </td>
203                         <td>
204                                 <input type="text" name="publisheddate" value="[% publisheddate %]" size="10" maxlength="15" />
205                         [% IF ( serialadditems ) %]
206                                 <br /><br />&nbsp;
207                         [% END %]
208                         </td>
209                         <td>
210                                 <input type="text" name="planneddate" size="10" maxlength="15" value="[% missingdate %]" />
211                         [% IF ( serialadditems ) %]
212                                 <br /><br />
213                                 <select name="branch">
214                                                 <option value="">Library</option>
215                         [% FOREACH branchloo IN branchloop %]
216                                 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
217                                 [% ELSE %]
218                                 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
219                                 [% END %]
220                         [% END %]
221                                 </select>
222                         [% END %]
223                         </td>
224                         <td>
225                                 [% IF ( frommissing ) %]
226                                 <input type="hidden" name="serialid" value="[% missingid %]" />
227                                 [% ELSE %]
228                                 <input type="hidden" name="serialid" value="0" />
229                                 [% END %]
230                                 <select name="status">
231                                                 [% IF ( frommissing ) %]
232                                                 <option value="2" selected="selected">Arrived</option>
233                                                 [% ELSE %]
234                                                 <option value="2">Arrived</option>
235                                 
236                                                 [% END %]
237                                                 [% IF ( frommissing ) %]
238                                                 <option value="3">Late</option>
239                                                 [% ELSE %]
240                                                 <option value="3" selected="selected">Late</option>
241                                                 [% END %]
242                                                 <option value="4">Missing</option>
243                         <option value="5">Not available</option>
244
245
246                                 </select>
247                         [% IF ( serialadditems ) %]
248                                 <br /><br />
249                                 [% IF ( itemstatus ) %]
250                                     [% IF ( choice ) %]
251                                                 [% FOREACH itemstatusloo IN itemstatusloop %]
252                                                         [% itemstatusloo.itemlib %]: 
253                                                         [% IF ( itemstatusloo.selected ) %]
254                                                         <input type="checkbox" name="itemstatus" value="[% itemstatusloo.itemval %]" checked="checked" />
255                                                         [% ELSE %]
256                                                         <input type="checkbox" name="itemstatus" value="[% itemstatusloo.itemval %]" />
257                                                         [% END %]
258                                                 [% END %]
259                                     [% ELSE %]
260                                         <select name="itemstatus">
261                         <option value="">Item status</option>
262                                                 [% FOREACH itemstatusloo IN itemstatusloop %]
263                                                 [% IF ( itemstatusloo.selected ) %]
264                                                         <option value="[% itemstatusloo.itemval %]" selected="selected">[% itemstatusloo.itemlib %]</option>
265                                                 [% ELSE %]
266                                                         <option value="[% itemstatusloo.itemval %]">[% itemstatusloo.itemlib %]</option>
267 [% END %]
268                                                 [% END %]
269                                         </select>
270                                     [% END %]
271                                 [% ELSE %]
272                                 &nbsp;
273                                 [% END %]
274                         [% END %]
275                         </td>
276                         <td>
277                                 &nbsp;
278                         [% IF ( serialadditems ) %]
279                                 <br /><br />
280                                 [% IF ( itemlocation ) %]
281                                         <select name="location">
282                                                 <option value="">Location</option>
283                                                 [% FOREACH itemlocationloo IN itemlocationloop %]
284                                                 [% IF ( itemlocationloo.selected ) %]
285                                                         <option value="[% itemlocationloo.value %]" selected="selected">[% itemlocationloo.itemlocationname %]</option>
286                                                 [% ELSE %]
287                                                         <option value="[% itemlocationloo.value %]">[% itemlocationloo.itemlocationname %]</option>
288                                         [% END %]
289                                                 [% END %]
290                                         </select>
291                                 [% ELSE %]
292                                 &nbsp;
293                                 [% END %]
294                         [% END %]
295                         </td>
296                 </tr>
297         [% END %]
298         </table>
299         <input type="submit" value="Save changes" accesskey="w" class="button" />
300         [% IF ( hassubscriptionexpired ) %]
301                 <h3>Subscription has expired.</h3>
302                 <p><b>Expected issue status can't be changed. <a href="#" onclick="popup()" class="button">Renew</a> your subscription</b></p>
303         [% END %]
304         [% IF ( abouttoexpire ) %]
305                 <h3>Note: Subscription is about to expire next issue.</h3>
306                 <script type="text/javascript">
307                 <!--
308                 alert(_("Subscription is about to expire next issue"));
309                 //-->
310                 </script>
311         [% END %]       
312         </form>
313
314         <h2>Subscription summary</h2>
315         <form method="post" name="f2" action="serials-recieve.pl">
316                 <input type="hidden" name="op" value="modsubscriptionhistory" />
317                 <input type="hidden" name="serial" value="[% serial %]" />
318                 <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
319                 <input type="hidden" name="user" value="[% user %]" />
320                 <p><label>Librarian</label>[% user %]</p>
321                 <p><label>Starting date:</label><input type="text" name="histstartdate" value="[% histstartdate %]" /> (the date of the 1st subscription)</p>
322                 <p><label>Ending date:</label><input type="text" name="enddate" value="[% enddate %]" />(if empty subscription is still active)</p>
323                 <p>Received issues</p>
324                 <p><textarea name="recievedlist" cols="60" rows="5">[% recievedlist %]</textarea></p>
325                 <p>Missing issues</p>
326                 <p><textarea name="missinglist" cols="60" rows="2">[% missinglist %]</textarea></p>
327                 <p>OPAC note</p>
328                 <p><textarea name="opacnote" cols="60" rows="5">[% opacnote %]</textarea></p>
329                 <input type="submit" value="Save changes" class="button" />
330         </form>
331
332
333 </div>
334 </div>
335
336 <div class="yui-b">
337 [% INCLUDE 'serials-menu.inc' %]
338 </div>
339 </div>
340 [% INCLUDE 'intranet-bottom.inc' %]