|
Lines 1-26
Link Here
|
|
|
1 |
[% USE raw %] |
| 1 |
[% USE Asset %] |
2 |
[% USE Asset %] |
| 2 |
[% USE Branches %] |
3 |
[% USE Branches %] |
| 3 |
[% SET footerjs = 1 %] |
4 |
[% SET footerjs = 1 %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title>Koha › Tools › [% Branches.GetName( branch ) %] calendar</title> |
6 |
<title>Koha › Tools › [% Branches.GetName( branch ) | html %] calendar</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
[% Asset.css("css/discretecalendar.css") %] |
8 |
[% Asset.css("css/discretecalendar.css") | $raw %] |
| 8 |
</head> |
9 |
</head> |
| 9 |
|
10 |
|
| 10 |
<body id="tools_holidays" class="tools"> |
11 |
<body id="tools_holidays" class="tools"> |
| 11 |
[% INCLUDE 'header.inc' %] |
12 |
[% INCLUDE 'header.inc' %] |
| 12 |
[% INCLUDE 'cat-search.inc' %] |
13 |
[% INCLUDE 'cat-search.inc' %] |
| 13 |
|
14 |
|
| 14 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% Branches.GetName( branch ) %] calendar</div> |
15 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% Branches.GetName( branch ) | html %] calendar</div> |
| 15 |
|
16 |
|
| 16 |
<div id="doc3" class="yui-t1"> |
17 |
<div id="main" class="main container-fluid"> |
|
|
18 |
<div class="row"> |
| 19 |
<div class="col-sm-10 col-sm-push-2"> |
| 20 |
<main> |
| 17 |
|
21 |
|
| 18 |
<div id="bd"> |
22 |
<h2>[% Branches.GetName( branch ) | html %] calendar</h2> |
| 19 |
<div id="yui-main"> |
23 |
|
| 20 |
<div class="yui-b"> |
24 |
<div class="row"> |
| 21 |
<h2>[% Branches.GetName( branch ) %] calendar</h2> |
25 |
<div class="col-sm-8"> |
| 22 |
<div class="yui-g"> |
|
|
| 23 |
<div class="yui-u first" style="width:60%"> |
| 24 |
<label for="branch">Define the holidays for:</label> |
26 |
<label for="branch">Define the holidays for:</label> |
| 25 |
<form method="post" onsubmit="return validateForm('CopyCalendar')"> |
27 |
<form method="post" onsubmit="return validateForm('CopyCalendar')"> |
| 26 |
<select id="branch" name="branch"> |
28 |
<select id="branch" name="branch"> |
|
Lines 31-37
Link Here
|
| 31 |
<option value=""></option> |
33 |
<option value=""></option> |
| 32 |
[% FOREACH l IN Branches.all() %] |
34 |
[% FOREACH l IN Branches.all() %] |
| 33 |
[% UNLESS branch == l.branchcode %] |
35 |
[% UNLESS branch == l.branchcode %] |
| 34 |
<option value="[% l.branchcode %]">[% l.branchname %]</option> |
36 |
<option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> |
| 35 |
[% END %] |
37 |
[% END %] |
| 36 |
[% END %] |
38 |
[% END %] |
| 37 |
</select> |
39 |
</select> |
|
Lines 76-82
Link Here
|
| 76 |
<input type="hidden" id="Year" name="Year" /> |
78 |
<input type="hidden" id="Year" name="Year" /> |
| 77 |
</li> |
79 |
</li> |
| 78 |
<li class="dateinsert"> |
80 |
<li class="dateinsert"> |
| 79 |
<b>To date: </b> |
81 |
<strong>To date: </strong> |
| 80 |
<input type="text" id="from_copyToDatePicker" name="toDate" size="20" class="datepicker" /> |
82 |
<input type="text" id="from_copyToDatePicker" name="toDate" size="20" class="datepicker" /> |
| 81 |
</li> |
83 |
</li> |
| 82 |
<li> |
84 |
<li> |
|
Lines 153-159
Link Here
|
| 153 |
<!-- ************************************************************************************** --> |
155 |
<!-- ************************************************************************************** --> |
| 154 |
|
156 |
|
| 155 |
</div> |
157 |
</div> |
| 156 |
<div class="yui-u" style="width : 40%"> |
158 |
<div class="col-sm-4"> |
| 157 |
<div class="help"> |
159 |
<div class="help"> |
| 158 |
<h4>Hints</h4> |
160 |
<h4>Hints</h4> |
| 159 |
<ul> |
161 |
<ul> |
|
Lines 170-176
Link Here
|
| 170 |
</ul> |
172 |
</ul> |
| 171 |
<h4>Key</h4> |
173 |
<h4>Key</h4> |
| 172 |
<p> |
174 |
<p> |
| 173 |
<span class="key normalday">Working day </span> |
175 |
<span class="key normalday">Working day</span> |
| 174 |
<span class="key holiday">Unique holiday</span> |
176 |
<span class="key holiday">Unique holiday</span> |
| 175 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
177 |
<span class="key repeatableweekly">Holiday repeating weekly</span> |
| 176 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
178 |
<span class="key repeatableyearly">Holiday repeating yearly</span> |
|
Lines 192-199
Link Here
|
| 192 |
<tbody> |
194 |
<tbody> |
| 193 |
[% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %] |
195 |
[% FOREACH need_validation_holiday IN NEED_VALIDATION_HOLIDAYS %] |
| 194 |
<tr> |
196 |
<tr> |
| 195 |
<td><a href="#doc3" onclick="go_to_date('[% need_validation_holiday.date %]')"><span title="[% need_validation_holiday.DATE_SORT %]">[% need_validation_holiday.outputdate %]</span></a></td> |
197 |
<td><a href="#main" onclick="go_to_date('[% need_validation_holiday.date | html %]')"><span title="[% need_validation_holiday.DATE_SORT | html %]">[% need_validation_holiday.outputdate | html %]</span></a></td> |
| 196 |
<td>[% need_validation_holiday.note %]</td> |
198 |
<td>[% need_validation_holiday.note | html %]</td> |
| 197 |
</tr> |
199 |
</tr> |
| 198 |
[% END %] |
200 |
[% END %] |
| 199 |
</tbody> |
201 |
</tbody> |
|
Lines 212-225
Link Here
|
| 212 |
<tbody> |
214 |
<tbody> |
| 213 |
[% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %] |
215 |
[% FOREACH WEEK_DAYS_LOO IN WEEKLY_HOLIDAYS %] |
| 214 |
<tr> |
216 |
<tr> |
| 215 |
<td>[% WEEK_DAYS_LOO.weekday %]</td> |
217 |
<td>[% WEEK_DAYS_LOO.weekday | html %]</td> |
| 216 |
</td> |
218 |
<td>[% WEEK_DAYS_LOO.note | html %]</td> |
| 217 |
<td>[% WEEK_DAYS_LOO.note %]</td> |
219 |
</tr> |
| 218 |
</tr> |
220 |
[% END %] |
| 219 |
[% END %] |
221 |
</tbody> |
| 220 |
</tbody> |
222 |
</table> |
| 221 |
</table> |
223 |
[% END %] |
| 222 |
[% END %] |
|
|
| 223 |
|
224 |
|
| 224 |
[% IF ( REPEATABLE_HOLIDAYS ) %] |
225 |
[% IF ( REPEATABLE_HOLIDAYS ) %] |
| 225 |
<h3>Yearly - Repeatable holidays</h3> |
226 |
<h3>Yearly - Repeatable holidays</h3> |
|
Lines 238-248
Link Here
|
| 238 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %] |
239 |
[% FOREACH DAY_MONTH_HOLIDAYS_LOO IN REPEATABLE_HOLIDAYS %] |
| 239 |
<tr> |
240 |
<tr> |
| 240 |
[% IF ( dateformat == "metric" ) %] |
241 |
[% IF ( dateformat == "metric" ) %] |
| 241 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.day %]/[% DAY_MONTH_HOLIDAYS_LOO.month %]</span></td> |
242 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.day | html %]/[% DAY_MONTH_HOLIDAYS_LOO.month | html %]</span></td> |
| 242 |
[% ELSE %] |
243 |
[% ELSE %] |
| 243 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT %]">[% DAY_MONTH_HOLIDAYS_LOO.month %]/[% DAY_MONTH_HOLIDAYS_LOO.day %]</span></td> |
244 |
<td><span title="[% DAY_MONTH_HOLIDAYS_LOO.DATE_SORT | html %]">[% DAY_MONTH_HOLIDAYS_LOO.month | html %]/[% DAY_MONTH_HOLIDAYS_LOO.day | html %]</span></td> |
| 244 |
[% END %] |
245 |
[% END %] |
| 245 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.note %]</td> |
246 |
<td>[% DAY_MONTH_HOLIDAYS_LOO.note | html %]</td> |
| 246 |
</tr> |
247 |
</tr> |
| 247 |
[% END %] |
248 |
[% END %] |
| 248 |
</tbody> |
249 |
</tbody> |
|
Lines 261-268
Link Here
|
| 261 |
<tbody> |
262 |
<tbody> |
| 262 |
[% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %] |
263 |
[% FOREACH HOLIDAYS_LOO IN UNIQUE_HOLIDAYS %] |
| 263 |
<tr> |
264 |
<tr> |
| 264 |
<td><a href="#doc3" onclick="go_to_date('[% HOLIDAYS_LOO.date %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT %]">[% HOLIDAYS_LOO.outputdate %]</span></a></td> |
265 |
<td><a href="#main" onclick="go_to_date('[% HOLIDAYS_LOO.date | html %]')"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.outputdate | html %]</span></a></td> |
| 265 |
<td>[% HOLIDAYS_LOO.note %]</td> |
266 |
<td>[% HOLIDAYS_LOO.note | html %]</td> |
| 266 |
</tr> |
267 |
</tr> |
| 267 |
[% END %] |
268 |
[% END %] |
| 268 |
</tbody> |
269 |
</tbody> |
|
Lines 281-288
Link Here
|
| 281 |
<tbody> |
282 |
<tbody> |
| 282 |
[% FOREACH float_holiday IN FLOAT_HOLIDAYS %] |
283 |
[% FOREACH float_holiday IN FLOAT_HOLIDAYS %] |
| 283 |
<tr> |
284 |
<tr> |
| 284 |
<td><a href="#doc3" onclick="go_to_date('[% float_holiday.date %]')"><span title="[% float_holiday.DATE_SORT %]">[% float_holiday.outputdate %]</span></a></td> |
285 |
<td><a href="#main" onclick="go_to_date('[% float_holiday.date | html %]')"><span title="[% float_holiday.DATE_SORT | html %]">[% float_holiday.outputdate | html %]</span></a></td> |
| 285 |
<td>[% float_holiday.note %]</td> |
286 |
<td>[% float_holiday.note | html %]</td> |
| 286 |
</tr> |
287 |
</tr> |
| 287 |
[% END %] |
288 |
[% END %] |
| 288 |
</tbody> |
289 |
</tbody> |
|
Lines 291-319
Link Here
|
| 291 |
</div> |
292 |
</div> |
| 292 |
</div> |
293 |
</div> |
| 293 |
</div> |
294 |
</div> |
| 294 |
</div> |
|
|
| 295 |
</div> |
| 296 |
|
295 |
|
| 297 |
<div class="yui-b noprint"> |
296 |
</main> |
| 298 |
[% INCLUDE 'tools-menu.inc' %] |
297 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
| 299 |
</div> |
298 |
|
| 300 |
</div> |
299 |
<div class="col-sm-2 col-sm-pull-10"> |
|
|
300 |
<aside> |
| 301 |
[% INCLUDE 'tools-menu.inc' %] |
| 302 |
</aside> |
| 303 |
</div> <!-- .col-sm-2.col-sm-pull-10 --> |
| 304 |
</div> <!-- /.row --> |
| 305 |
|
| 301 |
[% MACRO jsinclude BLOCK %] |
306 |
[% MACRO jsinclude BLOCK %] |
| 302 |
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") %] |
307 |
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] |
| 303 |
[% INCLUDE 'calendar.inc' %] |
308 |
[% INCLUDE 'calendar.inc' %] |
| 304 |
[% INCLUDE 'datatables.inc' %] |
309 |
[% INCLUDE 'datatables.inc' %] |
| 305 |
<script type="text/javascript"> |
310 |
<script> |
| 306 |
//<![CDATA[ |
|
|
| 307 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
311 |
var weekdays = new Array(_("Sundays"),_("Mondays"),_("Tuesdays"),_("Wednesdays"),_("Thursdays"),_("Fridays"),_("Saturdays")); |
| 308 |
// Array containing all the information about each date in the calendar. |
312 |
// Array containing all the information about each date in the calendar. |
| 309 |
var datesInfos = new Array(); |
313 |
var datesInfos = new Array(); |
| 310 |
[% FOREACH date IN datesInfos %] |
314 |
[% FOREACH date IN datesInfos %] |
| 311 |
datesInfos["[% date.date %]"] = { |
315 |
datesInfos["[% date.date | html %]"] = { |
| 312 |
title : "[% date.note %]", |
316 |
title : "[% date.note | html %]", |
| 313 |
outputdate : "[% date.outputdate %]", |
317 |
outputdate : "[% date.outputdate | html %]", |
| 314 |
holiday_type:"[% date.holiday_type %]", |
318 |
holiday_type:"[% date.holiday_type | html %]", |
| 315 |
open_hour: "[% date.open_hour %]", |
319 |
open_hour: "[% date.open_hour | html %]", |
| 316 |
close_hour: "[% date.close_hour %]" |
320 |
close_hour: "[% date.close_hour | html %]" |
| 317 |
}; |
321 |
}; |
| 318 |
[% END %] |
322 |
[% END %] |
| 319 |
|
323 |
|
|
Lines 396-402
Link Here
|
| 396 |
|
400 |
|
| 397 |
function changeBranch () { |
401 |
function changeBranch () { |
| 398 |
var branch = $("#branch option:selected").val(); |
402 |
var branch = $("#branch option:selected").val(); |
| 399 |
location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate %]"; |
403 |
location.href='/cgi-bin/koha/tools/discrete_calendar.pl?branch=' + branch + '&calendardate=' + "[% calendardate | html %]"; |
| 400 |
} |
404 |
} |
| 401 |
|
405 |
|
| 402 |
function Help() { |
406 |
function Help() { |
|
Lines 596-605
Link Here
|
| 596 |
beforeShowDay: function(thedate) { |
600 |
beforeShowDay: function(thedate) { |
| 597 |
return dateStatusHandler(thedate); |
601 |
return dateStatusHandler(thedate); |
| 598 |
}, |
602 |
}, |
| 599 |
defaultDate: new Date("[% keydate %]"), |
603 |
defaultDate: new Date("[% keydate | html %]"), |
| 600 |
minDate: new Date("[% minDate %]"), |
604 |
minDate: new Date("[% minDate | html %]"), |
| 601 |
maxDate: new Date("[% maxDate %]"), |
605 |
maxDate: new Date("[% maxDate | html %]"), |
| 602 |
dateFormat: "[% datepickerformat %]" |
606 |
dateFormat: "[% datepickerformat | html %]" |
| 603 |
}); |
607 |
}); |
| 604 |
//Main datepicker |
608 |
//Main datepicker |
| 605 |
$("#jcalendar-container").datepicker({ |
609 |
$("#jcalendar-container").datepicker({ |
|
Lines 676-682
Link Here
|
| 676 |
} |
680 |
} |
| 677 |
}); |
681 |
}); |
| 678 |
}); |
682 |
}); |
| 679 |
//]]> |
|
|
| 680 |
</script> |
683 |
</script> |
| 681 |
[% END %] |
684 |
[% END %] |
| 682 |
[% INCLUDE 'intranet-bottom.inc' %] |
685 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 683 |
- |
|
|