| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- /**
- * @var Product[] $products
- */
- ?>
- <table class="table table-bordered table-hover mb-3">
- <thead>
- <tr>
- <th><?=htmlspecialchars(__("ID"))?></th>
- <th><?=htmlspecialchars(__("Supplier"))?></th>
- <th><?=htmlspecialchars(__("Name"))?></th>
- <th><?=htmlspecialchars(__("SKU"))?></th>
- <th><?=htmlspecialchars(__("Type"))?></th>
- <th><?=htmlspecialchars(__("Price"))?></th>
- <th><?=htmlspecialchars(__("Actions"))?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($products as $product) {
- $supplier = $product->getSupplier();
- ?>
- <tr>
- <td class="text-end">
- <?=$product->id?>
- </td>
- <td>
- <a href="<?=htmlspecialchars($supplier->getUrl())?>">
- <?=htmlspecialchars($supplier->name)?>
- </a>
- </td>
- <td>
- <?=htmlspecialchars($product->name)?>
- </td>
- <td>
- <?=htmlspecialchars($product->sku)?>
- </td>
- <td>
- <?=htmlspecialchars($product->getDisplayType())?>
- </td>
- <td class="text-end">
- <?=htmlspecialchars($product->getDisplayPrice())?>
- </td>
- <td class="p-1">
- <a class="btn btn-sm btn-primary" href="<?=htmlspecialchars($product->getUrl())?>/update">
- <?=htmlspecialchars(__("Update"))?>
- </a>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
|