books-details.template.html 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. <h1 class='page-header'>Book Details</h1>
  2. <div class="book-details" ng-if='!isEditeMode'>
  3. <button class="btn-primary" ng-click="edite()"><i class="glyphicon glyphicon-pencil"></i></button>
  4. <h3>{{details.title}}</h3>
  5. <h3>Author: {{getAuthorsById(details.author_id)}}</h3>
  6. <span>({{details.date}})</span>
  7. <span><i class="glyphicon glyphicon-heart">{{details.rate}}</i>${{details.cost}}</span>
  8. <img ng-src='{{details.image || "./app/img/noBook.png"}}' class="imgDetail">
  9. <p>{{details.intro}}</p>
  10. </div>
  11. <div class="edite-detail" ng-if='isEditeMode'>
  12. <button class="btn-success" ng-click="save()"><i class="glyphicon glyphicon-pencil"></i></button>
  13. <button class="btn-danger" ng-click="noEdite()"><i class="glyphicon glyphicon-remove"></i></button>
  14. <div class="form-group">
  15. <label for="title"></label>
  16. <input type="text" class="form-control" ng-model='details.title' id="title">
  17. </div>
  18. <div class="form-group">
  19. <label for="date"></label>
  20. <input type="date" ng-model='details.date' class="form-control" id="date">
  21. </div>
  22. <div class="form-group">
  23. <label for="text"></label>
  24. <textarea type="text" ng-model="details.intro" class="form-control" id='text' rows="10" ></textarea>
  25. </div>
  26. <div class="form-group">
  27. <label for="text"></label>
  28. <select ng-model="details.author_id" ng-options="author.id as author.name for author in authors">
  29. </select>
  30. </div>
  31. </div>