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