product.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php /** @noinspection PhpUnhandledExceptionInspection */
  2. namespace App;
  3. /**
  4. * @var Product $product
  5. */
  6. $supplier = $product->getSupplier();
  7. ?>
  8. <div class="row mb-3">
  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. <section class="mb-4">
  22. <h4 class="mb-3"><?=htmlspecialchars(__("Details"))?></h4>
  23. <div class="list-group">
  24. <div class="list-group-item d-flex justify-content-between">
  25. <strong><?=htmlspecialchars(__("Supplier"))?></strong>
  26. <a href="<?=htmlspecialchars($supplier->getUrl())?>">
  27. <?=htmlspecialchars($supplier->name)?>
  28. </a>
  29. </div>
  30. <div class="list-group-item d-flex justify-content-between">
  31. <strong><?=htmlspecialchars(__("SKU"))?></strong>
  32. <?=htmlspecialchars($product->sku)?>
  33. </div>
  34. <div class="list-group-item d-flex justify-content-between">
  35. <strong><?=htmlspecialchars(__("Type"))?></strong>
  36. <?=htmlspecialchars($product->getDisplayType())?>
  37. </div>
  38. <div class="list-group-item d-flex justify-content-between">
  39. <strong><?=htmlspecialchars(__("Price"))?></strong>
  40. <?=htmlspecialchars($product->getDisplayPrice())?>
  41. </div>
  42. <div class="list-group-item d-flex justify-content-between">
  43. <strong><?=htmlspecialchars(__("URL"))?></strong>
  44. <span>
  45. <i class="fa fa-fw fa-external-link"></i>
  46. <a href="<?=htmlspecialchars($product->url)?>" target="_blank">
  47. <?=htmlspecialchars(__("View"))?>
  48. </a>
  49. </span>
  50. </div>
  51. <div class="list-group-item d-flex justify-content-between">
  52. <strong><?=htmlspecialchars(__("Brochure"))?></strong>
  53. <span>
  54. <i class="fa fa-fw fa-external-link"></i>
  55. <a href="<?=htmlspecialchars($product->getUrl())?>/view-brochure" target="_blank">
  56. <?=htmlspecialchars(__("View"))?>
  57. </a>
  58. </span>
  59. </div>
  60. </div>
  61. </section>