hal/web-resource/event_overview.tmpl
Ziver Koc da24ffb822 Events can now be changed in overview page. issue 5
Former-commit-id: 31060a25e584ab277f222dae21bc7a938ec83b1b
2016-01-22 15:46:09 +01:00

45 lines
No EOL
1.6 KiB
Cheetah
Executable file

<h1 class="page-header">Event Overview</h1>
<div class="col-md-12">
<div class="panel panel-default drop-shadow">
<div class="panel-heading">Local Events</div>
<div class="panel-body">
<table class="table table-hover table-condensed">
<thead>
<th class="col-md-5">Name</th>
<th class="col-md-3">Data</th>
<th class="col-md-3">Last Update</th>
<th class="col-md-1">Actions</th>
</thead>
{{#events}}
<tr>
<td><a href="?id={{.getId()}}">{{.getName()}}</a></td>
<td>{{.getData()}}</td>
<td>updated 1 min ago</td>
<td>
<form method="POST">
<input type="hidden" name="action" value="-">
<input type="hidden" name="id" value="{{.getId()}}">
<div class="btn-toolbar pull-right">
<input class="toggle-switch" type="checkbox" name="data"
data-size="mini" data-on-color="danger"
{{#.getData()}}checked{{/.getData()}} >
</div>
</form>
</td>
</tr>
{{/events}}
</table>
</div>
</div>
</div>
<script>
$(function (){
$(".toggle-switch").on("switchChange.bootstrapSwitch", function (event, state) {
$(this).closest('form').submit();
});
});
</script>