Lines 5-29
Link Here
|
5 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Koha › Tools › [% Branches.GetName( branch ) | html %] calendar</title> |
6 |
<title>Koha › Tools › [% Branches.GetName( branch ) | html %] calendar</title> |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
8 |
<style> .key { padding : 3px; white-space:nowrap; line-height:230%; } |
8 |
[% Asset.css("css/calendar.css") %] |
9 |
.ui-datepicker { font-size : 150%; } |
|
|
10 |
.ui-datepicker th, .ui-datepicker .ui-datepicker-title select { font-size : 80%; } |
11 |
.ui-datepicker td a { padding : .5em; } |
12 |
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { font-size : 80%; } |
13 |
.key { padding : 3px; white-space:nowrap; line-height:230%; } |
14 |
.normalday { background-color : #EDEDED; color : Black; border : 1px solid #BCBCBC; } |
15 |
.exception { background-color : #b3d4ff; color : Black; border : 1px solid #BCBCBC; } |
16 |
.holiday { background-color : #ffaeae; color : Black; border : 1px solid #BCBCBC; } |
17 |
.repeatableweekly { background-color : #FFFF99; color : Black; border : 1px solid #BCBCBC; } |
18 |
.repeatableyearly { background-color : #FFCC66; color : Black; border : 1px solid #BCBCBC; } |
19 |
td.exception a.ui-state-default { background: #b3d4ff none; color : Black; border : 1px solid #BCBCBC; } |
20 |
td.holiday a.ui-state-default { background: #ffaeae none; color : Black; border : 1px solid #BCBCBC; } |
21 |
td.repeatableweekly a.ui-state-default { background: #FFFF99 none; color : Black; border : 1px solid #BCBCBC; } |
22 |
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Black; border : 1px solid #BCBCBC; } |
23 |
.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; } |
24 |
.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; } |
25 |
#showHoliday { margin : .5em 0; } h1 select { width: 20em; } fieldset.brief ol { font-size:100%; } fieldset.brief li, 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; } |
26 |
</style> |
27 |
</head> |
9 |
</head> |
28 |
<body id="tools_holidays" class="tools"> |
10 |
<body id="tools_holidays" class="tools"> |
29 |
[% INCLUDE 'header.inc' %] |
11 |
[% INCLUDE 'header.inc' %] |
Lines 246-261
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
246 |
<!-- this will probably always have the least amount of data --> |
228 |
<!-- this will probably always have the least amount of data --> |
247 |
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
229 |
[% IF ( EXCEPTION_HOLIDAYS_LOOP ) %] |
248 |
<h3>Exceptions</h3> |
230 |
<h3>Exceptions</h3> |
|
|
231 |
<label class="controls"> |
232 |
<input type="checkbox" name="show_past" id="show_past_holidayexceptions" class="show_past" /> |
233 |
Show past entries |
234 |
</label> |
249 |
<table id="holidayexceptions"> |
235 |
<table id="holidayexceptions"> |
250 |
<thead><tr> |
236 |
<thead><tr> |
251 |
<th class="exception">Date</th> |
237 |
<th class="exception title-string">Date</th> |
252 |
<th class="exception">Title</th> |
238 |
<th class="exception">Title</th> |
253 |
<th class="exception">Description</th> |
239 |
<th class="exception">Description</th> |
254 |
</tr> |
240 |
</tr> |
255 |
</thead> |
241 |
</thead> |
256 |
<tbody> |
242 |
<tbody> |
257 |
[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %] |
243 |
[% FOREACH EXCEPTION_HOLIDAYS_LOO IN EXCEPTION_HOLIDAYS_LOOP %] |
258 |
<tr> |
244 |
<tr data-date="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]"> |
259 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">[% EXCEPTION_HOLIDAYS_LOO.DATE | html %]</span></a></td> |
245 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% EXCEPTION_HOLIDAYS_LOO.DATE | uri %]"><span title="[% EXCEPTION_HOLIDAYS_LOO.DATE_SORT | html %]">[% EXCEPTION_HOLIDAYS_LOO.DATE | html %]</span></a></td> |
260 |
<td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td> |
246 |
<td>[% EXCEPTION_HOLIDAYS_LOO.TITLE | html %]</td> |
261 |
<td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td> |
247 |
<td>[% EXCEPTION_HOLIDAYS_LOO.DESCRIPTION | html %]</td> |
Lines 294-302
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
294 |
<thead> |
280 |
<thead> |
295 |
<tr> |
281 |
<tr> |
296 |
[% IF ( dateformat == "metric" ) %] |
282 |
[% IF ( dateformat == "metric" ) %] |
297 |
<th class="repeatableyearly">Day/month</th> |
283 |
<th class="repeatableyearly title-string">Day/month</th> |
298 |
[% ELSE %] |
284 |
[% ELSE %] |
299 |
<th class="repeatableyearly">Month/day</th> |
285 |
<th class="repeatableyearly title-string">Month/day</th> |
300 |
[% END %] |
286 |
[% END %] |
301 |
<th class="repeatableyearly">Title</th> |
287 |
<th class="repeatableyearly">Title</th> |
302 |
<th class="repeatableyearly">Description</th> |
288 |
<th class="repeatableyearly">Description</th> |
Lines 316-332
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
316 |
|
302 |
|
317 |
[% IF ( HOLIDAYS_LOOP ) %] |
303 |
[% IF ( HOLIDAYS_LOOP ) %] |
318 |
<h3>Unique holidays</h3> |
304 |
<h3>Unique holidays</h3> |
|
|
305 |
<label class="controls"> |
306 |
<input type="checkbox" name="show_past" id="show_past_holidaysunique" class="show_past" /> |
307 |
Show past entries |
308 |
</label> |
319 |
<table id="holidaysunique"> |
309 |
<table id="holidaysunique"> |
320 |
<thead> |
310 |
<thead> |
321 |
<tr> |
311 |
<tr> |
322 |
<th class="holiday">Date</th> |
312 |
<th class="holiday title-string">Date</th> |
323 |
<th class="holiday">Title</th> |
313 |
<th class="holiday">Title</th> |
324 |
<th class="holiday">Description</th> |
314 |
<th class="holiday">Description</th> |
325 |
</tr> |
315 |
</tr> |
326 |
</thead> |
316 |
</thead> |
327 |
<tbody> |
317 |
<tbody> |
328 |
[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %] |
318 |
[% FOREACH HOLIDAYS_LOO IN HOLIDAYS_LOOP %] |
329 |
<tr> |
319 |
<tr data-date="[% HOLIDAYS_LOO.DATE_SORT | html %]"> |
330 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% HOLIDAYS_LOO.DATE | uri %]"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.DATE | html %]</span></a></td> |
320 |
<td><a href="/cgi-bin/koha/tools/holidays.pl?branch=[% branch | uri %]&calendardate=[% HOLIDAYS_LOO.DATE | uri %]"><span title="[% HOLIDAYS_LOO.DATE_SORT | html %]">[% HOLIDAYS_LOO.DATE | html %]</span></a></td> |
331 |
<td>[% HOLIDAYS_LOO.TITLE | html %]</td> |
321 |
<td>[% HOLIDAYS_LOO.TITLE | html %]</td> |
332 |
<td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td> |
322 |
<td>[% HOLIDAYS_LOO.DESCRIPTION.replace('\\\r\\\n', '<br />') | html %]</td> |
Lines 498-503
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
498 |
} |
488 |
} |
499 |
}; |
489 |
}; |
500 |
|
490 |
|
|
|
491 |
/* Custom table search configuration: If a table row |
492 |
has an "expired" class, hide it UNLESS the |
493 |
show_expired checkbox is checked */ |
494 |
$.fn.dataTable.ext.search.push( |
495 |
function( settings, searchData, index, rowData, counter ) { |
496 |
var table = settings.nTable.id; |
497 |
var row = $(settings.aoData[index].nTr); |
498 |
if( row.hasClass("date_past") && !$("#show_past_" + table ).prop("checked") ){ |
499 |
return false; |
500 |
} else { |
501 |
return true; |
502 |
} |
503 |
} |
504 |
); |
505 |
|
506 |
// Create current date variable |
507 |
var date = new Date(); |
508 |
var datestring = date.toISOString().substring(0, 10); |
509 |
|
501 |
$(document).ready(function() { |
510 |
$(document).ready(function() { |
502 |
|
511 |
|
503 |
$(".hint").hide(); |
512 |
$(".hint").hide(); |
Lines 512-524
td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl
Link Here
|
512 |
"sDom": 't', |
521 |
"sDom": 't', |
513 |
"bPaginate": false |
522 |
"bPaginate": false |
514 |
})); |
523 |
})); |
515 |
$("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").dataTable($.extend(true, {}, dataTablesDefaults, { |
524 |
var tables = $("#holidayexceptions,#holidaysyearlyrepeatable,#holidaysunique").DataTable($.extend(true, {}, dataTablesDefaults, { |
516 |
"sDom": 't', |
525 |
"sDom": 't', |
517 |
"aoColumns": [ |
526 |
"aoColumnDefs": [ |
518 |
{ "sType": "title-string" },null,null |
527 |
{ "type": "title-string", "targets" : [ "title-string" ] }, |
519 |
], |
528 |
], |
520 |
"bPaginate": false |
529 |
"bPaginate": false, |
|
|
530 |
"createdRow": function( row, data, dataIndex ) { |
531 |
var holiday = $(row).data("date"); |
532 |
if( holiday < datestring ){ |
533 |
$(row).addClass("date_past"); |
534 |
} |
535 |
} |
521 |
})); |
536 |
})); |
|
|
537 |
|
538 |
$(".show_past").on("change", function(){ |
539 |
tables.draw(); |
540 |
}); |
541 |
|
522 |
$("a.helptext").click(function(){ |
542 |
$("a.helptext").click(function(){ |
523 |
$(this).parent().find(".hint").toggle(); return false; |
543 |
$(this).parent().find(".hint").toggle(); return false; |
524 |
}); |
544 |
}); |
525 |
- |
|
|