Bug 17245: Untranslatable abbreviated names of seasons.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tt
1 [% USE AuthorisedValues %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10
11 <script type="text/javascript">
12 //<![CDATA[
13 function generateReceive(subscriptionid) {
14     if(nbissues=prompt(_("How many issues do you want to receive ?"))){
15         document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
16     }
17 }
18 function print_slip(subscriptionid,issue){
19     var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
20     window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
21 }
22 function addsubscriptionid()
23 {
24         var tab=new Array();
25     var serialids = document.edition.serialid;
26     for (i=0; i<serialids.length; i++){
27       if (serialids[i].checked == true){
28         var found=false;
29         for (var val in tab){
30           if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
31         }
32         if (found == false){
33           tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
34         }
35       }
36     }
37     var string="";
38     for (var val in tab){
39       string = string + tab[val] + ",";
40     }
41     string=string.substring(0,string.length -1);
42     document.edition.subscriptionid.value=string;
43 }
44 function popup(subscriptionid) {
45     newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
46 }
47
48 function generateNext(subscriptionid) {
49         if(confirm(_("Do you really want to generate next serial?"))){
50                 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
51         }
52 }
53
54 function CheckAll( node ) {
55     $("#"+node).checkCheckboxes();
56     return false;
57 }
58 function CheckNone( node ) {
59     $("#"+node).unCheckCheckboxes();
60     return false;
61 }
62 $(document).ready(function() {
63     $('#subscription_years').tabs();
64     $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
65         "aoColumnDefs": [
66             { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
67             { "sType": "title-string", "aTargets" : [ "title-string" ] }
68         ],
69         "aaSorting": [[0, 'desc']],
70         "sDom": 't',
71         "bAutoWidth": false,
72         "bPaginate": false,
73         "bInfo": false,
74         "bFilter": false,
75     } ));
76 });
77
78 //]]>
79 </script>
80 </head>
81 <body id="ser_serials-collection" class="ser">
82 [% INCLUDE 'header.inc' %]
83 [% INCLUDE 'serials-search.inc' %]
84
85 <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; Serial collection information for  <i>[% bibliotitle %]</i></div>
86
87 <div id="doc3" class="yui-t2">
88    
89    <div id="bd">
90         <div id="yui-main">
91         <div class="yui-b">
92
93
94 [% UNLESS ( popup ) %]
95         [% INCLUDE 'serials-toolbar.inc' %]
96
97         <h1>Serial collection information for  <i>[% bibliotitle %]</i>
98         [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) %]) [% END %]
99                 [% IF ( callnumber ) %]callnumber: [% callnumber %][% END %]</h1>
100 [% END %]
101
102 [% IF ( subscriptions ) %]
103 <table>
104 [% IF ( subscriptions.size == 1 ) %]
105 <caption> Subscription summary</caption>
106 [% ELSE %]
107 <caption> Subscription summaries</caption>
108 [% END %]
109 <tr>
110   <th>Subscription num.</th>
111   <th>Frequency</th>
112   <th>Numbering pattern</th>
113   <th>Library</th>
114   <th>Call number</th>
115   <th>Notes</th>
116   <th>&nbsp;</th>
117 </tr>
118 [% FOREACH subscription IN subscriptions %]
119     <tr>
120         <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]"># [% subscription.subscriptionid %]</a> </td>
121         <td>[% subscription.frequency.description %]</td>
122         <td>[% subscription.numberpattern.label %]</td>
123         <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) %][% END %]</td>
124         <td> [% subscription.callnumber %]</td>
125         <td> [% subscription.notes %]
126             [% UNLESS subscription.closed %]
127                 [% IF ( subscription.subscriptionexpired ) %]
128                     <br /><span class="problem"> Subscription expired</span>
129                 [% END %]
130             [% ELSE %]
131                 <br /> Subscription closed
132             [% END %]
133         </td>
134         [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]<td class="problem actions">[% ELSE %]<td class="actions">[% END %]
135         [% UNLESS subscription.closed %]
136             [% IF ( routing && CAN_user_serials_routing ) %]
137                 [% IF ( subscription.hasRouting ) %]
138                     <a class="btn btn-mini" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list</a>
139                 [% ELSE %]
140                     <a class="btn btn-mini" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"><i class="fa fa-plus"></i> Create routing list</a>
141                 [% END %]
142             [% END %]
143             [% IF ( subscription.abouttoexpire ) %]<a class="btn btn-mini" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;"><i class="fa fa-refresh"></i> Renew</a>
144             [% ELSE %]
145                 [% IF ( subscription.subscriptionexpired ) %]<a class="btn btn-mini" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;"><i class="fa fa-refresh"></i> Renew</a>
146                 [% ELSE %]
147                     &nbsp;
148                 [% END %]
149             [% END %]
150         [% ELSE %]
151             &nbsp;
152         [% END %]
153         </td>
154       </tr>
155 [% END %]
156 [% IF ( subscr ) %]
157 [% IF ( subscriptioncount > 1 ) %]
158 <tr ><td colspan="8">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
159 </tr>
160 [% END %]
161 [% END %]
162 </table>
163 [% END %]
164
165
166 [% IF ( years ) %]<form name="edition" action="serials-edit.pl" method="post">
167 <div id="subscription_years" class="toptabs numbered">
168 <ul>
169         [% FOREACH year IN years %]
170         [% IF ( year.year ) %]
171             [% IF year.year == 'manage' %]
172                 <li><a href="#subscription-year-manage">Manage</a></li>
173             [% ELSE %]
174                 <li><a href="#subscription-year-[% year.year %]">[% year.year %]</a></li>
175             [% END %]
176         [% END %]
177     [% END %]
178 </ul>
179
180  [% FOREACH year IN years %]
181 <div id="subscription-year-[% year.year %]">
182     [% IF ( CAN_user_serials_receive_serials ) %]
183         <p>
184             <input type="submit" value="Edit serials" />&nbsp;
185             [% UNLESS subscription.closed %]
186                 <input type="button" value="Generate next" onclick="javascript:generateNext([% subscriptionidlist %])" />
187                 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]&nbsp;<input type="button" value="Multi receiving" onclick="javascript:generateReceive([% subscriptionidlist %])" />[% END %]
188             [% END %]
189         </p>
190     [% END %]
191       <span class="checkall">
192         <a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year %]'); return false;">Select all</a>
193       </span> |
194       <span class="clearall">
195         <a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year %]'); return false;">Clear all</a>
196       </span>
197         <table class="subscription-year-table">
198           <thead>
199             <tr>
200                 [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
201 [% IF ( subscriptions.size > 1 ) %]
202                 <th># Subs</th>
203 [% END %]
204                 <th class="title-string">Date published
205                 </th>
206                 <th class="title-string">Date published (text)
207                 </th>
208                 <th class="title-string">Date received
209                 </th>
210                 <th>Number
211                 </th>
212                 <th>Status
213                 </th>
214                 <th>Notes
215                 </th>
216                 <th>Library
217                 </th>
218                 [% IF ( routing ) %]<th>Routing</th>[% END %]
219             </tr>
220           </thead>
221           <tbody>
222       [% FOREACH serial IN year.serials %]
223         <tr>
224             [% IF ( CAN_user_serials_receive_serials ) %]
225                 <td>
226                   [% UNLESS CAN_user_serials_receive_serials %]
227                     disabled
228                   [% ELSE %]
229                     [% IF ( serial.subscriptionexpired ) %]
230                     <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
231                     [% ELSE %]
232                       [% IF ( serial.checked ) %]
233                     <input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
234                       [% ELSE %]
235                     <input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
236                       [% END %]
237                     [% END %]
238                   [% END %]
239                 </td>
240             [% END %]
241 [% IF ( subscriptions.size > 1 ) %]
242                  <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
243 [% END %]
244                 <td>
245                     <span title="[% serial.publisheddate %]">
246                       [% IF serial.publisheddate %]
247                         [% serial.publisheddate | $KohaDates %]
248                       [% ELSE %]
249                         Unknown
250                       [% END %]
251                     </span>
252                 </td>
253                 <td>
254                    [% IF serial.publisheddatetext %]
255                       <span title="[% serial.publisheddatetext %]">
256                         [% serial.publisheddatetext %]
257                       </span>
258                    [% END %]
259                 </td>
260                 <td>
261                     <span title="[% serial.planneddate %]">
262                       [% IF serial.planneddate %]
263                         [% serial.planneddate | $KohaDates %]
264                       [% ELSE %]
265                         Unknown
266                       [% END %]
267                     </span>
268                 </td>
269                 <td>
270                     [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
271                         [% matches.0 %]Spring[% matches.1 %]
272                     [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
273                         [% matches.0 %]Summer[% matches.1 %]
274                     [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
275                         [% matches.0 %]Fall[% matches.1 %]
276                     [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
277                         [% matches.0 %]Winter[% matches.1 %]
278                     [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
279                         [% matches.0 %]Spr[% matches.1 %]
280                     [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
281                         [% matches.0 %]Sum[% matches.1 %]
282                     [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
283                         [% matches.0 %]Fal[% matches.1 %]
284                     [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
285                         [% matches.0 %]Win[% matches.1 %]
286                     [% ELSE %]
287                         [% serial.serialseq %]
288                     [% END %]
289                 </td>
290                 <td>
291                     [% IF ( serial.status1 ) %]Expected[% END %]
292                     [% IF ( serial.status2 ) %]Arrived[% END %]
293                     [% IF ( serial.status3 ) %]Late[% END %]
294                     [% IF ( serial.status4 ) %]Missing[% END %]
295                     [% IF ( serial.status41 ) %]Missing (never received)[% END %]
296                     [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
297                     [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
298                     [% IF ( serial.status44 ) %]Missing (lost)[% END %]
299                     [% IF ( serial.status5 ) %]Not issued[% END %]
300                     [% IF ( serial.status6 ) %]Delete[% END %]
301                     [% IF ( serial.status7 ) %]Claimed[% END %]
302                     [% IF ( serial.status8 ) %]Stopped[% END %]
303                 </td>
304                 <td>
305                     [% serial.notes %]
306                 </td>
307                 <td>
308                     [% Branches.GetName( serial.branchcode ) %]
309                 </td>
310                 [% IF ( routing ) %]
311                 <td class="actions">
312                     <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq.replace("'", "\\'") |html %] ([% serial.publisheddate | $KohaDates %])'); return false" class="btn btn-mini"><i class="fa fa-print"></i> Print list</a>
313                 </td>
314                 [% END %]
315             </tr>
316           [% END %]
317         </tbody>
318       </table>
319     </div>
320     [% END %]
321   <input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />
322
323 </div>
324 </form>
325 [% END %]
326
327 </div>
328 </div>
329
330 <div class="yui-b">
331 [% INCLUDE 'serials-menu.inc' %]
332 </div>
333 </div>
334 [% INCLUDE 'intranet-bottom.inc' %]