delphimvcframework/samples/angularjs/www/partials/home.html
daniele.teti 77f382b672
2013-11-14 10:08:02 +00:00

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">&nbsp;</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>