Bug 8351: Update wording on staged marc
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / holidays.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; [% branchname %] Calendar</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script language="JavaScript" type="text/javascript">
7 //<![CDATA[
8
9         var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays"));
10
11     /* Creates all the structures to deal with all diferents kinds of holidays */
12     var week_days = new Array();
13     var holidays = new Array();
14     var holidates = new Array();
15     var exception_holidays = new Array();
16     var day_month_holidays = new Array();
17     var hola= "[% code %]";
18     [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
19     week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION %]"};
20     [% END %]
21     [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
22     holidates.push("[% HOLIDAYS_LOO.KEY %]");
23     holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE %]", description:"[% HOLIDAYS_LOO.DESCRIPTION %]"};
24
25     [% END %]
26     [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
27     exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]"};
28     [% END %]
29     [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
30     day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]"};
31     [% END %]
32
33     function holidayOperation(formObject, opType) {
34         var op = document.getElementsByName('operation');
35         op[0].value = opType;
36         formObject.submit();
37     }
38
39         // This function shows the "Show Holiday" panel //
40         function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) {
41                 $("#newHoliday").slideUp("fast");
42                 $("#showHoliday").slideDown("fast");
43                 $('#showDaynameOutput').html(dayName);
44                 $('#showDayname').val(dayName);
45                 $('#showBranchNameOutput').html($("#branch :selected").text());
46                 $('#showBranchName').val($("#branch").val());
47                 $('#showDayOutput').html(day);
48                 $('#showDay').val(day);
49                 $('#showMonthOutput').html(month);
50                 $('#showMonth').val(month);
51                 $('#showYearOutput').html(year);
52                 $('#showYear').val(year);
53                 $('#showDescription').val(description);
54                 $('#showWeekday:first').val(weekDay);
55                 $('#showTitle').val(title);
56                 $('#showHolidayType').val(holidayType);
57
58                 if (holidayType == 'exception') {
59                         $("#showOperationDelLabel").html(_('Delete this exception.'));
60                         $("#holtype").attr("class","key exception").html(_("Holiday exception"));
61                 } else if(holidayType == 'weekday') {
62                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
63                         $("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly"));
64                 } else if(holidayType == 'daymonth') {
65                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
66                         $("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly"));
67                 } else {
68                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
69                         $("#holtype").attr("class","key holiday").html(_("Unique holiday"));
70                 }
71                 
72                 if (exceptionPosibility == 1) {
73                         $("#exceptionPosibility").parent().show();
74                 } else {
75                         $("#exceptionPosibility").parent().hide();
76                 }
77         }
78
79         // This function shows the "Add Holiday" panel //
80         function newHoliday (dayName, day, month, year, weekDay) {
81                 $("#showHoliday").slideUp("fast");
82                 $("#newHoliday").slideDown("fast");
83                 $("#newDaynameOutput").html(dayName);
84                 $("#newDayname").val(dayName);
85                 $("#newBranchNameOutput").html($('#branch :selected').text());
86                 $("#newBranchName").val($('#branch').val());
87                 $("#newDayOutput").html(day);
88                 $("#newDay").val(day);
89                 $("#newMonthOutput").html(month);
90                 $("#newMonth").val(month);
91                 $("#newYearOutput").html(year);
92                 $("#newYear").val(year);
93                 $("#newWeekday:first").val(weekDay);
94         }
95
96         function hidePanel(aPanelName) {
97                 $("#"+aPanelName).slideUp("fast");
98         }
99
100         function changeBranch () {
101                 var branch = $("#branch option:selected").val();
102                 location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]";
103         }
104
105         function Help() {
106                 newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
107         }
108
109     /* This function gives css clases to each kind of day */
110     function dateStatusHandler(date) {
111         date = new Date(date);
112         var day = date.getDate();
113         var month = date.getMonth() + 1;
114         var year = date.getFullYear();
115         var weekDay = date.getDay();
116         var dayMonth = month + '/' + day;
117         var dateString = year + '/' + month + '/' + day;
118         if (exception_holidays[dateString] != null) {
119             return [true, "exception", "Exception: "+exception_holidays[dateString].title];
120         } else if ( week_days[weekDay] != null ){
121             return [true, "repeatableweekly", "Weekly holdiay: "+week_days[weekDay].title];
122         } else if ( day_month_holidays[dayMonth] != null ) {
123             return [true, "repeatableyearly", "Yearly holdiay: "+day_month_holidays[dayMonth].title];
124         } else if (holidays[dateString] != null) {
125             return [true, "holiday", "Single holiday: "+holidays[dateString].title];
126         } else {
127             return [true, "normalday", "Normal day"];
128         }
129     }
130
131     /* This function is in charge of showing the correct panel considering the kind of holiday */
132     function dateChanged(calendar) {
133         calendar = new Date(calendar);
134         var day = calendar.getDate();
135         var month = calendar.getMonth() + 1;
136         var year = calendar.getFullYear();
137         var weekDay = calendar.getDay();
138         var dayName = weekdays[weekDay];
139         var dayMonth = month + '/' + day;
140         var dateString = year + '/' + month + '/' + day;
141             if (holidays[dateString] != null) {
142                 showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title,  holidays[dateString].description, 'ymd');
143             } else if (exception_holidays[dateString] != null) {
144                 showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception');
145             } else if (week_days[weekDay] != null) {
146                 showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title,    week_days[weekDay].description, 'weekday');
147             } else if (day_month_holidays[dayMonth] != null) {
148                 showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth');
149             } else {
150                 newHoliday(dayName, day, month, year, weekDay);
151             }
152     };
153
154         $(document).ready(function() {
155
156 [% IF ( dateformat_metric ) %]          $.tablesorter.addParser({ // http://tablesorter.com/docs/example-parsers.html
157                         id: 'shortDates',
158                         is: function(s){
159                                 return false;
160                         },
161                         format: function(s){
162                                 var datepattern = new RegExp("[0-9]\/[0-9]");
163                                 if( datepattern.test(s)){ // sorting a date without a year: "01/12"
164                                         var dateparts = s.split("/").reverse().join("-"); // build an ISO date to be sorted as text
165                                         s = "2000-" + dateparts; // use 2000 as the default year
166                                 }
167                                 return s;
168                         },
169                         type: 'text'
170                 });
171 [% END %]
172                 $(".hint").hide();
173                 $("#branch").change(function(){
174                         changeBranch();
175                 });
176                 $("#holidayexceptions").tablesorter({[% IF ( dateformat_metric ) %]
177                   dateFormat: 'uk',[% END %]
178                   sortList: [[0,0]], widgets: ['zebra']
179                 });
180                 $("#holidayweeklyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
181                   dateFormat: 'uk',[% END %]
182                   sortList: [[0,0]], widgets: ['zebra']
183                 });
184                 $("#holidaysyearlyrepeatable").tablesorter({[% IF ( dateformat_metric ) %]
185                         headers : {
186                                 0: {
187                                         sorter : 'shortDates'
188                                 }
189                         },[% END %]
190                         sortList: [[0,0]], widgets: ['zebra']
191                 });
192                 $("#holidaysunique").tablesorter({[% IF ( dateformat_metric ) %]
193                   dateFormat: 'uk',[% END %]
194                   sortList: [[0,0]], widgets: ['zebra']
195                 });
196                 $("a.helptext").click(function(){
197                         $(this).parent().find(".hint").toggle(); return false;
198                 });
199         $("#dateofrange").datepicker();
200                 $("#dateofrange").each(function () { this.value = "" });
201         $("#jcalendar-container").datepicker({
202           beforeShowDay: function(thedate) {
203             var day = thedate.getDate();
204             var month = thedate.getMonth() + 1;
205             var year = thedate.getFullYear();
206             var dateString = year + '/' + month + '/' + day;
207             return dateStatusHandler(dateString);
208             },
209         onSelect: function(dateText, inst) {
210             dateChanged($(this).datepicker("getDate"));
211         },
212         defaultDate: new Date("[% keydate %]")
213     });
214         });
215 //]]>
216 </script>
217 <style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; }
218 .ui-datepicker { font-size : 150%; }
219 .ui-datepicker th, .ui-datepicker .ui-datepicker-title select { font-size : 80%; }
220 .ui-datepicker td a { padding : .5em; }
221 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { font-size : 80%; }
222 .key { padding : 3px; white-space:nowrap; line-height:230%; }
223 .normalday { background-color :  #EDEDED; color :  Black; border : 1px solid #BCBCBC; }
224 .exception { background-color :  #b3d4ff; color :  Black; border : 1px solid #BCBCBC; }
225 .holiday {  background-color :  #ffaeae; color :  Black;  border : 1px solid #BCBCBC; }
226 .repeatableweekly {  background-color :  #FFFF99; color :  Black;  border : 1px solid #BCBCBC; }
227 .repeatableyearly {  background-color :  #FFCC66; color :  Black;  border : 1px solid #BCBCBC; }
228 td.exception a.ui-state-default, .exception { background:  #b3d4ff none; color :  Black; border : 1px solid #BCBCBC; }
229 td.holiday a.ui-state-default, .holiday {  background:  #ffaeae none; color :  Black;  border : 1px solid #BCBCBC; }
230 td.repeatableweekly a.ui-state-default, .repeatableweekly {  background:  #D8EFB3 none; color :  Black;  border : 1px solid #BCBCBC; }
231 td.repeatableyearly a.ui-state-default, .repeatableyearly {  background:  #FFFF99 none; color :  Black;  border : 1px solid #BCBCBC; }
232 .information { z-index : 1; background-color :  #DCD2F1; width : 300px; display : none; border : 1px solid #000000; color :  #000000; font-size :  8pt; font-weight :  bold; background-color :  #FFD700; cursor :  pointer; padding : 2px; }
233 .panel { z-index : 1; display : none; border : 3px solid #CCC; padding : 3px; margin-top: .3em;  background-color: #FEFEFE; } fieldset.brief { border : 0; margin-top: 0; }
234 #showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b fieldset.brief li.radio  { padding:0.2em 0; } .help { margin:.3em 0;border:1px solid #EEE;padding:.3em .7em; font-size : 90%; } #holidayweeklyrepeatable, #holidaysyearlyrepeatable, #holidaysunique, #holidayexceptions { font-size : 90%; margin-bottom : 1em;} .calendar td, .calendar th, .calendar .button, .calendar tbody .day { padding : .7em; font-size: 110%; } .calendar { width: auto; border : 0; }
235 </style>
236 </head>
237 <body id="tools_holidays" class="tools">
238 [% INCLUDE 'header.inc' %]
239 [% INCLUDE 'cat-search.inc' %]
240
241 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% branchname %] Calendar</div>
242
243 <div id="doc3" class="yui-t1">
244    
245    <div id="bd">
246         <div id="yui-main">
247         <div class="yui-b">
248         <h2>[% branchname %] Calendar</h2>
249         <div class="yui-g">
250         <div class="yui-u first">
251         <label for="branch">Define the holidays for:</label>
252             <select id="branch" name="branch">
253                 [% FOREACH branchloo IN branchloop %]
254                     [% IF ( branchloo.selected ) %]
255                         <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
256                     [% ELSE %]
257                         <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
258                     [% END %]
259                 [% END %]
260             </select>
261         
262         <!-- ******************************** FLAT PANELS ******************************************* -->
263         <!-- *****           Makes all the flat panel to deal with holidays                     ***** -->
264         <!-- **************************************************************************************** -->
265
266         <!-- ********************** Panel for showing already loaded holidays *********************** -->
267         <div class="panel" id="showHoliday">
268                 <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
269                         <input type="hidden" id="showHolidayType" name="showHolidayType" value="" />
270                         <fieldset class="brief">
271                         <h3>Edit this holiday</h3>
272                         <span id="holtype"></span>
273                         <ol>
274                         <li>
275                                 <strong>Library:</strong> <span id="showBranchNameOutput"></span>
276                                 <input type="hidden" id="showBranchName" name="showBranchName" />
277                         </li>
278                         <li>
279                                 <strong>Date:</strong>
280                                 <span id="showDaynameOutput"></span>, 
281                                 
282                                 [% IF ( dateformat_us ) %]<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>/<span id="showYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="showDayOutput"></span>/<span id="showMonthOutput"></span>/<span id="showYearOutput"></span>[% ELSE %]<span id="showYearOutput"></span>/<span id="showMonthOutput"></span>/<span id="showDayOutput"></span>[% END %]
283
284                                 <input type="hidden" id="showDayname" name="showDayname" />
285                                 <input type="hidden" id="showWeekday" name="showWeekday" />
286                                 <input type="hidden" id="showDay" name="showDay" />
287                                 <input type="hidden" id="showMonth" name="showMonth" />
288                                 <input type="hidden" id="showYear" name="showYear" />
289                         </li>
290                         <li><label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" /></li>
291                     <!-- showTitle is necessary for exception radio button to work properly --> 
292                                 <label for="showDescription">Description:</label>
293                                 <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>    
294                     </li>
295                         <li class="radio"><div id="exceptionPosibility" style="position:static">
296                                 <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label>
297                                 <a href="#" class="helptext">[?]</a>
298                                 <div class="hint">You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.</div>
299                         </div></li>
300                         <li class="radio"><input type="radio" name="showOperation" id="showOperationDel" value="delete" /> <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label>
301                                 <a href="#" class="helptext">[?]</a>
302                                 <div class="hint">This will delete this holiday rule. If it is a repeatable holiday, this option checks for posible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.</div></li>
303                         <li class="radio"><input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label>
304                                                 <a href="#" class="helptext">[?]</a>
305                                                 <div class="hint">This will save changes to the holiday's title and description. If the information for a repeatable holiday is modified, it affects all of the dates on which the holiday is repeated.</div></li>
306
307                         </ol>
308                         <fieldset class="action">
309                                 <input type="submit" name="submit" value="Save" />
310                                 <a href="#" class="cancel" name="cancel2" onclick=" hidePanel('showHoliday');">Cancel</a>
311                         </fieldset>
312                         </fieldset>
313                 </form>
314         </div>
315
316         <!-- ***************************** Panel to deal with new holidays **********************  -->
317         <div class="panel" id="newHoliday">
318                 <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
319                                 <input type="hidden" name="branchCodes" id="branchCodes" value="[% branchcodes %]" /> 
320                         <fieldset class="brief">
321                         <h3>Add new holiday</h3>
322                         <ol>
323                         <li>
324                                 <strong>Library:</strong>
325                                 <span id="newBranchNameOutput"></span>
326                                 <input type="hidden" id="newBranchName" name="newBranchName" />
327                         </li>
328                         <li>
329                 <strong>From date:</strong>
330                                 <span id="newDaynameOutput"></span>, 
331
332                                 [% IF ( dateformat_us ) %]<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>/<span id="newYearOutput"></span>[% ELSIF ( dateformat_metric ) %]<span id="newDayOutput"></span>/<span id="newMonthOutput"></span>/<span id="newYearOutput"></span>[% ELSE %]<span id="newYearOutput"></span>/<span id="newMonthOutput"></span>/<span id="newDayOutput"></span>[% END %]
333
334                                 <input type="hidden" id="newDayname" name="showDayname" />
335                                 <input type="hidden" id="newWeekday" name="newWeekday" />
336                                 <input type="hidden" id="newDay" name="newDay" />
337                                 <input type="hidden" id="newMonth" name="newMonth" />
338                                 <input type="hidden" id="newYear" name="newYear" />
339                         </li>
340                         <li class="dateinsert">
341                 <b>To date : </b>
342                 <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" class="datepicker" />
343                         </li>
344                         <li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
345                         <li><label for="newDescription">Description:</label>
346                                 <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
347                         </li>
348                         <li class="radio"><input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" />
349                         <label for="newOperationOnce">Holiday only on this day</label>.
350                         <a href="#" class="helptext">[?]</a>
351                         <div class="hint">Make a single holiday. For example, selecting August 1st, 2012 will make it a holiday, but will not affect August 1st in other years.</div>
352                         </li>
353                         <li class="radio"><input type="radio" name="newOperation" id="newOperationDay" value="weekday" />
354                                                         <label for="newOperationDay">Holiday repeated every same day of the week</label>.
355                                                         <a href="#" class="helptext">[?]</a>
356                                                         <div class="hint">Make this weekday a holiday, every week. For example, if your library is closed on Saturdays, use this option to make every Saturday a holiday.</div>
357                                                         </li>
358                         <li class="radio"><input type="radio" name="newOperation" id="newOperationYear" value="repeatable" />
359                                                         <label for="newOperationYear">Holiday repeated yearly on the same date</label>.
360                                                         <a href="#" class="helptext">[?]</a>
361                                                         <div class="hint">This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.</div>
362                                                         </li>
363             <li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
364                             <label for="newOperationField">Holidays on a range</label>.
365                             <a href="#" class="helptext">[?]</a>
366                             <div class="hint">Make a single holiday on a range. For example, selecting August 1st, 2012  and August 10st, 2012 will make all days between 1st and 10st holiday, but will not affect August 1st-10st in other years.</div>
367                             </li>
368             <li class="radio"><input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
369                             <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
370                             <a href="#" class="helptext">[?]</a>
371                             <div class="hint">Make a single holiday on a range repeated yearly. For example, selecting August 1st, 2012  and August 10st, 2012 will make all days between 1st and 10st holiday, and will affect August 1st-10st in other years.</div>
372                             </li>
373                                 <li class="radio">
374                                 <input type="checkbox" name="allBranches" id="allBranches" />
375                                 <label for="allBranches">Copy to all libraries</label>.
376                                 <a href="#" class="helptext">[?]</a>
377                                 <div class="hint">If checked, this holiday will be copied to all libraries. If the holiday already exists for a library, no change is made.</div>
378                                 </li></ol>
379                                 <fieldset class="action">
380                                         <input type="submit" name="submit" value="Save" />
381                                         <a href="#" class="cancel" name="cancel2" onclick=" hidePanel('newHoliday');">Cancel</a>
382                                 </fieldset>
383                                 </fieldset>
384                 </form>
385         </div>
386
387         <!-- *************************************************************************************** -->
388         <!-- ******                          END OF FLAT PANELS                               ****** -->
389         <!-- *************************************************************************************** -->
390
391 <!-- ************************************************************************************** -->
392 <!-- ******                              MAIN SCREEN CODE                            ****** -->
393 <!-- ************************************************************************************** -->
394 <h3>Calendar information</h3>
395 <div id="jcalendar-container"></div>
396
397 <div style="margin-top: 2em;">
398 <form action="copy-holidays.pl" method="post">
399         <input type="hidden" name="from_branchcode" value="[% branch %]" />
400   <label for="branchcode">Copy holidays to:</label>
401   <select id="branchcode" name="branchcode">
402     <option value=""></option>
403     [% FOREACH branchloo IN branchloop %]
404     <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
405     [% END %]
406   </select>
407         <input type="submit" value="Copy" />
408 </form>
409 </div>
410
411 </div>
412 <div class="yui-u">
413 <div class="help">
414 <h4>Hints</h4>
415         <ul>
416                 <li>Search in the calendar the day you want to set as holiday.</li>
417                 <li>Click the date to add or edit a holiday.</li>
418                 <li>Enter a title and description for the holdiay.</li>
419                 <li>Specify how the holiday should repeat.</li>
420                 <li>Click Save to finish.</li>
421         </ul>
422 <h4>Key</h4>
423         <p>
424                 <span class="key normalday">Working day</span>
425                 <span class="key holiday">Unique holiday</span>
426                 <span class="key repeatableweekly">Holiday repeating weekly</span>
427                 <span class="key repeatableyearly">Holiday repeating yearly</span>
428                 <span class="key exception">Holiday exception</span>
429         </p>
430 </div>
431 <div id="holiday-list">
432 <!-- Exceptions First -->
433 <!--   this will probably always have the least amount of data -->
434 [% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
435 <h3>Exceptions</h3>
436   <table id="holidayexceptions">
437 <thead><tr>
438   <th class="exception">Date</th>
439   <th class="exception">Title</th>
440   <th class="exception">Description</th>
441 </tr>
442 </thead>
443 <tbody>
444   [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
445   <tr>
446   <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</a></td>
447   <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE %]</td>
448   <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]</td> 
449   </tr>
450   [% END %] 
451 </tbody>
452 </table>
453 [% END %]
454
455 [% IF ( WEEK_DAYS_LOOP ) %]
456 <h3>Weekly - Repeatable Holidays</h3>
457 <table id="holidayweeklyrepeatable">
458 <thead>
459 <tr>
460   <th class="repeatableweekly">Day of week</th>
461   <th class="repeatableweekly">Title</th>
462   <th class="repeatableweekly">Description</th>
463 </tr>
464 </thead>
465 <tbody>
466   [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
467   <tr>
468   <td>
469 <script type="text/javascript">
470   document.write(weekdays[ [% WEEK_DAYS_LOO.KEY %]]);
471 </script>
472   </td> 
473   <td>[% WEEK_DAYS_LOO.TITLE %]</td> 
474   <td>[% WEEK_DAYS_LOO.DESCRIPTION %]</td> 
475   </tr>
476   [% END %] 
477 </tbody>
478 </table>
479 [% END %]
480
481 [% IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
482 <h3>Yearly - Repeatable Holidays</h3>
483 <table id="holidaysyearlyrepeatable">
484 <thead>
485 <tr>
486   [% IF ( dateformat_metric ) %]
487   <th class="repeatableyearly">Day/Month</th>
488   [% ELSE %]
489   <th class="repeatableyearly">Month/Day</th>
490   [% END %]
491   <th class="repeatableyearly">Title</th>
492   <th class="repeatableyearly">Description</th>
493 </tr>
494 </thead>
495 <tbody>
496   [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
497   <tr>
498   <td>[% DAY_MONTH_HOLIDAYS_LOO.DATE %]</td>
499   <td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]</td> 
500   <td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]</td> 
501   </tr>
502   [% END %] 
503 </tbody>
504 </table>
505 [% END %]
506
507 [% IF ( HOLIDAYS_LOOP ) %]
508 <h3>Unique Holidays</h3>
509 <table id="holidaysunique">
510 <thead>
511 <tr>
512   <th class="holiday">Date</th>
513   <th class="holiday">Title</th>
514   <th class="holiday">Description</th>
515 </tr>
516 </thead>
517 <tbody>
518     [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
519 <tr>
520   <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch %]&amp;calendardate=[% HOLIDAYS_LOO.DATE %]">[% HOLIDAYS_LOO.DATE %]</a></td>
521   <td>[% HOLIDAYS_LOO.TITLE %]</td>
522   <td>[% HOLIDAYS_LOO.DESCRIPTION %]</td>
523 </tr>
524   [% END %] 
525 </tbody>
526 </table>
527 [% END %]
528 </div>
529 </div>
530 </div>
531 </div>
532 </div>
533
534 <div class="yui-b noprint">
535 [% INCLUDE 'tools-menu.inc' %]
536 </div>
537 </div>
538 [% INCLUDE 'intranet-bottom.inc' %]