first functional demo
This commit is contained in:
33
CakePHP/templates/Addresses/add.php
Normal file
33
CakePHP/templates/Addresses/add.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Address $address
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('List Addresses'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="addresses form content">
|
||||
<?= $this->Form->create($address) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Add Address') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('owner');
|
||||
echo $this->Form->control('first');
|
||||
echo $this->Form->control('last');
|
||||
echo $this->Form->control('street');
|
||||
echo $this->Form->control('zip');
|
||||
echo $this->Form->control('city');
|
||||
echo $this->Form->control('phone');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
38
CakePHP/templates/Addresses/edit.php
Normal file
38
CakePHP/templates/Addresses/edit.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Address $address
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Form->postLink(
|
||||
__('Delete'),
|
||||
['action' => 'delete', $address->id],
|
||||
['confirm' => __('Are you sure you want to delete # {0}?', $address->id), 'class' => 'side-nav-item']
|
||||
) ?>
|
||||
<?= $this->Html->link(__('List Addresses'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="addresses form content">
|
||||
<?= $this->Form->create($address) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Edit Address') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('owner');
|
||||
echo $this->Form->control('first');
|
||||
echo $this->Form->control('last');
|
||||
echo $this->Form->control('street');
|
||||
echo $this->Form->control('zip');
|
||||
echo $this->Form->control('city');
|
||||
echo $this->Form->control('phone');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
56
CakePHP/templates/Addresses/index.php
Normal file
56
CakePHP/templates/Addresses/index.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var iterable<\App\Model\Entity\Address> $addresses
|
||||
*/
|
||||
?>
|
||||
<div class="addresses index content">
|
||||
<?= $this->Html->link(__('New Address'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
||||
<h3><?= __('Addresses') ?></h3>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->Paginator->sort('id') ?></th>
|
||||
<th><?= $this->Paginator->sort('owner') ?></th>
|
||||
<th><?= $this->Paginator->sort('first') ?></th>
|
||||
<th><?= $this->Paginator->sort('last') ?></th>
|
||||
<th><?= $this->Paginator->sort('street') ?></th>
|
||||
<th><?= $this->Paginator->sort('zip') ?></th>
|
||||
<th><?= $this->Paginator->sort('city') ?></th>
|
||||
<th><?= $this->Paginator->sort('phone') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($addresses as $address): ?>
|
||||
<tr>
|
||||
<td><?= $this->Number->format($address->id) ?></td>
|
||||
<td><?= $this->Number->format($address->owner) ?></td>
|
||||
<td><?= h($address->first) ?></td>
|
||||
<td><?= h($address->last) ?></td>
|
||||
<td><?= h($address->street) ?></td>
|
||||
<td><?= h($address->zip) ?></td>
|
||||
<td><?= h($address->city) ?></td>
|
||||
<td><?= h($address->phone) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['action' => 'view', $address->id]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $address->id]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $address->id], ['confirm' => __('Are you sure you want to delete # {0}?', $address->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>
|
56
CakePHP/templates/Addresses/view.php
Normal file
56
CakePHP/templates/Addresses/view.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\Address $address
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('Edit Address'), ['action' => 'edit', $address->id], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Form->postLink(__('Delete Address'), ['action' => 'delete', $address->id], ['confirm' => __('Are you sure you want to delete # {0}?', $address->id), 'class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('List Addresses'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('New Address'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="addresses view content">
|
||||
<h3><?= h($address->id) ?></h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= __('First') ?></th>
|
||||
<td><?= h($address->first) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Last') ?></th>
|
||||
<td><?= h($address->last) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Street') ?></th>
|
||||
<td><?= h($address->street) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Zip') ?></th>
|
||||
<td><?= h($address->zip) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('City') ?></th>
|
||||
<td><?= h($address->city) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Phone') ?></th>
|
||||
<td><?= h($address->phone) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Id') ?></th>
|
||||
<td><?= $this->Number->format($address->id) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Owner') ?></th>
|
||||
<td><?= $this->Number->format($address->owner) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
0
CakePHP/templates/App/index.php
Normal file
0
CakePHP/templates/App/index.php
Normal file
0
CakePHP/templates/Pages/main.php
Normal file
0
CakePHP/templates/Pages/main.php
Normal file
31
CakePHP/templates/Users/add.php
Normal file
31
CakePHP/templates/Users/add.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\User $user
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('List Users'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="users form content">
|
||||
<?= $this->Form->create($user) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Add User') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('password');
|
||||
echo $this->Form->control('nick');
|
||||
echo $this->Form->control('first');
|
||||
echo $this->Form->control('last');
|
||||
echo $this->Form->control('is_admin');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
36
CakePHP/templates/Users/edit.php
Normal file
36
CakePHP/templates/Users/edit.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\User $user
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Form->postLink(
|
||||
__('Delete'),
|
||||
['action' => 'delete', $user->id],
|
||||
['confirm' => __('Are you sure you want to delete # {0}?', $user->id), 'class' => 'side-nav-item']
|
||||
) ?>
|
||||
<?= $this->Html->link(__('List Users'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="users form content">
|
||||
<?= $this->Form->create($user) ?>
|
||||
<fieldset>
|
||||
<legend><?= __('Edit User') ?></legend>
|
||||
<?php
|
||||
echo $this->Form->control('password');
|
||||
echo $this->Form->control('nick');
|
||||
echo $this->Form->control('first');
|
||||
echo $this->Form->control('last');
|
||||
echo $this->Form->control('is_admin');
|
||||
?>
|
||||
</fieldset>
|
||||
<?= $this->Form->button(__('Submit')) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
50
CakePHP/templates/Users/index.php
Normal file
50
CakePHP/templates/Users/index.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var iterable<\App\Model\Entity\User> $users
|
||||
*/
|
||||
?>
|
||||
<div class="users index content">
|
||||
<?= $this->Html->link(__('New User'), ['action' => 'add'], ['class' => 'button float-right']) ?>
|
||||
<h3><?= __('Users') ?></h3>
|
||||
<div class="table-responsive">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= $this->Paginator->sort('id') ?></th>
|
||||
<th><?= $this->Paginator->sort('nick') ?></th>
|
||||
<th><?= $this->Paginator->sort('first') ?></th>
|
||||
<th><?= $this->Paginator->sort('last') ?></th>
|
||||
<th><?= $this->Paginator->sort('is_admin') ?></th>
|
||||
<th class="actions"><?= __('Actions') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user): ?>
|
||||
<tr>
|
||||
<td><?= $this->Number->format($user->id) ?></td>
|
||||
<td><?= h($user->nick) ?></td>
|
||||
<td><?= h($user->first) ?></td>
|
||||
<td><?= h($user->last) ?></td>
|
||||
<td><?= h($user->is_admin) ?></td>
|
||||
<td class="actions">
|
||||
<?= $this->Html->link(__('View'), ['action' => 'view', $user->id]) ?>
|
||||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $user->id]) ?>
|
||||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->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>
|
1
CakePHP/templates/Users/login.php
Normal file
1
CakePHP/templates/Users/login.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
44
CakePHP/templates/Users/view.php
Normal file
44
CakePHP/templates/Users/view.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var \App\Model\Entity\User $user
|
||||
*/
|
||||
?>
|
||||
<div class="row">
|
||||
<aside class="column">
|
||||
<div class="side-nav">
|
||||
<h4 class="heading"><?= __('Actions') ?></h4>
|
||||
<?= $this->Html->link(__('Edit User'), ['action' => 'edit', $user->id], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Form->postLink(__('Delete User'), ['action' => 'delete', $user->id], ['confirm' => __('Are you sure you want to delete # {0}?', $user->id), 'class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('List Users'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
|
||||
<?= $this->Html->link(__('New User'), ['action' => 'add'], ['class' => 'side-nav-item']) ?>
|
||||
</div>
|
||||
</aside>
|
||||
<div class="column-responsive column-80">
|
||||
<div class="users view content">
|
||||
<h3><?= h($user->id) ?></h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?= __('Nick') ?></th>
|
||||
<td><?= h($user->nick) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('First') ?></th>
|
||||
<td><?= h($user->first) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Last') ?></th>
|
||||
<td><?= h($user->last) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Id') ?></th>
|
||||
<td><?= $this->Number->format($user->id) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= __('Is Admin') ?></th>
|
||||
<td><?= $user->is_admin ? __('Yes') : __('No'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
11
CakePHP/templates/element/flash/info.php
Normal file
11
CakePHP/templates/element/flash/info.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
11
CakePHP/templates/element/flash/warning.php
Normal file
11
CakePHP/templates/element/flash/warning.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \App\View\AppView $this
|
||||
* @var array $params
|
||||
* @var string $message
|
||||
*/
|
||||
if (!isset($params['escape']) || $params['escape'] !== false) {
|
||||
$message = h($message);
|
||||
}
|
||||
?>
|
||||
<div class="message warning" onclick="this.classList.add('hidden');"><?= $message ?></div>
|
Reference in New Issue
Block a user