product.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App;
  3. /**
  4. * @var Product $product
  5. */
  6. $supplier = $product->getSupplier();
  7. ?>
  8. <div class="row mb-2">
  9. <div class="col">
  10. <h3>
  11. <?=htmlspecialchars($product->name)?>
  12. </h3>
  13. </div>
  14. <div class="col-auto">
  15. <a class="btn btn-primary" href="<?=htmlspecialchars($product->getUrl())?>/update">
  16. <i class="fa fa-fw fa-pencil"></i>
  17. <?=htmlspecialchars(__("Update"))?>
  18. </a>
  19. </div>
  20. </div>
  21. <h4><?=htmlspecialchars(__("Details"))?></h4>
  22. <div class="list-group">
  23. <div class="list-group-item d-flex justify-content-between">
  24. <strong><?=htmlspecialchars(__("Supplier"))?></strong>
  25. <a href="<?=htmlspecialchars($supplier->getUrl())?>">
  26. <?=htmlspecialchars($supplier->name)?>
  27. </a>
  28. </div>
  29. <div class="list-group-item d-flex justify-content-between">
  30. <strong><?=htmlspecialchars(__("Type"))?></strong>
  31. <?=htmlspecialchars($product->getDisplayType())?>
  32. </div>
  33. <div class="list-group-item d-flex justify-content-between">
  34. <strong><?=htmlspecialchars(__("Price"))?></strong>
  35. <?=htmlspecialchars($product->getDisplayPrice())?>
  36. </div>
  37. </div>