mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-18 01:05:54 +01:00
61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h1></h1>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12"> </div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<button class="btn btn-info" ng-click="add()">ADD</button>
|
|
<table style="margin-top:15px" class="table table-striped table-bordered">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>DESCRIPTION</th>
|
|
<th>DATETIME</th>
|
|
<th></th>
|
|
</tr>
|
|
<tr ng-repeat="todo in list | orderBy:'description'">
|
|
<td>{{todo.id}}</td>
|
|
<td>{{todo.description}}</td>
|
|
<td>{{todo.datetime}}</td>
|
|
<td><button class="btn btn-success" ng-click="edit(todo)"><span>EDIT</span></button>
|
|
<button class="btn btn-danger" ng-click="viewdelete=true"><span>DELETE</span></button>
|
|
<div class="alert alert-danger" ng-show="viewdelete">
|
|
Are your sure?
|
|
<button class="btn btn-success" ng-click="delete(todo)">OK</button>
|
|
<button class="btn btn-danger" ng-click="viewdelete=false">CANCEL</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="col-xs-4" ng-show="viewedit">
|
|
<h1>EDIT</h1>
|
|
<label>Description:</label> <input type="text" ng-model="obj_todo.description" />
|
|
<br /><br />
|
|
<button class="btn btn-success" ng-click="update(obj_todo)">SAVE</button>
|
|
<button class="btn btn-danger" ng-click="viewedit=false">CANCEL</button>
|
|
</div>
|
|
|
|
<div class="col-xs-4" ng-show="viewadd">
|
|
<h1>ADD</h1>
|
|
<label>Description:</label> <input type="text" ng-model="description" />
|
|
<br /><br />
|
|
<button class="btn btn-success" ng-click="insert(description)">SAVE</button>
|
|
<button class="btn btn-danger" ng-click="viewadd=false">CANCEL</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="push"></div> |