|
Lines 287-294
Link Here
|
| 287 |
<div class="hint">Set to 'yes' to show this library as a search option and on the libraries page in the OPAC.</div> |
287 |
<div class="hint">Set to 'yes' to show this library as a search option and on the libraries page in the OPAC.</div> |
| 288 |
</li> |
288 |
</li> |
| 289 |
<li> |
289 |
<li> |
| 290 |
<label for="opening_hours">Opening hours: </label> |
290 |
<label for="library_hours">Opening hours: </label> |
| 291 |
<table id="opening_hours_table"> |
291 |
<table id="library_hours_table"> |
| 292 |
<thead> |
292 |
<thead> |
| 293 |
<tr> |
293 |
<tr> |
| 294 |
<th>Day</th> |
294 |
<th>Day</th> |
|
Lines 297-305
Link Here
|
| 297 |
</tr> |
297 |
</tr> |
| 298 |
</thead> |
298 |
</thead> |
| 299 |
<tbody> |
299 |
<tbody> |
| 300 |
[% IF opening_hours # Existing library %] |
300 |
[% IF library.library_hours # Existing library %] |
| 301 |
[% daycount = 0 %] |
301 |
[% daycount = 0 %] |
| 302 |
[% FOREACH hr IN opening_hours %] |
302 |
[% FOREACH hr IN library.library_hours %] |
| 303 |
<tr id="hours_[% daycount | html %]"> |
303 |
<tr id="hours_[% daycount | html %]"> |
| 304 |
<td> |
304 |
<td> |
| 305 |
[% PROCESS dayname day=daycount %] |
305 |
[% PROCESS dayname day=daycount %] |
|
Lines 398-403
Link Here
|
| 398 |
<th>Pickup location</th> |
398 |
<th>Pickup location</th> |
| 399 |
<th>Public</th> |
399 |
<th>Public</th> |
| 400 |
<th>SMTP server</th> |
400 |
<th>SMTP server</th> |
|
|
401 |
<th>Library hours</th> |
| 401 |
<th data-class-name="actions noExport">Actions</th> |
402 |
<th data-class-name="actions noExport">Actions</th> |
| 402 |
</tr> |
403 |
</tr> |
| 403 |
</thead> |
404 |
</thead> |
|
Lines 528-533
Link Here
|
| 528 |
<span>No</span> |
529 |
<span>No</span> |
| 529 |
[% END %] |
530 |
[% END %] |
| 530 |
</li> |
531 |
</li> |
|
|
532 |
<li> |
| 533 |
<span class="label">Opening hours: </span> |
| 534 |
[% IF library.library_hours # Existing library %] |
| 535 |
<table id="library_hours_table"> |
| 536 |
<thead> |
| 537 |
<tr> |
| 538 |
<th>Day</th> |
| 539 |
<th>Open time</th> |
| 540 |
<th>Close time</th> |
| 541 |
</tr> |
| 542 |
</thead> |
| 543 |
<tbody> |
| 544 |
[% daycount = 0 %] |
| 545 |
[% FOREACH hr IN library.library_hours %] |
| 546 |
<tr id="hours_[% daycount | html %]"> |
| 547 |
<td> |
| 548 |
<span>[% PROCESS dayname day=daycount %]</span> |
| 549 |
</td> |
| 550 |
<td> |
| 551 |
<span>[% hr.open_time | html %]</span> |
| 552 |
</td> |
| 553 |
<td> |
| 554 |
<span>[% hr.close_time | html %]</span> |
| 555 |
</td> |
| 556 |
</tr> |
| 557 |
[% daycount = daycount+1 %] |
| 558 |
[% END %] |
| 559 |
</tbody> |
| 560 |
</table> |
| 561 |
[% ELSE %] |
| 562 |
<span>No opening hours have been set.</span> |
| 563 |
[% END %] |
| 564 |
</li> |
| 531 |
</ol> |
565 |
</ol> |
| 532 |
</div> <!-- /.rows --> |
566 |
</div> <!-- /.rows --> |
| 533 |
</div> <!-- /.col-sm-6 --> |
567 |
</div> <!-- /.col-sm-6 --> |
|
Lines 576-582
Link Here
|
| 576 |
'emptyTable': '<div class="dialog message">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>', |
610 |
'emptyTable': '<div class="dialog message">'+_("There are no libraries defined.")+' <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">'+_("Start defining libraries")+'</a>.</div>', |
| 577 |
"stateSave": true, |
611 |
"stateSave": true, |
| 578 |
"columnDefs": [ { |
612 |
"columnDefs": [ { |
| 579 |
"targets": [0,1,3,4,7,9,10,11,12,13,14,15,16], |
613 |
"targets": [0,1,3,4,7,9,10,11,12,13,14,15,16,17], |
| 580 |
"render": function (data, type, row, meta) { |
614 |
"render": function (data, type, row, meta) { |
| 581 |
if ( type == 'display' ) { |
615 |
if ( type == 'display' ) { |
| 582 |
if ( data != null ) { |
616 |
if ( data != null ) { |
|
Lines 671-676
Link Here
|
| 671 |
"visible": true, |
705 |
"visible": true, |
| 672 |
"orderable": false |
706 |
"orderable": false |
| 673 |
}, |
707 |
}, |
|
|
708 |
{ |
| 709 |
"data": function( row, type, val, meta ) { |
| 710 |
const daynames = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']; |
| 711 |
var daycount = 0; |
| 712 |
var result = '<table id="library_hours_table"><thead><tr><th>Day</th><th>Open time</th><th>Close time</th></tr></thead><tbody>'; |
| 713 |
while ( row.library_hours[daycount] ) { |
| 714 |
result += '<tr id="hours_"'+daycount+'>'; |
| 715 |
result += '<td>'+daynames[daycount]+'</td>'; |
| 716 |
result += '<td><span>'+row.open_time+'</span></td>'; |
| 717 |
result += '<td><span>'+row.close_time+'</span></td>'; |
| 718 |
result += '</tr>'; |
| 719 |
daycount++; |
| 720 |
} |
| 721 |
result += '</tbody></table>'; |
| 722 |
return result; |
| 723 |
}, |
| 724 |
"searchable": false, |
| 725 |
"orderable": false |
| 726 |
}, |
| 674 |
{ |
727 |
{ |
| 675 |
"data": function( row, type, val, meta ) { |
728 |
"data": function( row, type, val, meta ) { |
| 676 |
|
729 |
|
| 677 |
- |
|
|