product.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. <?php
  13. if($product->isArchived()) {
  14. ?>
  15. <span class="badge text-bg-secondary">
  16. <?=htmlspecialchars(__("Archived"))?>
  17. </span>
  18. <?php
  19. }
  20. ?>
  21. </h3>
  22. </div>
  23. <div class="col-auto">
  24. <a class="btn btn-primary" href="<?=htmlspecialchars($product->getUrl())?>/update">
  25. <i class="fa fa-fw fa-pencil"></i>
  26. <?=htmlspecialchars(__("Update"))?>
  27. </a>
  28. </div>
  29. </div>
  30. <section class="mb-4">
  31. <h4 class="mb-3"><?=htmlspecialchars(__("Details"))?></h4>
  32. <div class="list-group">
  33. <div class="list-group-item d-flex justify-content-between">
  34. <strong><?=htmlspecialchars(__("Supplier"))?></strong>
  35. <a href="<?=htmlspecialchars($supplier->getUrl())?>">
  36. <?=htmlspecialchars($supplier->name)?>
  37. </a>
  38. </div>
  39. <div class="list-group-item d-flex justify-content-between">
  40. <strong><?=htmlspecialchars(__("SKU"))?></strong>
  41. <?=htmlspecialchars($product->sku)?>
  42. </div>
  43. <div class="list-group-item d-flex justify-content-between">
  44. <strong><?=htmlspecialchars(__("Type"))?></strong>
  45. <?=htmlspecialchars($product->getDisplayType())?>
  46. </div>
  47. <div class="list-group-item d-flex justify-content-between">
  48. <strong><?=htmlspecialchars(__("Price"))?></strong>
  49. <?=htmlspecialchars($product->getDisplayPrice())?>
  50. </div>
  51. <div class="list-group-item d-flex justify-content-between">
  52. <strong><?=htmlspecialchars(__("URL"))?></strong>
  53. <span>
  54. <i class="fa fa-fw fa-external-link"></i>
  55. <a href="<?=htmlspecialchars($product->url)?>" target="_blank">
  56. <?=htmlspecialchars(__("View"))?>
  57. </a>
  58. </span>
  59. </div>
  60. <div class="list-group-item d-flex justify-content-between">
  61. <strong><?=htmlspecialchars(__("Brochure"))?></strong>
  62. <span>
  63. <i class="fa fa-fw fa-external-link"></i>
  64. <a href="<?=htmlspecialchars($product->getUrl())?>/view-brochure" target="_blank">
  65. <?=htmlspecialchars(__("View"))?>
  66. </a>
  67. </span>
  68. </div>
  69. </div>
  70. </section>