Bug 17245: Untranslatable abbreviated names of seasons.
[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").is(':checked')) {
14                 $("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
15                     $(this).prop('checked', true);
16                 });
17             } else {
18                 $("#predictionst :checkbox[data-dow='"+dow+"']").each(function(){
19                     $(this).prop('checked', false);
20                 });
21             }
22         }
23         $(document).ready(function(){
24             $(".skipday").on("change",function(){
25                 Check_boxes( $(this).data("dow"));
26             });
27         });
28         //]]>
29         </script>
30         <p><em>
31             If there is a day (or more) in the week where issues are never
32             published, you can check corresponding boxes below.
33         </em></p>
34         <input type="checkbox" id="monday" data-dow="1" class="skipday" />
35         <label for="monday">Monday</label>
36         <input type="checkbox" id="tuesday" data-dow="2" class="skipday" />
37         <label for="tuesday">Tuesday</label>
38         <input type="checkbox" id="wednesday" data-dow="3" class="skipday" />
39         <label for="wednesday">Wednesday</label>
40         <input type="checkbox" id="thursday" data-dow="4" class="skipday" />
41         <label for="thursday">Thursday</label>
42         <input type="checkbox" id="friday" data-dow="5" class="skipday" />
43         <label for="friday">Friday</label>
44         <input type="checkbox" id="saturday" data-dow="6" class="skipday" />
45         <label for="saturday">Saturday</label>
46         <input type="checkbox" id="sunday" data-dow="7" class="skipday" />
47         <label for="sunday">Sunday</label>
48     [% END %]
49 [% END %]
50 [% IF (predictions_loop) %]
51 <table id="predictionst">
52   <thead>
53     <tr>
54       <th>Number</th>
55       <th>Publication date</th>
56       [% IF (ask_for_irregularities) %]
57       <th>Not published</th>
58       [% END %]
59     </tr>
60   </thead>
61   <tbody>
62     [% FOREACH prediction IN predictions_loop %]
63       <tr>
64         <td>
65             [% IF ( matches = prediction.number.match('(.*)Spring(.*)') ) %]
66                 [% matches.0 %]Spring[% matches.1 %]
67             [% ELSIF ( matches = prediction.number.match('(.*)Summer(.*)') ) %]
68                 [% matches.0 %]Summer[% matches.1 %]
69             [% ELSIF ( matches = prediction.number.match('(.*)Fall(.*)') ) %]
70                 [% matches.0 %]Fall[% matches.1 %]
71             [% ELSIF ( matches = prediction.number.match('(.*)Winter(.*)') ) %]
72                 [% matches.0 %]Winter[% matches.1 %]
73             [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
74                 [% matches.0 %]Spr[% matches.1 %]
75             [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
76                 [% matches.0 %]Sum[% matches.1 %]
77             [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
78                 [% matches.0 %]Fal[% matches.1 %]
79             [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
80                 [% matches.0 %]Win[% matches.1 %]
81             [% ELSE %]
82                 [% prediction.number %]
83             [% END %]
84         </td>
85         <td>
86           [% IF (prediction.publicationdate) %]
87             [% prediction.publicationdate | $KohaDates %]
88           [% ELSE %]
89             unknown
90           [% END %]
91         </td>
92         [% IF (ask_for_irregularities) %]
93          <td style="text-align:center">
94          [% UNLESS (loop.first) %]
95           [% IF (prediction.not_published) %]
96             <input type="checkbox" name="irregularity" value="[% prediction.issuenumber %]" data-dow="[% prediction.dow %]" checked="checked" />
97           [% ELSE %]
98             <input type="checkbox" name="irregularity" value="[% prediction.issuenumber %]" data-dow="[% prediction.dow %]" />
99           [% END %]
100          </td>
101          [% END %]
102         [% END %]
103       </tr>
104     [% END %]
105   </tbody>
106 </table>
107 [% END %]