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