bring into standalone plugin for distribution

This commit is contained in:
2024-11-24 18:38:29 -08:00
parent 279d46f14b
commit ded60d16bf
83 changed files with 7020 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $externalProductCatalog
* @var \Cake\Collection\CollectionInterface|string[] $productCatalogs
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('List External Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="externalProductCatalogs form content">
<?= $this->Form->create($externalProductCatalog) ?>
<fieldset>
<legend><?= __('Add External Product Catalog') ?></legend>
<?php
echo $this->Form->control('product_catalog_id', ['options' => $productCatalogs]);
echo $this->Form->control('base_url');
echo $this->Form->control('api_url');
echo $this->Form->control('deleted', ['empty' => true]);
echo $this->Form->control('enabled');
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $externalProductCatalog
* @var string[]|\Cake\Collection\CollectionInterface $productCatalogs
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Form->postLink(
__('Delete'),
['action' => 'delete', $externalProductCatalog->id],
['confirm' => __('Are you sure you want to delete # {0}?', $externalProductCatalog->id), 'class' => 'side-nav-item']
) ?>
<?= $this->Html->link(__('List External Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="externalProductCatalogs form content">
<?= $this->Form->create($externalProductCatalog) ?>
<fieldset>
<legend><?= __('Edit External Product Catalog') ?></legend>
<?php
echo $this->Form->control('product_catalog_id', ['options' => $productCatalogs]);
echo $this->Form->control('base_url');
echo $this->Form->control('api_url');
echo $this->Form->control('deleted', ['empty' => true]);
echo $this->Form->control('enabled');
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,54 @@
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\Cake\Datasource\EntityInterface> $externalProductCatalogs
*/
?>
<div class="externalProductCatalogs index content">
<?= $this->Html->link(__('New External Product Catalog'), ['action' => 'add'], ['class' => 'button float-right']) ?>
<h3><?= __('External Product Catalogs') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id') ?></th>
<th><?= $this->Paginator->sort('product_catalog_id') ?></th>
<th><?= $this->Paginator->sort('base_url') ?></th>
<th><?= $this->Paginator->sort('api_url') ?></th>
<th><?= $this->Paginator->sort('created') ?></th>
<th><?= $this->Paginator->sort('deleted') ?></th>
<th><?= $this->Paginator->sort('enabled') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($externalProductCatalogs as $externalProductCatalog): ?>
<tr>
<td><?= $this->Number->format($externalProductCatalog->id) ?></td>
<td><?= $externalProductCatalog->hasValue('product_catalog') ? $this->Html->link($externalProductCatalog->product_catalog->name, ['controller' => 'ProductCatalogs', 'action' => 'view', $externalProductCatalog->product_catalog->id]) : '' ?></td>
<td><?= h($externalProductCatalog->base_url) ?></td>
<td><?= h($externalProductCatalog->api_url) ?></td>
<td><?= h($externalProductCatalog->created) ?></td>
<td><?= h($externalProductCatalog->deleted) ?></td>
<td><?= h($externalProductCatalog->enabled) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $externalProductCatalog->id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $externalProductCatalog->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $externalProductCatalog->id], ['confirm' => __('Are you sure you want to delete # {0}?', $externalProductCatalog->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>

View File

@@ -0,0 +1,52 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $externalProductCatalog
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('Edit External Product Catalog'), ['action' => 'edit', $externalProductCatalog->id], ['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink(__('Delete External Product Catalog'), ['action' => 'delete', $externalProductCatalog->id], ['confirm' => __('Are you sure you want to delete # {0}?', $externalProductCatalog->id), 'class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('List External Product Catalogs'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('New External Product Catalog'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="externalProductCatalogs view content">
<h3><?= h($externalProductCatalog->base_url) ?></h3>
<table>
<tr>
<th><?= __('Product Catalog') ?></th>
<td><?= $externalProductCatalog->hasValue('product_catalog') ? $this->Html->link($externalProductCatalog->product_catalog->name, ['controller' => 'ProductCatalogs', 'action' => 'view', $externalProductCatalog->product_catalog->id]) : '' ?></td>
</tr>
<tr>
<th><?= __('Base Url') ?></th>
<td><?= h($externalProductCatalog->base_url) ?></td>
</tr>
<tr>
<th><?= __('Api Url') ?></th>
<td><?= h($externalProductCatalog->api_url) ?></td>
</tr>
<tr>
<th><?= __('Id') ?></th>
<td><?= $this->Number->format($externalProductCatalog->id) ?></td>
</tr>
<tr>
<th><?= __('Created') ?></th>
<td><?= h($externalProductCatalog->created) ?></td>
</tr>
<tr>
<th><?= __('Deleted') ?></th>
<td><?= h($externalProductCatalog->deleted) ?></td>
</tr>
<tr>
<th><?= __('Enabled') ?></th>
<td><?= $externalProductCatalog->enabled ? __('Yes') : __('No'); ?></td>
</tr>
</table>
</div>
</div>
</div>