Merge remote-tracking branch 'origin/new/bug_6328'
[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         function holidayOperation(formObject, opType) {
12                 var op = document.getElementsByName('operation');
13                 op[0].value = opType;
14                 formObject.submit();
15         }
16
17         // This function shows the "Show Holiday" panel //
18         function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) {
19                 $("#newHoliday").slideUp("fast");
20                 $("#showHoliday").slideDown("fast");
21                 $('#showDaynameOutput').html(dayName);
22                 $('#showDayname').val(dayName);
23                 $('#showBranchNameOutput').html($("#branch :selected").text());
24                 $('#showBranchName').val($("#branch").val());
25                 $('#showDayOutput').html(day);
26                 $('#showDay').val(day);
27                 $('#showMonthOutput').html(month);
28                 $('#showMonth').val(month);
29                 $('#showYearOutput').html(year);
30                 $('#showYear').val(year);
31                 $('#showDescription').val(description);
32                 $('#showWeekday:first').val(weekDay);
33                 $('#showTitle').val(title);
34                 $('#showHolidayType').val(holidayType);
35
36                 if (holidayType == 'exception') {
37                         $("#showOperationDelLabel").html(_('Delete this exception.'));
38                         $("#holtype").attr("class","key exception").html(_("Holiday exception"));
39                 } else if(holidayType == 'weekday') {
40                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
41                         $("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly"));
42                 } else if(holidayType == 'daymonth') {
43                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
44                         $("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly"));
45                 } else {
46                         $("#showOperationDelLabel").html(_('Delete this holiday.'));
47                         $("#holtype").attr("class","key holiday").html(_("Unique holiday"));
48                 }
49                 
50                 if (exceptionPosibility == 1) {
51                         $("#exceptionPosibility").parent().show();
52                 } else {
53                         $("#exceptionPosibility").parent().hide();
54                 }
55         }
56
57         // This function shows the "Add Holiday" panel //
58         function newHoliday (dayName, day, month, year, weekDay) {
59                 $("#showHoliday").slideUp("fast");
60                 $("#newHoliday").slideDown("fast");
61                 $("#newDaynameOutput").html(dayName);
62                 $("#newDayname").val(dayName);
63                 $("#newBranchNameOutput").html($('#branch :selected').text());
64                 $("#newBranchName").val($('#branch').val());
65                 $("#newDayOutput").html(day);
66                 $("#newDay").val(day);
67                 $("#newMonthOutput").html(month);
68                 $("#newMonth").val(month);
69                 $("#newYearOutput").html(year);
70                 $("#newYear").val(year);
71                 $("#newWeekday:first").val(weekDay);
72         }
73
74         function hidePanel(aPanelName) {
75                 $("#"+aPanelName).slideUp("fast");
76         }
77
78         function changeBranch () {
79                 var branch = $("#branch option:selected").val();
80                 location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]";
81         }
82
83         function Help() {
84                 newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
85         }
86         $(document).ready(function() {
87                 $(".hint").hide();
88                 $("#branch").change(function(){
89                         changeBranch();
90                 });
91                 $("#holidayexceptions").tablesorter({
92                   sortList: [[0,0]], widgets: ['zebra']
93                 });
94                 $("#holidayweeklyrepeatable").tablesorter({
95                   sortList: [[0,0]], widgets: ['zebra']
96                 });
97                 $("#holidaysyearlyrepeatable").tablesorter({
98                   sortList: [[0,0]], widgets: ['zebra']
99                 });
100                 $("#holidaysunique").tablesorter({
101                   sortList: [[0,0]], widgets: ['zebra']
102                 });
103                 $("a.helptext").click(function(){
104                         $(this).parent().find(".hint").toggle(); return false;
105                 });
106                 $("#dateofrange").each(function () { this.value = "" });
107         });
108 //]]>
109 </script>
110 <style type="text/css"> .key { padding : 3px; white-space:nowrap; line-height:230%; }
111 .normalday { background-color :  #EDEDED; color :  Black; border : 1px solid #BCBCBC; }
112 .exception { background-color :  #b3d4ff; color :  Black; border : 1px solid #BCBCBC; }
113 .holiday {  background-color :  #ffaeae; color :  Black;  border : 1px solid #BCBCBC; }
114 .repeatableweekly {  background-color :  #FFFF99; color :  Black;  border : 1px solid #BCBCBC; }
115 .repeatableyearly {  background-color :  #FFCC66; color :  Black;  border : 1px solid #BCBCBC; }
116 .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; }
117 .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; }
118 #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; }
119 </style>
120 </head>
121 <body>
122 [% INCLUDE 'header.inc' %]
123 [% INCLUDE 'cat-search.inc' %]
124
125 <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>
126
127 <div id="doc3" class="yui-t1">
128    
129    <div id="bd">
130         <div id="yui-main">
131         <div class="yui-b">
132         <h2>[% branchname %] Calendar</h2>
133         <div class="yui-g">
134         <div class="yui-u first">
135         <label for="branch">Define the holidays for:</label>
136             <select id="branch" name="branch">
137                 [% FOREACH branchloo IN branchloop %]
138                     [% IF ( branchloo.selected ) %]
139                         <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
140                     [% ELSE %]
141                         <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
142                     [% END %]
143                 [% END %]
144             </select>
145         
146         <!-- ******************************** FLAT PANELS ******************************************* -->
147         <!-- *****           Makes all the flat panel to deal with holidays                     ***** -->
148         <!-- **************************************************************************************** -->
149
150         <!-- ********************** Panel for showing already loaded holidays *********************** -->
151         <div class="panel" id="showHoliday">
152                 <form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post">
153                         <input type="hidden" id="showHolidayType" name="showHolidayType" value="" />
154                         <fieldset class="brief">
155                         <h3>Edit this holiday</h3>
156                         <span id="holtype"></span>
157                         <ol>
158                         <li>
159                                 <strong>Library:</strong> <span id="showBranchNameOutput"></span>
160                                 <input type="hidden" id="showBranchName" name="showBranchName" />
161                         </li>
162                         <li>
163                                 <strong>Date:</strong>
164                                 <span id="showDaynameOutput"></span>, 
165                                 
166                                 [% 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 %]
167
168                                 <input type="hidden" id="showDayname" name="showDayname" />
169                                 <input type="hidden" id="showWeekday" name="showWeekday" />
170                                 <input type="hidden" id="showDay" name="showDay" />
171                                 <input type="hidden" id="showMonth" name="showMonth" />
172                                 <input type="hidden" id="showYear" name="showYear" />
173                         </li>
174                         <li><label for="showTitle">Title: </label><input type="text" name="showTitle" id="showTitle" size="35" /></li>
175                     <!-- showTitle is necessary for exception radio button to work properly --> 
176                                 <label for="showDescription">Description:</label>
177                                 <textarea rows="2" cols="40" id="showDescription" name="showDescription"></textarea>    
178                     </li>
179                         <li class="radio"><div id="exceptionPosibility" style="position:static">
180                                 <input type="radio" name="showOperation" id="showOperationExc" value="exception" /> <label for="showOperationExc">Generate an exception for this repeated holiday.</label>
181                                 <a href="#" class="helptext">[?]</a>
182                                 <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>
183                         </div></li>
184                         <li class="radio"><input type="radio" name="showOperation" id="showOperationDel" value="delete" /> <label for="showOperationDel" id="showOperationDelLabel">Delete this holiday</label>
185                                 <a href="#" class="helptext">[?]</a>
186                                 <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>
187                         <li class="radio"><input type="radio" name="showOperation" id="showOperationEdit" value="edit" checked="checked" /> <label for="showOperationEdit">Edit this holiday</label>
188                                                 <a href="#" class="helptext">[?]</a>
189                                                 <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>
190
191                         </ol>
192                         <fieldset class="action">
193                                 <input type="submit" name="submit" value="Save" />
194                                 <a href="#" class="cancel" name="cancel2" onclick=" hidePanel('showHoliday');">Cancel</a>
195                         </fieldset>
196                         </fieldset>
197                 </form>
198         </div>
199
200         <!-- ***************************** Panel to deal with new holidays **********************  -->
201         <div class="panel" id="newHoliday">
202                 <form action="/cgi-bin/koha/tools/newHolidays.pl" method="post">
203                                 <input type="hidden" name="branchCodes" id="branchCodes" value="[% branchcodes %]" /> 
204                         <fieldset class="brief">
205                         <h3>Add new holiday</h3>
206                         <ol>
207                         <li>
208                                 <strong>Library:</strong>
209                                 <span id="newBranchNameOutput"></span>
210                                 <input type="hidden" id="newBranchName" name="newBranchName" />
211                         </li>
212                         <li>
213                                 <strong>From Date:</strong>
214                                 <span id="newDaynameOutput"></span>, 
215
216                                 [% 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 %]
217
218                                 <input type="hidden" id="newDayname" name="showDayname" />
219                                 <input type="hidden" id="newWeekday" name="newWeekday" />
220                                 <input type="hidden" id="newDay" name="newDay" />
221                                 <input type="hidden" id="newMonth" name="newMonth" />
222                                 <input type="hidden" id="newYear" name="newYear" />
223                         </li>
224                         <li class="dateinsert">
225                                 <b>To Date : </b>
226                                 <input type="text" id="dateofrange" name="dateofrange" size="20" value="[% dateofrange %]" />
227                                 <img src="[% themelang %]/lib/calendar/cal.gif" id="dateofrange_button" alt="Show Calendar" />
228                                 <script language="JavaScript" type="text/javascript">
229                                 Calendar.setup(
230                                         {
231                                         inputField : "dateofrange",
232                                         ifFormat : "[% DHTMLcalendar_dateformat %]",
233                                         button : "dateofrange_button"
234                                         }
235                                 );
236                                 </script>
237                         </li>
238                         <li><label for="title">Title: </label><input type="text" name="newTitle" id="title" size="35" /></li>
239                         <li><label for="newDescription">Description:</label>
240                                 <textarea rows="2" cols="40" id="newDescription" name="newDescription"></textarea>
241                         </li>
242                         <li class="radio"><input type="radio" name="newOperation" id="newOperationOnce" value="holiday" checked="checked" />
243                         <label for="newOperationOnce">Holiday only on this day</label>.
244                         <a href="#" class="helptext">[?]</a>
245                         <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>
246                         </li>
247                         <li class="radio"><input type="radio" name="newOperation" id="newOperationDay" value="weekday" />
248                                                         <label for="newOperationDay">Holiday repeated every same day of the week</label>.
249                                                         <a href="#" class="helptext">[?]</a>
250                                                         <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>
251                                                         </li>
252                         <li class="radio"><input type="radio" name="newOperation" id="newOperationYear" value="repeatable" />
253                                                         <label for="newOperationYear">Holiday repeated yearly on the same date</label>.
254                                                         <a href="#" class="helptext">[?]</a>
255                                                         <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>
256                                                         </li>
257             <li class="radio"><input type="radio" name="newOperation" id="newOperationField" value="holidayrange" />
258                             <label for="newOperationField">Holidays on a range</label>.
259                             <a href="#" class="helptext">[?]</a>
260                             <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>
261                             </li>
262             <li class="radio"><input type="radio" name="newOperation" id="newOperationFieldyear" value="holidayrangerepeat" />
263                             <label for="newOperationFieldyear">Holidays repeated yearly on a range</label>.
264                             <a href="#" class="helptext">[?]</a>
265                             <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>
266                             </li>
267                                 <li class="radio">
268                                 <input type="checkbox" name="allBranches" id="allBranches" />
269                                 <label for="allBranches">Copy to all libraries</label>.
270                                 <a href="#" class="helptext">[?]</a>
271                                 <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>
272                                 </li></ol>
273                                 <fieldset class="action">
274                                         <input type="submit" name="submit" value="Save" />
275                                         <a href="#" class="cancel" name="cancel2" onclick=" hidePanel('newHoliday');">Cancel</a>
276                                 </fieldset>
277                                 </fieldset>
278                 </form>
279         </div>
280
281         <!-- *************************************************************************************** -->
282         <!-- ******                          END OF FLAT PANELS                               ****** -->
283         <!-- *************************************************************************************** -->
284
285 <!-- ************************************************************************************** -->
286 <!-- ******                              MAIN SCREEN CODE                            ****** -->
287 <!-- ************************************************************************************** -->
288 <h3>Calendar information</h3>
289 <div id="calendar-container">
290 <script type="text/javascript">
291         /* Creates all the structures to deal with all diferents kinds of holidays */
292         var week_days = new Array();
293         var holidays = new Array();
294         var exception_holidays = new Array();
295         var day_month_holidays = new Array();
296         var hola= "[% code %]";
297         [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
298         week_days["[% WEEK_DAYS_LOO.KEY %]"] = {title:"[% WEEK_DAYS_LOO.TITLE | replace('"','\"') %]", description:"[% WEEK_DAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
299         [% END %]
300         [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
301         holidays["[% HOLIDAYS_LOO.KEY %]"] = {title:"[% HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
302         [% END %]
303         [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
304         exception_holidays["[% EXCEPTION_HOLIDAYS_LOO.KEY %]"] = {title:"[% EXCEPTION_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
305         [% END %]
306         [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
307         day_month_holidays["[% DAY_MONTH_HOLIDAYS_LOO.KEY %]"] = {title:"[% DAY_MONTH_HOLIDAYS_LOO.TITLE | replace('"','\"') %]", description:"[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION | replace('"','\"') %]"};
308         [% END %]
309
310         /* This function gives css clases to each kind of day */
311         function dateStatusHandler(date) {
312                 var day = date.getDate();
313                 var month = date.getMonth() + 1;
314                 var year = date.getFullYear();
315                 var weekDay = date.getDay();
316                 var dayMonth = month + '/' + day;
317                 var dateString = year + '/' + month + '/' + day;
318                 if (exception_holidays[dateString] != null) {
319                         return 'exception';
320                 } else if ( week_days[weekDay] != null ){
321                         return 'repeatableweekly';
322                 } else if ( day_month_holidays[dayMonth] != null ) {
323                         return 'repeatableyearly';
324                 } else if (holidays[dateString] != null) {
325                         return 'holiday';
326                 } else {
327                         return 'normalday';
328                 }
329         }
330
331         /* This function is in charge of showing the correct panel considering the kind of holiday */
332         function dateChanged(calendar) {
333                 var day = calendar.date.getDate();
334                 var month = calendar.date.getMonth() + 1;
335                 var year = calendar.date.getFullYear();
336                 var weekDay = calendar.date.getDay();
337                 var dayName = calendar.date.print('%A');
338                 var dayMonth = month + '/' + day;
339                 var dateString = year + '/' + month + '/' + day;
340                 if (calendar.dateClicked) {
341                         if (holidays[dateString] != null) {
342                                 showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title,  holidays[dateString].description, 'ymd');
343                         } else if (exception_holidays[dateString] != null) {
344                                 showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description, 'exception');
345                         } else if (week_days[weekDay] != null) {
346                                 showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title,    week_days[weekDay].description, 'weekday');
347                         } else if (day_month_holidays[dayMonth] != null) {
348                                 showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description, 'daymonth');
349                         } else {
350                                 newHoliday(dayName, day, month, year, weekDay);
351                         }
352                 }
353         };
354         Calendar.setup(
355                 {
356                         flat : "calendar-container",
357                         flatCallback : dateChanged,
358                         date: "[% keydate %]",
359                         dateStatusFunc : dateStatusHandler
360                 }
361         );
362 </script>
363
364
365 </div>
366 </div>
367 <div class="yui-u">
368 <div class="help">
369 <h4>Hints</h4>
370         <ul>
371                 <li>Search in the calendar the day you want to set as holiday.</li>
372                 <li>Click the date to add or edit a holiday.</li>
373                 <li>Enter a title and description for the holdiay.</li>
374                 <li>Specify how the holiday should repeat.</li>
375                 <li>Click Save to finish.</li>
376         </ul>
377 <h4>Key</h4>
378         <p>
379                 <span class="key normalday">Working day</span>
380                 <span class="key holiday">Unique holiday</span>
381                 <span class="key repeatableweekly">Holiday repeating weekly</span>
382                 <span class="key repeatableyearly">Holiday repeating yearly</span>
383                 <span class="key exception">Holiday exception</span>
384         </p>
385 </div>
386 <div id="holiday-list">
387 <!-- Exceptions First -->
388 <!--   this will probably always have the least amount of data -->
389 [% IF ( EXCEPTION_HOLIDAYS_LOOP ) %]
390 <h3>Exceptions</h3>
391   <table id="holidayexceptions">
392 <thead><tr>
393   <th class="exception">Date</th>
394   <th class="exception">Title</th>
395   <th class="exception">Description</th>
396 </tr>
397 </thead>
398 <tbody>
399   [% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %]
400   <tr>
401   <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% EXCEPTION_HOLIDAYS_LOO.branch %]&amp;calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE %]">[% EXCEPTION_HOLIDAYS_LOO.DATE %]</a></td>
402   <td>[% EXCEPTION_HOLIDAYS_LOO.TITLE %]</td>
403   <td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION %]</td> 
404   </tr>
405   [% END %] 
406 </tbody>
407 </table>
408 [% END %]
409
410 [% IF ( WEEK_DAYS_LOOP ) %]
411 <h3>Weekly - Repeatable Holidays</h3>
412 <table id="holidayweeklyrepeatable">
413 <thead>
414 <tr>
415   <th class="repeatableweekly">Day of Week</th>
416   <th class="repeatableweekly">Title</th>
417   <th class="repeatableweekly">Description</th>
418 </tr>
419 </thead>
420 <tbody>
421   [% FOREACH WEEK_DAYS_LOO IN WEEK_DAYS_LOOP %]
422   <tr>
423   <td>
424 <script type="text/javascript">
425   document.write(weekdays[ [% WEEK_DAYS_LOO.KEY %]]);
426 </script>
427   </td> 
428   <td>[% WEEK_DAYS_LOO.TITLE %]</td> 
429   <td>[% WEEK_DAYS_LOO.DESCRIPTION %]</td> 
430   </tr>
431   [% END %] 
432 </tbody>
433 </table>
434 [% END %]
435
436 [% IF ( DAY_MONTH_HOLIDAYS_LOOP ) %]
437 <h3>Yearly - Repeatable Holidays</h3>
438 <table id="holidaysyearlyrepeatable">
439 <thead>
440 <tr>
441   [% IF ( dateformat == 'metric' ) %]
442   <th class="repeatableyearly">Day/Month</th>
443   [% ELSE %]
444   <th class="repeatableyearly">Month/Day</th>
445   [% END %]
446   <th class="repeatableyearly">Title</th>
447   <th class="repeatableyearly">Description</th>
448 </tr>
449 </thead>
450 <tbody>
451   [% FOREACH DAY_MONTH_HOLIDAYS_LOO IN DAY_MONTH_HOLIDAYS_LOOP %]
452   <tr>
453   <td>[% DAY_MONTH_HOLIDAYS_LOO.DATE %]</td>
454   <td>[% DAY_MONTH_HOLIDAYS_LOO.TITLE %]</td> 
455   <td>[% DAY_MONTH_HOLIDAYS_LOO.DESCRIPTION %]</td> 
456   </tr>
457   [% END %] 
458 </tbody>
459 </table>
460 [% END %]
461
462 [% IF ( HOLIDAYS_LOOP ) %]
463 <h3>Unique Holidays</h3>
464 <table id="holidaysunique">
465 <thead>
466 <tr>
467   <th class="holiday">Date</th>
468   <th class="holiday">Title</th>
469   <th class="holiday">Description</th>
470 </tr>
471 </thead>
472 <tbody>
473     [% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %]
474 <tr>
475   <td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% HOLIDAYS_LOO.branch %]&amp;calendardate=[% HOLIDAYS_LOO.DATE %]">[% HOLIDAYS_LOO.DATE %]</a></td>
476   <td>[% HOLIDAYS_LOO.TITLE %]</td>
477   <td>[% HOLIDAYS_LOO.DESCRIPTION %]</td>
478 </tr>
479   [% END %] 
480 </tbody>
481 </table>
482 [% END %]
483 </div>
484 </div>
485 </div>
486 </div>
487 </div>
488
489 <div class="yui-b noprint">
490 [% INCLUDE 'tools-menu.inc' %]
491 </div>
492 </div>
493 [% INCLUDE 'intranet-bottom.inc' %]