updated release notes for 3.14.0 beta
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-collection.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Serials &rsaquo; Serial collection information for [% bibliotitle %]</title>
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8 [% INCLUDE 'datatables-strings.inc' %]
9 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
10 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
11
12 <script type="text/javascript">
13 //<![CDATA[
14 function generateReceive(subscriptionid) {
15     if(nbissues=prompt(_("How many issues do you want to receive ?"))){
16         document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
17     }
18 }
19 function print_slip(subscriptionid,issue){
20     var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
21     window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
22 }
23 function addsubscriptionid()
24 {
25         var tab=new Array();
26     var serialids = document.edition.serialid;
27     for (i=0; i<serialids.length; i++){
28       if (serialids[i].checked == true){
29         var found=false;
30         for (var val in tab){
31           if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
32         }
33         if (found == false){
34           tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
35         }
36       }
37     }
38     var string="";
39     for (var val in tab){
40       string = string + tab[val] + ",";
41     }
42     string=string.substring(0,string.length -1);
43     document.edition.subscriptionid.value=string;
44 }
45 function popup(subscriptionid) {
46     newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
47 }
48
49 function generateNext(subscriptionid) {
50         if(confirm(_("Do you really want to generate next serial?"))){
51                 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
52         }
53 }
54
55 function CheckAll( node ) {
56     $("#"+node).checkCheckboxes();
57     return false;
58 }
59 function CheckNone( node ) {
60     $("#"+node).unCheckCheckboxes();
61     return false;
62 }
63 $(document).ready(function() {
64     $('#subscription_years').tabs();
65     [% IF dateformat == "metric" %]
66       dt_add_type_uk_date();
67     [% END %]
68
69     $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
70         "aoColumnDefs": [
71             { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
72             { "sType": "title-string", "aTargets" : [ "title-string" ] }
73         ],
74         "aaSorting": [[0, 'desc']],
75         "sDom": 't',
76         "bAutoWidth": false,
77         "bPaginate": false,
78         "bInfo": false,
79         "bFilter": false,
80     } ));
81 });
82
83 //]]>
84 </script>
85 </head>
86 <body id="ser_serials-collection" class="yui-skin-sam ser">
87 [% INCLUDE 'header.inc' %]
88 [% INCLUDE 'serials-search.inc' %]
89
90 <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>
91
92 <div id="doc3" class="yui-t2">
93    
94    <div id="bd">
95         <div id="yui-main">
96         <div class="yui-b">
97
98
99 [% UNLESS ( popup ) %]
100         [% INCLUDE 'serials-toolbar.inc' %]
101
102         <h1>Serial collection information for  <i>[% bibliotitle %]</i>
103         [% IF location %] ([% location %] ) [% END %]
104                 [% IF ( callnumber ) %]callnumber: [% callnumber %][% END %]</h1>
105 [% END %]
106
107 [% IF ( subscriptions ) %]
108 <table>
109 [% IF ( subscriptions.size == 1 ) %]
110 <caption> Subscription summary</caption>
111 [% ELSE %]
112 <caption> Subscription summaries</caption>
113 [% END %]
114 <tr>
115   <th>Subscription num.</th>
116   <th>Frequency</th>
117   <th>Numbering pattern</th>
118   <th>Library</th>
119   <th>Call number</th>
120   <th>Notes</th>
121   [% IF ( routing && CAN_user_serials_routing ) %]<th>Routing</th>[% END %]
122   <th>Renew</th>
123 </tr>
124 [% FOREACH subscription IN subscriptions %]
125     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
126         <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]"># [% subscription.subscriptionid %]</a> </td>
127         <td>[% subscription.frequency.description %]</td>
128         <td>[% subscription.numberpattern.label %]</td>
129         <td> [% subscription.branchcode %]</td>
130         <td> [% subscription.callnumber %]</td>
131         <td> [% subscription.notes %]
132             [% UNLESS subscription.closed %]
133                 [% IF ( subscription.subscriptionexpired ) %]
134                     <br /><span class="problem"> Subscription expired</span>
135                 [% END %]
136             [% ELSE %]
137                 <br /> Subscription closed
138             [% END %]
139         </td>
140         [% IF ( routing && CAN_user_serials_routing ) %]
141         <td>
142             [% UNLESS subscription.closed %]
143                 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
144             [% END %]
145         </td>
146         [% END %]
147         [% UNLESS subscription.closed %]
148             [% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
149             [% ELSE %]
150                 [% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
151                 [% ELSE %]
152                     <td> &nbsp;</td>
153                 [% END %]
154             [% END %]
155         [% ELSE %]
156             <td> &nbsp;</td>
157         [% END %]
158       </tr>
159 [% END %]
160 [% IF ( subscr ) %]
161 [% IF ( subscriptioncount > 1 ) %]
162 <tr ><td colspan="8">  <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
163 </tr>
164 [% END %]
165 [% END %]
166 </table>
167 [% END %]
168
169
170 [% IF ( years ) %]<form name="edition" action="serials-edit.pl" method="post">
171 <div id="subscription_years" class="toptabs numbered">
172 <ul>
173         [% FOREACH year IN years %]
174         [% IF ( year.year ) %]
175             <li><a href="#subscription-year-[% year.year %]">[% year.year %]</a></li>
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 received
207                 </th>
208                 <th>Number
209                 </th>
210                 <th>Status
211                 </th>
212                 <th>Notes
213                 </th>
214                 <th>Library
215                 </th>
216                 [% IF ( routing ) %]<th>Routing</th>[% END %]
217             </tr>
218           </thead>
219           <tbody>
220       [% FOREACH serial IN year.serials %]
221     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
222             [% IF ( CAN_user_serials_receive_serials ) %]
223                 <td>
224                   [% IF ( serial.cannotedit ) %]
225                     disabled
226                   [% ELSE %]
227                     [% IF ( serial.subscriptionexpired ) %]
228                     <input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
229                     [% ELSE %]
230                       [% IF ( serial.checked ) %]
231                     <input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
232                       [% ELSE %]
233                     <input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
234                       [% END %]
235                     [% END %]
236                   [% END %]
237                 </td>
238             [% END %]
239 [% IF ( subscriptions.size > 1 ) %]
240                  <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
241 [% END %]
242                 <td>
243                     <span title="[% serial.publisheddate %]">[% serial.publisheddate | $KohaDates %]</span>
244                 </td>
245                 <td>
246                     <span title="[% serial.planneddate %]">[% serial.planneddate | $KohaDates %]</span>
247                 </td>
248                 <td>
249                     [% serial.serialseq %]
250                 </td>
251                 <td>
252                     [% IF ( serial.status1 ) %]Expected[% END %]
253                     [% IF ( serial.status2 ) %]Arrived[% END %]
254                     [% IF ( serial.status3 ) %]Late[% END %]
255                     [% IF ( serial.status4 ) %]Missing[% END %]
256                     [% IF ( serial.status5 ) %]Not issued[% END %]
257                     [% IF ( serial.status6 ) %]Delete[% END %]
258                     [% IF ( serial.status7 ) %]Claimed[% END %]
259                     [% IF ( serial.status8 ) %]Stopped[% END %]
260                 </td>
261                 <td>
262                     [% serial.notes %]
263                 </td>
264                 <td>
265                     [% Branches.GetName( serial.branchcode ) %]
266                 </td>
267                 [% IF ( routing ) %]
268                 <td>
269                     <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %] ([% serial.publisheddate %])'); return false" >Print list</a>
270                 </td>
271                 [% END %]
272             </tr>
273           [% END %]
274         </tbody>
275       </table>
276     </div>
277     [% END %]
278   <input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />
279
280 </div>
281 </form>
282 [% END %]
283
284 </div>
285 </div>
286
287 <div class="yui-b">
288 [% INCLUDE 'serials-menu.inc' %]
289 </div>
290 </div>
291 [% INCLUDE 'intranet-bottom.inc' %]