bring into standalone plugin for distribution
This commit is contained in:
27
templates/ProductCategoryAttributes/add.php
Normal file
27
templates/ProductCategoryAttributes/add.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Datasource\EntityInterface $productCategoryAttribute
|
||||
* @var \Cake\Collection\CollectionInterface|string[] $productCategories
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('List Product Category Attributes'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="productCategoryAttributes form content">
|
||||
<?= $this->Form->create($productCategoryAttribute) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Add Product Category Attribute') ?></legend>
|
||||
<?= $this->element('ProductCategoryAttributes/form'); ?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->Html->script('CakeProducts.product_category_attribute_options.js'); ?>
|
||||
32
templates/ProductCategoryAttributes/edit.php
Normal file
32
templates/ProductCategoryAttributes/edit.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Datasource\EntityInterface $productCategoryAttribute
|
||||
* @var string[]|\Cake\Collection\CollectionInterface $productCategories
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Form->postLink(
|
||||
__('Delete'),
|
||||
['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']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="productCategoryAttributes form content">
|
||||
<?= $this->Form->create($productCategoryAttribute) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Edit Product Category Attribute') ?></legend>
|
||||
<?= $this->element('ProductCategoryAttributes/form'); ?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->Html->script('CakeProducts.product_category_attribute_options.js'); ?>
|
||||
50
templates/ProductCategoryAttributes/index.php
Normal file
50
templates/ProductCategoryAttributes/index.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var iterable<\Cake\Datasource\EntityInterface> $productCategoryAttributes
|
||||
*/
|
||||
?>
|
||||
<div class="productCategoryAttributes index content">
|
||||
<?= $this->Html->link(__('New Product Category Attribute'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
||||
<h3><?= __('Product Category Attributes') ?></h3>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->Paginator->sort('id') ?></th>
|
||||
<th><?= $this->Paginator->sort('name') ?></th>
|
||||
<th><?= $this->Paginator->sort('product_category_id') ?></th>
|
||||
<th><?= $this->Paginator->sort('attribute_type_id') ?></th>
|
||||
<th><?= $this->Paginator->sort('enabled') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($productCategoryAttributes as $productCategoryAttribute): ?>
|
||||
<tr>
|
||||
<td><?= $productCategoryAttribute->id ?></td>
|
||||
<td><?= h($productCategoryAttribute->name) ?></td>
|
||||
<td><?= $productCategoryAttribute->hasValue('product_category') ? $this->Html->link($productCategoryAttribute->product_category->name, ['controller' => 'ProductCategories', 'action' => 'view', $productCategoryAttribute->product_category->id]) : '' ?></td>
|
||||
<td><?= $productCategoryAttribute->attribute_type_id->name ?></td>
|
||||
<td><?= h($productCategoryAttribute->enabled) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['action' => 'view', $productCategoryAttribute->id]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $productCategoryAttribute->id]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $productCategoryAttribute->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCategoryAttribute->id)]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="paginator">
|
||||
<ul class="pagination">
|
||||
<?= $this->Paginator->first('<< ' . __('first')) ?>
|
||||
<?= $this->Paginator->prev('< ' . __('previous')) ?>
|
||||
<?= $this->Paginator->numbers() ?>
|
||||
<?= $this->Paginator->next(__('next') . ' >') ?>
|
||||
<?= $this->Paginator->last(__('last') . ' >>') ?>
|
||||
</ul>
|
||||
<p><?= $this->Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?></p>
|
||||
</div>
|
||||
</div>
|
||||
71
templates/ProductCategoryAttributes/view.php
Normal file
71
templates/ProductCategoryAttributes/view.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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><?= __('Id') ?></th>
|
||||
<td><?= $productCategoryAttribute->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><?= __('Id') ?></th>
|
||||
<th><?= __('Product Category Attribute Id') ?></th>
|
||||
<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->id) ?></td>
|
||||
<td><?= h($productCategoryAttributeOptions->product_category_attribute_id) ?></td>
|
||||
<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>
|
||||
Reference in New Issue
Block a user