first standalone plugin commit

This commit is contained in:
2025-11-18 00:43:34 -08:00
commit 5dc7aa87cd
86 changed files with 86844 additions and 0 deletions

32
templates/Regions/add.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $region
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('List Regions'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="regions form content">
<?= $this->Form->create($region) ?>
<fieldset>
<legend><?= __('Add Region') ?></legend>
<?php
echo $this->Form->control('name');
echo $this->Form->control('translations');
echo $this->Form->control('created_at');
echo $this->Form->control('updated_at');
echo $this->Form->control('flag');
echo $this->Form->control('wikiDataId');
?>
</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 $region
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Form->postLink(
__('Delete'),
['action' => 'delete', $region->id],
['confirm' => __('Are you sure you want to delete # {0}?', $region->id), 'class' => 'side-nav-item']
) ?>
<?= $this->Html->link(__('List Regions'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="regions form content">
<?= $this->Form->create($region) ?>
<fieldset>
<legend><?= __('Edit Region') ?></legend>
<?php
echo $this->Form->control('name');
echo $this->Form->control('translations');
echo $this->Form->control('created_at');
echo $this->Form->control('updated_at');
echo $this->Form->control('flag');
echo $this->Form->control('wikiDataId');
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,49 @@
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\Cake\Datasource\EntityInterface> $regions
*/
?>
<div class="regions index content">
<h3><?= __('Regions') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id') ?></th>
<th><?= $this->Paginator->sort('name') ?></th>
<th><?= $this->Paginator->sort('created_at') ?></th>
<th><?= $this->Paginator->sort('updated_at') ?></th>
<th><?= $this->Paginator->sort('flag') ?></th>
<th><?= $this->Paginator->sort('wikiDataId') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($regions as $region): ?>
<tr>
<td><?= $this->Number->format($region->id) ?></td>
<td><?= h($region->name) ?></td>
<td><?= h($region->created_at) ?></td>
<td><?= h($region->updated_at) ?></td>
<td><?= h($region->flag) ?></td>
<td><?= h($region->wikiDataId) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $region->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>

155
templates/Regions/view.php Normal file
View File

@@ -0,0 +1,155 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Datasource\EntityInterface $region
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Html->link(__('List Regions'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="regions view content">
<h3><?= h($region->name) ?></h3>
<table>
<tr>
<th><?= __('Name') ?></th>
<td><?= h($region->name) ?></td>
</tr>
<tr>
<th><?= __('WikiDataId') ?></th>
<td><?= h($region->wikiDataId) ?></td>
</tr>
<tr>
<th><?= __('Id') ?></th>
<td><?= $this->Number->format($region->id) ?></td>
</tr>
<tr>
<th><?= __('Created At') ?></th>
<td><?= h($region->created_at) ?></td>
</tr>
<tr>
<th><?= __('Updated At') ?></th>
<td><?= h($region->updated_at) ?></td>
</tr>
<tr>
<th><?= __('Flag') ?></th>
<td><?= $region->flag ? __('Yes') : __('No'); ?></td>
</tr>
</table>
<div class="text">
<strong><?= __('Translations') ?></strong>
<blockquote>
<?= $this->Text->autoParagraph(h($region->translations)); ?>
</blockquote>
</div>
<div class="related">
<h4><?= __('Related Countries') ?></h4>
<?php if (!empty($region->countries)) : ?>
<div class="table-responsive">
<table>
<tr>
<th><?= __('Id') ?></th>
<th><?= __('Name') ?></th>
<th><?= __('Iso3') ?></th>
<th><?= __('Numeric Code') ?></th>
<th><?= __('Iso2') ?></th>
<th><?= __('Phonecode') ?></th>
<th><?= __('Capital') ?></th>
<th><?= __('Currency') ?></th>
<th><?= __('Currency Name') ?></th>
<th><?= __('Currency Symbol') ?></th>
<th><?= __('Tld') ?></th>
<th><?= __('Native') ?></th>
<th><?= __('Region') ?></th>
<th><?= __('Region Id') ?></th>
<th><?= __('Subregion') ?></th>
<th><?= __('Subregion Id') ?></th>
<th><?= __('Nationality') ?></th>
<th><?= __('Timezones') ?></th>
<th><?= __('Latitude') ?></th>
<th><?= __('Longitude') ?></th>
<th><?= __('Emoji') ?></th>
<th><?= __('EmojiU') ?></th>
<th><?= __('Created At') ?></th>
<th><?= __('Updated At') ?></th>
<th><?= __('Flag') ?></th>
<th><?= __('WikiDataId') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($region->countries as $countries) : ?>
<tr>
<td><?= h($countries->id) ?></td>
<td><?= h($countries->name) ?></td>
<td><?= h($countries->iso3) ?></td>
<td><?= h($countries->numeric_code) ?></td>
<td><?= h($countries->iso2) ?></td>
<td><?= h($countries->phonecode) ?></td>
<td><?= h($countries->capital) ?></td>
<td><?= h($countries->currency) ?></td>
<td><?= h($countries->currency_name) ?></td>
<td><?= h($countries->currency_symbol) ?></td>
<td><?= h($countries->tld) ?></td>
<td><?= h($countries->native) ?></td>
<td><?= h($countries->region) ?></td>
<td><?= h($countries->region_id) ?></td>
<td><?= h($countries->subregion) ?></td>
<td><?= h($countries->subregion_id) ?></td>
<td><?= h($countries->nationality) ?></td>
<td><?= h($countries->timezones) ?></td>
<td><?= h($countries->latitude) ?></td>
<td><?= h($countries->longitude) ?></td>
<td><?= h($countries->emoji) ?></td>
<td><?= h($countries->emojiU) ?></td>
<td><?= h($countries->created_at) ?></td>
<td><?= h($countries->updated_at) ?></td>
<td><?= h($countries->flag) ?></td>
<td><?= h($countries->wikiDataId) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => 'Countries', 'action' => 'view', $countries->id]) ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
</div>
<div class="related">
<h4><?= __('Related Subregions') ?></h4>
<?php if (!empty($region->subregions)) : ?>
<div class="table-responsive">
<table>
<tr>
<th><?= __('Id') ?></th>
<th><?= __('Name') ?></th>
<th><?= __('Region Id') ?></th>
<th><?= __('Created At') ?></th>
<th><?= __('Updated At') ?></th>
<th><?= __('Flag') ?></th>
<th><?= __('WikiDataId') ?></th>
<th class="actions"><?= __('Actions') ?></th>
</tr>
<?php foreach ($region->subregions as $subregions) : ?>
<tr>
<td><?= h($subregions->id) ?></td>
<td><?= h($subregions->name) ?></td>
<td><?= h($subregions->region_id) ?></td>
<td><?= h($subregions->created_at) ?></td>
<td><?= h($subregions->updated_at) ?></td>
<td><?= h($subregions->flag) ?></td>
<td><?= h($subregions->wikiDataId) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['controller' => 'Subregions', 'action' => 'view', $subregions->id]) ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>