Bug 14100: Generic solution for language overlay - Item types
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / showpredictionpattern.tt
1 [% USE KohaDates %]
2
3 <h2>Prediction pattern</h1>
4 [% IF (not_consistent_end_date) %]
5   <p><em>End date is not consistent with subscription length.</em></p>
6 [% END %]
7 [% IF (ask_for_irregularities) %]
8     <p><em>Please check issues that are NOT published (irregularities)</em></p>
9     [% IF (daily_options) %]
10         <script type="text/javascript">
11         //<![CDATA[
12         function Check_boxes(dow) {
13             if($(":checkbox[data-dow='"+dow+"']:first").attr("checked") == 'checked') {
14                 $("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
15                     $(this).attr('checked', true);
16                 });
17             } else {
18                 $("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
19                     $(this).attr('checked', false);
20                 });
21             }
22         }
23         //]]>
24         </script>
25         <p><em>
26             If there is a day (or more) in the week where issues are never
27             published, you can check corresponding boxes below.
28         </em></p>
29         <input type="checkbox" id="monday" data-dow="1" onchange="Check_boxes(1);" />
30         <label for="monday">Monday</label>
31         <input type="checkbox" id="tuesday" data-dow="2" onchange="Check_boxes(2);" />
32         <label for="tuesday">Tuesday</label>
33         <input type="checkbox" id="wednesday" data-dow="3" onchange="Check_boxes(3);" />
34         <label for="wednesday">Wednesday</label>
35         <input type="checkbox" id="thursday" data-dow="4" onchange="Check_boxes(4);" />
36         <label for="thursday">Thursday</label>
37         <input type="checkbox" id="friday" data-dow="5" onchange="Check_boxes(5);" />
38         <label for="friday">Friday</label>
39         <input type="checkbox" id="saturday" data-dow="6" onchange="Check_boxes(6);" />
40         <label for="saturday">Saturday</label>
41         <input type="checkbox" id="sunday" data-dow="7" onchange="Check_boxes(7);" />
42         <label for="sunday">Sunday</label>
43     [% END %]
44 [% END %]
45 [% IF (predictions_loop) %]
46 <table id="predictionst">
47   <thead>
48     <tr>
49       <th>Number</th>
50       <th>Publication date</th>
51       [% IF (ask_for_irregularities) %]
52       <th>Not published</th>
53       [% END %]
54     </tr>
55   </thead>
56   <tbody>
57     [% FOREACH prediction IN predictions_loop %]
58       <tr>
59         <td>
60             [% IF ( matches = prediction.number.match('Spring(.*)') ) %]
61                 Spring[% matches.join("") %]
62             [% ELSIF ( matches = prediction.number.match('Summer(.*)') ) %]
63                 Summer[% matches.join("") %]
64             [% ELSIF ( matches = prediction.number.match('Fall(.*)') ) %]
65                 Fall[% matches.join("") %]
66             [% ELSIF ( matches = prediction.number.match('Winter(.*)') ) %]
67                 Winter[% matches.join("") %]
68             [% ELSE %]
69                 [% prediction.number %]
70             [% END %]
71         </td>
72         <td>
73           [% IF (prediction.publicationdate) %]
74             [% prediction.publicationdate | $KohaDates %]
75           [% ELSE %]
76             unknown
77           [% END %]
78         </td>
79         [% IF (ask_for_irregularities) %]
80          <td style="text-align:center">
81          [% UNLESS (loop.first) %]
82           [% IF (prediction.not_published) %]
83             <input type="checkbox" name="irregularity" value="[% prediction.issuenumber %]" data-dow="[% prediction.dow %]" checked="checked" />
84           [% ELSE %]
85             <input type="checkbox" name="irregularity" value="[% prediction.issuenumber %]" data-dow="[% prediction.dow %]" />
86           [% END %]
87          </td>
88          [% END %]
89         [% END %]
90       </tr>
91     [% END %]
92   </tbody>
93 </table>
94 [% END %]