Lines 291-298
Link Here
|
291 |
<div class="hint">Set to 'yes' to show this library as a search option and on the libraries page in the OPAC.</div> |
291 |
<div class="hint">Set to 'yes' to show this library as a search option and on the libraries page in the OPAC.</div> |
292 |
</li> |
292 |
</li> |
293 |
<li> |
293 |
<li> |
294 |
<label for="opening_hours">Opening hours: </label> |
294 |
<label for="library_hours">Opening hours: </label> |
295 |
<table id="opening_hours_table"> |
295 |
<table id="library_hours_table"> |
296 |
<thead> |
296 |
<thead> |
297 |
<tr> |
297 |
<tr> |
298 |
<th>Day</th> |
298 |
<th>Day</th> |
Lines 301-309
Link Here
|
301 |
</tr> |
301 |
</tr> |
302 |
</thead> |
302 |
</thead> |
303 |
<tbody> |
303 |
<tbody> |
304 |
[% IF opening_hours # Existing library %] |
304 |
[% IF library.library_hours # Existing library %] |
305 |
[% daycount = 0 %] |
305 |
[% daycount = 0 %] |
306 |
[% FOREACH hr IN opening_hours %] |
306 |
[% FOREACH hr IN library.library_hours %] |
307 |
<tr id="hours_[% daycount | html %]"> |
307 |
<tr id="hours_[% daycount | html %]"> |
308 |
<td> |
308 |
<td> |
309 |
[% PROCESS dayname day=daycount %] |
309 |
[% PROCESS dayname day=daycount %] |
Lines 419-424
Link Here
|
419 |
<th>Pickup location</th> |
419 |
<th>Pickup location</th> |
420 |
<th>Public</th> |
420 |
<th>Public</th> |
421 |
<th>SMTP server</th> |
421 |
<th>SMTP server</th> |
|
|
422 |
<th>Library hours</th> |
422 |
<th data-class-name="actions noExport">Actions</th> |
423 |
<th data-class-name="actions noExport">Actions</th> |
423 |
</tr> |
424 |
</tr> |
424 |
</thead> |
425 |
</thead> |
Lines 549-554
Link Here
|
549 |
<span>No</span> |
550 |
<span>No</span> |
550 |
[% END %] |
551 |
[% END %] |
551 |
</li> |
552 |
</li> |
|
|
553 |
<li> |
554 |
<span class="label">Opening hours: </span> |
555 |
[% IF library.library_hours # Existing library %] |
556 |
<table id="library_hours_table"> |
557 |
<thead> |
558 |
<tr> |
559 |
<th>Day</th> |
560 |
<th>Open time</th> |
561 |
<th>Close time</th> |
562 |
</tr> |
563 |
</thead> |
564 |
<tbody> |
565 |
[% daycount = 0 %] |
566 |
[% FOREACH hr IN library.library_hours %] |
567 |
<tr id="hours_[% daycount | html %]"> |
568 |
<td> |
569 |
<span>[% PROCESS dayname day=daycount %]</span> |
570 |
</td> |
571 |
<td> |
572 |
<span>[% hr.open_time | html %]</span> |
573 |
</td> |
574 |
<td> |
575 |
<span>[% hr.close_time | html %]</span> |
576 |
</td> |
577 |
</tr> |
578 |
[% daycount = daycount+1 %] |
579 |
[% END %] |
580 |
</tbody> |
581 |
</table> |
582 |
[% ELSE %] |
583 |
<span>No opening hours have been set.</span> |
584 |
[% END %] |
585 |
</li> |
552 |
</ol> |
586 |
</ol> |
553 |
</div> <!-- /.rows --> |
587 |
</div> <!-- /.rows --> |
554 |
</div> <!-- /.col-sm-6 --> |
588 |
</div> <!-- /.col-sm-6 --> |
Lines 618-624
Link Here
|
618 |
'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>', |
652 |
'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>', |
619 |
"stateSave": true, |
653 |
"stateSave": true, |
620 |
"columnDefs": [ { |
654 |
"columnDefs": [ { |
621 |
"targets": [0,1,3,4,7,9,10,11,12,13,14,15,16], |
655 |
"targets": [0,1,3,4,7,9,10,11,12,13,14,15,16,17], |
622 |
"render": function (data, type, row, meta) { |
656 |
"render": function (data, type, row, meta) { |
623 |
if ( type == 'display' ) { |
657 |
if ( type == 'display' ) { |
624 |
if ( data != null ) { |
658 |
if ( data != null ) { |
Lines 713-718
Link Here
|
713 |
"visible": true, |
747 |
"visible": true, |
714 |
"orderable": false |
748 |
"orderable": false |
715 |
}, |
749 |
}, |
|
|
750 |
{ |
751 |
"data": function( row, type, val, meta ) { |
752 |
const daynames = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']; |
753 |
var daycount = 0; |
754 |
var result = '<table id="library_hours_table"><thead><tr><th>Day</th><th>Open time</th><th>Close time</th></tr></thead><tbody>'; |
755 |
while ( row.library_hours[daycount] ) { |
756 |
result += '<tr id="hours_"'+daycount+'>'; |
757 |
result += '<td>'+daynames[daycount]+'</td>'; |
758 |
result += '<td><span>'+row.open_time+'</span></td>'; |
759 |
result += '<td><span>'+row.close_time+'</span></td>'; |
760 |
result += '</tr>'; |
761 |
daycount++; |
762 |
} |
763 |
result += '</tbody></table>'; |
764 |
return result; |
765 |
}, |
766 |
"searchable": false, |
767 |
"orderable": false |
768 |
}, |
716 |
{ |
769 |
{ |
717 |
"data": function( row, type, val, meta ) { |
770 |
"data": function( row, type, val, meta ) { |
718 |
|
771 |
|
719 |
- |
|
|