component.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php'; ?>
  2. <?php if($myUser->connected()): ?>
  3. <div class="jumbotron">
  4. <div class="jumbotron-contents">
  5. <h2>Mes composants</h2>
  6. <a onclick="edit_component();" class="btn btn-success"><i class="fa fa-plus"></i> Ajouter</a>
  7. <table class="table table-striped table-hover" id="components">
  8. <thead>
  9. <tr>
  10. <th>#</th>
  11. <th>Image</th>
  12. <th>Libellé</th>
  13. <th>Marque</th>
  14. <th>Prix moyen</th>
  15. <th style="width:100px;">Options</th>
  16. </tr>
  17. </thead>
  18. <tbody>
  19. <tr data-id="{{id}}" style="display:none;">
  20. <td>{{id}}</td>
  21. <td><div class="componentImage"><img src="{{image}}"/></div></td>
  22. <td><a href="{{link}}">{{label}}</a></td>
  23. <td>{{brand}}</td>
  24. <td>{{price}}</td>
  25. <td>
  26. <div onclick="edit_component(this);" class="btn btn-primary"><i class="fa fa-pencil"></i></div>
  27. <div onclick="delete_component(this);" class="btn btn-danger"><i class="fa fa-times"></i></div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. </div>
  34. <?php
  35. else:
  36. header('index.php');
  37. endif; ?>
  38. <?php
  39. require_once __ROOT__.'footer.php' ?>