blob: c09b533680bd37464ceab22ff52ed40c82340ffa (
plain) (
tree)
|
|
<h2>{{lang_locationsTable}}</h2>
<p>{{lang_locationsTableHints}}</p>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>{{lang_locationName}}</th>
<th>{{lang_backend}}</th>
<th>{{lang_lastCalendarUpdate}}</th>
<th class="text-center slx-smallcol">{{lang_openingtimes}}</th>
</tr>
</thead>
<tbody>
{{#list}}
<tr>
<td>
<div style="display:inline-block;width:{{depth}}em"></div>
{{#allowed}}
<a href="#" class="loc-name {{^depth}}slx-bold{{/depth}}" data-locationid="{{locationid}}">
{{/allowed}}
{{locationname}}
{{#allowed}}
<span class="glyphicon glyphicon-edit"></span>
</a>
{{/allowed}}
</td>
<td {{#backendMissing}}class="text-danger"{{/backendMissing}}>
{{backend}}
</td>
<td class="text-center">
{{#backend}}
{{lastCalendarUpdate}}
{{/backend}}
</td>
<td class="text-center">
<span class="glyphicon glyphicon-{{openingGlyph}} {{^strong}}text-muted{{/strong}}"></span>
</td>
</tr>
{{/list}}
</tbody>
</table>
<div class="modal fade" id="location-modal" tabindex="-1" role="dialog">
<div class="modal-dialog"> <!--style="min-width:600px;width:70%"-->
<div class="modal-content">
<form method="post" action="?do=locationinfo" id="settings-form">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="writeLocationConfig">
<input type="hidden" name="openingtimes" id="json-openingtimes" value="">
<div class="modal-header"><h3 id="location-modal-header"></h3></div>
<div class="modal-body"></div>
<div class="modal-footer">
<a class="btn btn-default" data-dismiss="modal">{{lang_close}}</a>
<button type="submit" class="btn btn-primary">
<span class="glyphicon glyphicon-floppy-disk"></span>
{{lang_save}}
</button>
</div>
</form>
</div>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
/**
* Load a opening time modal of a location.
*/
$('.loc-name').click(function (e) {
e.preventDefault();
var locationId = $(this).data('locationid');
var locationName = $(this).text();
$('#location-modal-header').text("[" + locationId + "] " + locationName);
$('#location-modal').modal('show').find('.modal-body').text('...').load("?do=locationinfo&action=config-location&id=" + locationId);
});
});
</script>
|