|
|
@@ -29,51 +29,5 @@ if(empty($products)) {
|
|
|
<?php
|
|
|
}
|
|
|
else {
|
|
|
- ?>
|
|
|
- <table class="table table-bordered">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th><?=htmlspecialchars(__("ID"))?></th>
|
|
|
- <th><?=htmlspecialchars(__("Supplier"))?></th>
|
|
|
- <th><?=htmlspecialchars(__("Name"))?></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->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>
|
|
|
- <?php
|
|
|
+ View::include("products_table", compact("products"));
|
|
|
}
|