mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 16:25:54 +01:00
51 lines
1.1 KiB
HTML
51 lines
1.1 KiB
HTML
<div class="row_fluid">
|
|
<div class="col-sm-12">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>First name</th>
|
|
<th>Last name</th>
|
|
<th>Age</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{^people}}
|
|
<tr>
|
|
<td class="text-center" colspan="4"><<No People Found>></td>
|
|
</tr>
|
|
{{/people}}
|
|
{{#people}}
|
|
<tr>
|
|
<td>{{-index}}</td>
|
|
<td>{{first_name}}</td>
|
|
<td>{{last_name}}</td>
|
|
<td>{{age}}</td>
|
|
<td><button class="btn btn-danger" onclick="doDelete('{{guid}}')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</button></td>
|
|
</tr>
|
|
{{/people}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<div class="row_fluid">
|
|
<div class="col-sm-2 col-sm-offset-10">
|
|
<a class="btn btn-primary btn-block" href="/newperson">Add New Person</a>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
function doDelete(guid){
|
|
if (confirm("Are you sure?")){
|
|
$.ajax({
|
|
url: '/people/' + guid,
|
|
type: 'DELETE',
|
|
success: function(result) {
|
|
location.href = '/people';
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|