bring into standalone plugin for distribution
This commit is contained in:
29
templates/ProductCatalogs/add.php
Normal file
29
templates/ProductCatalogs/add.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Datasource\EntityInterface $productCatalog
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('List Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="productCatalogs form content">
|
||||
<?= $this->Form->create($productCatalog) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Add Product Catalog') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('name');
|
||||
echo $this->Form->control('catalog_description');
|
||||
echo $this->Form->control('enabled');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
34
templates/ProductCatalogs/edit.php
Normal file
34
templates/ProductCatalogs/edit.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Datasource\EntityInterface $productCatalog
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Form->postLink(
|
||||
__('Delete'),
|
||||
['action' => 'delete', $productCatalog->id],
|
||||
['confirm' => __('Are you sure you want to delete # {0}?', $productCatalog->id), 'class' => 'side-nav-item']
|
||||
) ?>
|
||||
<?= $this->Html->link(__('List Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="productCatalogs form content">
|
||||
<?= $this->Form->create($productCatalog) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Edit Product Catalog') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('name');
|
||||
echo $this->Form->control('catalog_description');
|
||||
echo $this->Form->control('enabled');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
48
templates/ProductCatalogs/index.php
Normal file
48
templates/ProductCatalogs/index.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var iterable<\Cake\Datasource\EntityInterface> $productCatalogs
|
||||
*/
|
||||
?>
|
||||
<div class="productCatalogs index content">
|
||||
<?= $this->Html->link(__('New Product Catalog'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
||||
<h3><?= __('Product Catalogs') ?></h3>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->Paginator->sort('id') ?></th>
|
||||
<th><?= $this->Paginator->sort('name') ?></th>
|
||||
<th><?= $this->Paginator->sort('catalog_description') ?></th>
|
||||
<th><?= $this->Paginator->sort('enabled') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($productCatalogs as $productCatalog): ?>
|
||||
<tr>
|
||||
<td><?= $productCatalog->id; ?></td>
|
||||
<td><?= h($productCatalog->name) ?></td>
|
||||
<td><?= h($productCatalog->catalog_description) ?></td>
|
||||
<td><?= h($productCatalog->enabled) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['action' => 'view', $productCatalog->id]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $productCatalog->id]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $productCatalog->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCatalog->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>
|
||||
73
templates/ProductCatalogs/view.php
Normal file
73
templates/ProductCatalogs/view.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \Cake\Datasource\EntityInterface $productCatalog
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('Edit Product Catalog'), ['action' => 'edit', $productCatalog->id], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Form->postLink(__('Delete Product Catalog'), ['action' => 'delete', $productCatalog->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCatalog->id), 'class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('List Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('New Product Catalog'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column column-80">
|
||||
<div class="productCatalogs view content">
|
||||
<h3><?= h($productCatalog->name) ?></h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= __('Name') ?></th>
|
||||
<td><?= h($productCatalog->name) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Catalog Description') ?></th>
|
||||
<td><?= h($productCatalog->catalog_description) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Id') ?></th>
|
||||
<td><?= $productCatalog->id; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Enabled') ?></th>
|
||||
<td><?= $productCatalog->enabled ? __('Yes') : __('No'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="related">
|
||||
<h4><?= __('Related Product Categories') ?></h4>
|
||||
<?php if (!empty($productCatalog->product_categories)) : ?>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= __('Id') ?></th>
|
||||
<th><?= __('Product Catalog Id') ?></th>
|
||||
<th><?= __('Name') ?></th>
|
||||
<th><?= __('Category Description') ?></th>
|
||||
<th><?= __('Parent Id') ?></th>
|
||||
<th><?= __('Enabled') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($productCatalog->product_categories as $productCategories) : ?>
|
||||
<tr>
|
||||
<td><?= h($productCategories->id) ?></td>
|
||||
<td><?= h($productCategories->product_catalog_id) ?></td>
|
||||
<td><?= h($productCategories->name) ?></td>
|
||||
<td><?= h($productCategories->category_description) ?></td>
|
||||
<td><?= h($productCategories->parent_id) ?></td>
|
||||
<td><?= h($productCategories->enabled) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['controller' => 'ProductCategories', 'action' => 'view', $productCategories->id]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['controller' => 'ProductCategories', 'action' => 'edit', $productCategories->id]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['controller' => 'ProductCategories', 'action' => 'delete', $productCategories->id], ['confirm' => __('Are you sure you want to delete # {0}?', $productCategories->id)]) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user