products form wip

This commit is contained in:
2025-04-01 01:24:18 -07:00
parent 17de2e97dd
commit f724b86674
3 changed files with 74 additions and 3 deletions

View File

@@ -0,0 +1,63 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $productCategoryAttribute
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('Edit Product Category Attribute'), ['action' => 'edit', $productCategoryAttribute->id], ['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink(__('Delete Product Category Attribute'), ['action' => 'delete', $productCategoryAttribute->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCategoryAttribute->id), 'class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('List Product Category Attributes'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('New Product Category Attribute'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="productCategoryAttributes view content">
<h3><?= h($productCategoryAttribute->name) ?></h3>
<table>
<tr>
<th><?= __('Name') ?></th>
<td><?= h($productCategoryAttribute->name) ?></td>
</tr>
<tr>
<th><?= __('Product Category') ?></th>
<td><?= $productCategoryAttribute->hasValue('product_category') ? $this->Html->link($productCategoryAttribute->product_category->name, ['controller' => 'ProductCategories', 'action' => 'view', $productCategoryAttribute->product_category->id]) : '' ?></td>
</tr>
<tr>
<th><?= __('Enabled') ?></th>
<td><?= $productCategoryAttribute->enabled ? __('Yes') : __('No'); ?></td>
</tr>
</table>
<div class="related">
<h4><?= __('Related Product Category Attribute Options') ?></h4>
<?php if (!empty($productCategoryAttribute->product_category_attribute_options)) : ?>
<div class="table-responsive">
<table>
<tr>
<th><?= __('Attribute Value') ?></th>
<th><?= __('Attribute Label') ?></th>
<th><?= __('Enabled') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($productCategoryAttribute->product_category_attribute_options as $productCategoryAttributeOptions) : ?>
<tr>
<td><?= h($productCategoryAttributeOptions->attribute_value) ?></td>
<td><?= h($productCategoryAttributeOptions->attribute_label) ?></td>
<td><?= h($productCategoryAttributeOptions->enabled) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => 'ProductCategoryAttributeOptions', 'action' => 'view', $productCategoryAttributeOptions->id]) ?>
<?= $this->Html->link(__('Edit'), ['controller' => 'ProductCategoryAttributeOptions', 'action' => 'edit', $productCategoryAttributeOptions->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['controller' => 'ProductCategoryAttributeOptions', 'action' => 'delete', $productCategoryAttributeOptions->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCategoryAttributeOptions->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>