|
@@ -1,19 +1,24 @@
|
|
|
<h2 class="page-header">Athors</h2>
|
|
|
|
|
|
-<a href="#" editable-text="user.name" onaftersave='updateUser()'>{{ user.name || "empty" }}</a>
|
|
|
-
|
|
|
<table class="table table-hover">
|
|
|
<thead>
|
|
|
<th>Firstname</th>
|
|
|
<th>Lastname</th>
|
|
|
</thead>
|
|
|
<tbody ng-repeat="author in authors">
|
|
|
- <th>{{author.firstname}}</th>
|
|
|
- <th>{{author.lastname}}</th>
|
|
|
- <th class="float-right">
|
|
|
- <button class="btn-danger btn-xs pull-right" ng-click="deteteAuthor(author)"><i class="glyphicon glyphicon-trash"></i></button>
|
|
|
- <button class="btn-warning btn-xs pull-right"><i class="glyphicon glyphicon-pencil"></i></button>
|
|
|
-
|
|
|
- </th>
|
|
|
+ <td><span editable-text="author.firstname" e-form='editableForm' e-ng-model='author.firstname' e-name='firstname'>{{author.firstname || '-'}}</span></td>
|
|
|
+ <td><span editable-text="author.lastname" e-form='editableForm' e-ng-model='author.lastname' e-name='lastname'>{{author.lastname || '-'}}</span></td>
|
|
|
+ <td class="float-right">
|
|
|
+ <span ng-show="!editableForm.$visible">
|
|
|
+ <button class="btn-danger btn-xs pull-right" ng-click="deteteAuthor(author)"><i class="glyphicon glyphicon-trash"></i></button>
|
|
|
+ <button class="btn-warning btn-xs pull-right" ng-click="editableForm.$show()"><i class="glyphicon glyphicon-pencil"></i></button>
|
|
|
+ </span>
|
|
|
+ <form editable-form name="editableForm" ng-show="editableForm.$visible" onaftersave='saveAuthor($data,author.id)'>
|
|
|
+ <span>
|
|
|
+ <button type="button" class="btn-danger btn-lg pull-right" ng-disabled="editableForm.$waiting" ng-click="editableForm.$cancel()"><i class="glyphicon glyphicon-remove"></i></button>
|
|
|
+ <button type="submit" class="btn-warning btn-lg pull-right" ng-disabled="editableForm.$waiting" ng-click=""><i class="glyphicon glyphicon-ok "></i></button>
|
|
|
+ </span>
|
|
|
+ </form>
|
|
|
+ </td>
|
|
|
</tbody>
|
|
|
</table>
|