Add project

This commit is contained in:
2025-12-01 21:02:58 +01:00
commit 745b10b50f
117 changed files with 11236 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
/**
* @var \App\View\AppView $this
* @var string $message
* @var string $url
*/
use Cake\Core\Configure;
// ...existing code...
?>
<h2><?= h($message) ?></h2>
<p class="error">
<strong>Błąd: </strong>
Żądany adres <?= "<strong>'{$url}'</strong>" ?> nie został odnaleziony na tym serwerze.
</p>

View File

@@ -0,0 +1,16 @@
<?php
/**
* @var \App\View\AppView $this
* @var string $message
* @var string $url
*/
use Cake\Core\Configure;
use Cake\Error\Debugger;
// ...existing code...
?>
<h2>Wystąpił błąd wewnętrzny.</h2>
<p class="error">
<strong>Błąd: </strong>
<?= h($message) ?>
</p>

236
templates/Pages/home.php Normal file
View File

@@ -0,0 +1,236 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \App\View\AppView $this
*/
use Cake\Cache\Cache;
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Datasource\ConnectionManager;
use Cake\Error\Debugger;
use Cake\Http\Exception\NotFoundException;
$this->disableAutoLayout();
$checkConnection = function (string $name) {
$error = null;
$connected = false;
try {
ConnectionManager::get($name)->getDriver()->connect();
// No exception means success
$connected = true;
} catch (Exception $connectionError) {
$error = $connectionError->getMessage();
// Only call getAttributes if the method exists and is callable
if ($name === 'debug_kit') {
$error = 'Try adding your current <b>top level domain</b> to the
<a href="https://book.cakephp.org/debugkit/5/en/index.html#configuration" target="_blank">DebugKit.safeTld</a>
config and reload.';
if (!in_array('sqlite', \PDO::getAvailableDrivers())) {
$error .= '<br />You need to install the PHP extension <code>pdo_sqlite</code> so DebugKit can work properly.';
}
}
}
return compact('connected', 'error');
};
if (!Configure::read('debug')) :
throw new NotFoundException(
'Please replace templates/Pages/home.php with your own version or re-enable debug mode.'
);
endif;
?>
<!DOCTYPE html>
<html>
<head>
<?= $this->Html->charset() ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
CakePHP: the rapid development PHP framework:
<?= $this->fetch('title') ?>
</title>
<?= $this->Html->meta('icon') ?>
<?= $this->Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake', 'home']) ?>
<?= $this->fetch('meta') ?>
<?= $this->fetch('css') ?>
<?= $this->fetch('script') ?>
</head>
<body>
<header>
<div class="container text-center">
<a href="https://cakephp.org/" target="_blank" rel="noopener">
<img alt="CakePHP" src="https://cakephp.org/v2/img/logos/CakePHP_Logo.svg" width="350" />
</a>
<h1>
Welcome to CakePHP <?= h(Configure::version()) ?> Chiffon (🍰)
</h1>
</div>
</header>
<main class="main">
<div class="container">
<div class="content">
<div class="row">
<div class="column">
<div class="message default text-center">
<small>Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version.</small>
</div>
<div id="url-rewriting-warning" style="padding: 1rem; background: #fcebea; color: #cc1f1a; border-color: #ef5753;">
<ul>
<li class="bullet problem">
URL rewriting is not properly configured on your server.<br />
1) <a target="_blank" rel="noopener" href="https://book.cakephp.org/5/en/installation.html#url-rewriting">Help me configure it</a><br />
2) <a target="_blank" rel="noopener" href="https://book.cakephp.org/5/en/development/configuration.html#general-configuration">I don't / can't use URL rewriting</a>
</li>
</ul>
</div>
<?php Debugger::checkSecurityKeys(); ?>
</div>
</div>
<div class="row">
<div class="column">
<h4>Environment</h4>
<ul>
<?php if (version_compare(PHP_VERSION, '8.1.0', '>=')) : ?>
<li class="bullet success">Your version of PHP is 8.1.0 or higher (detected <?= PHP_VERSION ?>).</li>
<?php else : ?>
<li class="bullet problem">Your version of PHP is too low. You need PHP 8.1.0 or higher to use CakePHP (detected <?= PHP_VERSION ?>).</li>
<?php endif; ?>
<?php if (extension_loaded('mbstring')) : ?>
<li class="bullet success">Your version of PHP has the mbstring extension loaded.</li>
<?php else : ?>
<li class="bullet problem">Your version of PHP does NOT have the mbstring extension loaded.</li>
<?php endif; ?>
<?php if (extension_loaded('openssl')) : ?>
<li class="bullet success">Your version of PHP has the openssl extension loaded.</li>
<?php else : ?>
<li class="bullet problem">Your version of PHP does NOT have the openssl extension loaded.</li>
<?php endif; ?>
<?php if (extension_loaded('intl')) : ?>
<li class="bullet success">Your version of PHP has the intl extension loaded.</li>
<?php else : ?>
<li class="bullet problem">Your version of PHP does NOT have the intl extension loaded.</li>
<?php endif; ?>
<?php if (ini_get('zend.assertions') !== '1') : ?>
<li class="bullet problem">You should set <code>zend.assertions</code> to <code>1</code> in your <code>php.ini</code> for your development environment.</li>
<?php endif; ?>
</ul>
</div>
<div class="column">
<h4>Filesystem</h4>
<ul>
<?php if (is_writable(TMP)) : ?>
<li class="bullet success">Your tmp directory is writable.</li>
<?php else : ?>
<li class="bullet problem">Your tmp directory is NOT writable.</li>
<?php endif; ?>
<?php if (is_writable(LOGS)) : ?>
<li class="bullet success">Your logs directory is writable.</li>
<?php else : ?>
<li class="bullet problem">Your logs directory is NOT writable.</li>
<?php endif; ?>
<?php $settings = Cache::getConfig('_cake_translations_'); ?>
<?php if (!empty($settings)) : ?>
<li class="bullet success">The <em><?= h($settings['className']) ?></em> is being used for core caching. To change the config edit config/app.php</li>
<?php else : ?>
<li class="bullet problem">Your cache is NOT working. Please check the settings in config/app.php</li>
<?php endif; ?>
</ul>
</div>
</div>
<hr>
<div class="row">
<div class="column">
<h4>Database</h4>
<?php
$result = $checkConnection('default');
?>
<ul>
<?php if ($result['connected']) : ?>
<li class="bullet success">CakePHP is able to connect to the database.</li>
<?php else : ?>
<li class="bullet problem">CakePHP is NOT able to connect to the database.<br /><?= h($result['error']) ?></li>
<?php endif; ?>
</ul>
</div>
<div class="column">
<h4>DebugKit</h4>
<ul>
<?php if (Plugin::isLoaded('DebugKit')) : ?>
<li class="bullet success">DebugKit is loaded.</li>
<?php
$result = $checkConnection('debug_kit');
?>
<?php if ($result['connected']) : ?>
<li class="bullet success">DebugKit can connect to the database.</li>
<?php else : ?>
<li class="bullet problem">There are configuration problems present which need to be fixed:<br /><?= $result['error'] ?></li>
<?php endif; ?>
<?php else : ?>
<li class="bullet problem">DebugKit is <strong>not</strong> loaded.</li>
<?php endif; ?>
</ul>
</div>
</div>
<hr>
<div class="row">
<div class="column links">
<h3>Getting Started</h3>
<a target="_blank" rel="noopener" href="https://book.cakephp.org/5/en/">CakePHP Documentation</a>
<a target="_blank" rel="noopener" href="https://book.cakephp.org/5/en/tutorials-and-examples/cms/installation.html">The 20 min CMS Tutorial</a>
</div>
</div>
<hr>
<div class="row">
<div class="column links">
<h3>Help and Bug Reports</h3>
<a target="_blank" rel="noopener" href="https://slack-invite.cakephp.org/">Slack</a>
<a target="_blank" rel="noopener" href="https://github.com/cakephp/cakephp/issues">CakePHP Issues</a>
<a target="_blank" rel="noopener" href="https://discourse.cakephp.org/">CakePHP Forum</a>
</div>
</div>
<hr>
<div class="row">
<div class="column links">
<h3>Docs and Downloads</h3>
<a target="_blank" rel="noopener" href="https://api.cakephp.org/">CakePHP API</a>
<a target="_blank" rel="noopener" href="https://bakery.cakephp.org">The Bakery</a>
<a target="_blank" rel="noopener" href="https://book.cakephp.org/5/en/">CakePHP Documentation</a>
<a target="_blank" rel="noopener" href="https://plugins.cakephp.org">CakePHP plugins repo</a>
<a target="_blank" rel="noopener" href="https://github.com/cakephp/">CakePHP Code</a>
<a target="_blank" rel="noopener" href="https://github.com/FriendsOfCake/awesome-cakephp">CakePHP Awesome List</a>
<a target="_blank" rel="noopener" href="https://www.cakephp.org">CakePHP</a>
</div>
</div>
<hr>
<div class="row">
<div class="column links">
<h3>Training and Certification</h3>
<a target="_blank" rel="noopener" href="https://cakefoundation.org/">Cake Software Foundation</a>
<a target="_blank" rel="noopener" href="https://training.cakephp.org/">CakePHP Training</a>
</div>
</div>
</div>
</div>
</main>
</body>
</html>

40
templates/Tools/add.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Tool $tool
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Operacje') ?></h4>
<?= $this->Html->link(__('Powrót'),
['action' => 'index'],
['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="tools form content">
<?= $this->Form->create($tool) ?>
<fieldset>
<legend><?= __('Dodawanie narzędzia') ?></legend>
<?php
echo $this->Form->control('name',
['label'=>'Nazwa',
'placeholder'=>'Wpisz nazwę']);
echo $this->Form->control('description',
['label'=>'Opis',
'placeholder'=>'Dowolny opis']);
echo $this->Form->control('quantity',
['label'=>'Ilość',
'default'=>1]);
echo $this->Form->control('active',
['label'=>'Aktywny',
'default'=>true]);
?>
</fieldset>
<?= $this->Form->button(__('Zapisz')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

40
templates/Tools/edit.php Normal file
View File

@@ -0,0 +1,40 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Tool $tool
*/
?>
<<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Operacje') ?></h4>
<?= $this->Html->link(__('Powrót'),
['action' => 'index'],
['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="tools form content">
<?= $this->Form->create($tool) ?>
<fieldset>
<legend><?= __('Dodawanie narzędzia') ?></legend>
<?php
echo $this->Form->control('name',
['label' => 'Nazwa',
'placeholder' => 'Wpisz nazwę']);
echo $this->Form->control('description',
['label'=>'Opis',
'placeholder'=>'Dowolny opis']);
echo $this->Form->control('quantity',
['label'=>'Ilość',
'default'=>1]);
echo $this->Form->control('active',
['label'=>'Aktywny',
'default'=>true]);
?>
</fieldset>
<?= $this->Form->button(__('Zapisz')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

62
templates/Tools/index.php Normal file
View File

@@ -0,0 +1,62 @@
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\App\Model\Entity\Tool> $tools
*/
?>
<div class="tools index content">
<?= $this->Html->link(__('Dodaj nowe'),
['action' => 'add'],
['class' => 'button float-right'])
?>
<h3><?= __('Lista narzedzi') ?></h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id') ?></th>
<th><?= $this->Paginator->sort('name','Nazwa') ?></th>
<th><?= $this->Paginator->sort('quantity','Ilość') ?></th>
<th><?= $this->Paginator->sort('active','Aktywne') ?></th>
<th><?= $this->Paginator->sort('created','Utworzono') ?></th>
<th><?= $this->Paginator->sort('modified','Zmodyfikowano') ?></th>
<th class="actions"><?= __('Operacje') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tools as $tool): ?>
<tr>
<td><?= $this->Number->format($tool->id) ?></td>
<td><?= h($tool->name) ?></td>
<td><?= $this->Number->format($tool->quantity) ?></td>
<td><?= h($tool->active) ?></td>
<td><?= $tool->created ? $tool->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
<td><?= $tool->modified ? $tool->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
<td class="actions">
<?= $this->Html->link(__('Podgląd'),
['action' => 'view', $tool->id]) ?>
<?= $this->Html->link(__('Edytuj'),
['action' => 'edit', $tool->id]) ?>
<?= $this->Form->postLink( __('Usuń'),
['action' => 'delete', $tool->id],
['method' => 'delete',
'confirm' => __('Na pewno usunąć {0}?', $tool->name),])
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->first('<< ' . __('pierwszy')) ?>
<?= $this->Paginator->prev('< ' . __('poprzedni')) ?>
<?= $this->Paginator->numbers() ?>
<?= $this->Paginator->next(__('następny') . ' >') ?>
<?= $this->Paginator->last(__('ostatni') . ' >>') ?>
</ul>
<p><?= $this->Paginator->counter(__('Strona {{page}} z {{pages}},
widok {{current}} rekordów z {{count}}')) ?></p>
</div>
</div>

58
templates/Tools/view.php Normal file
View File

@@ -0,0 +1,58 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Tool $tool
*/
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Operacje') ?></h4>
<?= $this->Html->link(__('Edytuj narzędzie'),
['action' => 'edit', $tool->id],
['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink(__('Usuń'),
['action' => 'delete', $tool->id],
['confirm' => __('Na pewno usunąć {0}?', $tool->name), 'class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('Powrót'),
['action' => 'index'],
['class' => 'side-nav-item']) ?>
<?= $this->Html->link(__('Dodaj'),
['action' => 'add'],
['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="tools view content">
<h3><?= h($tool->name) ?></h3>
<table>
<tr>
<th><?= __('Nazwa') ?></th>
<td><?= h($tool->name) ?></td>
</tr>
<tr>
<th><?= __('Ilość') ?></th>
<td><?= $this->Number->format($tool->quantity) ?></td>
</tr>
<tr>
<th><?= __('Utworzono') ?></th>
<td><?= $tool->created ? $tool->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
<tr>
<th><?= __('Zmodyfikowano') ?></th>
<td><?= $tool->modified ? $tool->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
<tr>
<th><?= __('Aktywne') ?></th>
<td><?= $tool->active ? __('Tak') : __('Nie'); ?></td>
</tr>
</table>
<div class="text">
<strong><?= __('Opis') ?></strong>
<blockquote>
<?= $this->Text->autoParagraph(h($tool->description)); ?>
</blockquote>
</div>
</div>
</div>
</div>

29
templates/Users/add.php Normal file
View File

@@ -0,0 +1,29 @@
<?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">Operacje</h4>
<?= $this->Html->link('Lista użytkowników', ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="users form content">
<?= $this->Form->create($user) ?>
<fieldset>
<legend>Dodaj użytkownika</legend>
<?php
echo $this->Form->control('name', ['label' => 'Nazwa']);
echo $this->Form->control('email', ['label' => 'Email']);
echo $this->Form->control('password', ['label' => 'Hasło']);
?>
</fieldset>
<?= $this->Form->button('Zapisz') ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

34
templates/Users/edit.php Normal file
View File

@@ -0,0 +1,34 @@
<?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">Operacje</h4>
<?= $this->Form->postLink(
'Usuń',
['action' => 'delete', $user->id],
['confirm' => 'Czy na pewno chcesz usunąć użytkownika nr {0}?', 'class' => 'side-nav-item']
) ?>
<?= $this->Html->link('Lista użytkowników', ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="users form content">
<?= $this->Form->create($user) ?>
<fieldset>
<legend>Edytuj użytkownika</legend>
<?php
echo $this->Form->control('name', ['label' => 'Nazwa']);
echo $this->Form->control('email', ['label' => 'Email']);
echo $this->Form->control('password', ['label' => 'Hasło']);
?>
</fieldset>
<?= $this->Form->button('Zapisz') ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>

57
templates/Users/index.php Normal file
View File

@@ -0,0 +1,57 @@
<?php
/**
* @var \App\View\AppView $this
* @var iterable<\App\Model\Entity\User> $users
*/
?>
<div class="users index content">
<?= $this->Html->link('Dodaj użytkownika', ['action' => 'add'], ['class' => 'button float-right']) ?>
<h3>Użytkownicy</h3>
<div class="table-responsive">
<table>
<thead>
<tr>
<th><?= $this->Paginator->sort('id', 'Id') ?></th>
<th><?= $this->Paginator->sort('name', 'Nazwa') ?></th>
<th><?= $this->Paginator->sort('email', 'Email') ?></th>
<th><?= $this->Paginator->sort('created', 'Utworzono') ?></th>
<th><?= $this->Paginator->sort('modified', 'Zmodyfikowano') ?></th>
<th class="actions">Operacje</th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $user): ?>
<tr>
<td><?= $this->Number->format($user->id) ?></td>
<td><?= h($user->name) ?></td>
<td><?= h($user->email) ?></td>
<td><?= $user->created ? $user->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
<td><?= $user->modified ? $user->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
<td class="actions">
<?= $this->Html->link('Podgląd', ['action' => 'view', $user->id]) ?>
<?= $this->Html->link('Edytuj', ['action' => 'edit', $user->id]) ?>
<?= $this->Form->postLink(
'Usuń',
['action' => 'delete', $user->id],
[
'method' => 'delete',
'confirm' => 'Czy na pewno chcesz usunąć użytkownika nr {0}?',
]
) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->first('<< pierwszy') ?>
<?= $this->Paginator->prev('< poprzedni') ?>
<?= $this->Paginator->numbers() ?>
<?= $this->Paginator->next('następny >') ?>
<?= $this->Paginator->last('ostatni >>') ?>
</ul>
<p><?= $this->Paginator->counter('Strona {{page}} z {{pages}}, wyświetlono {{current}} rekordów z {{count}} wszystkich') ?></p>
</div>
</div>

15
templates/Users/login.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
/**
* @var \App\View\AppView $this
*/
?>
<div class="users form content">
<?= $this->Form->create() ?>
<fieldset>
<legend>Strona logowania</legend>
<?= $this->Form->control('email',['label'=>'Email']) ?>
<?= $this->Form->control('password',['label'=>'Hasło']) ?>
</fieldset>
<?= $this->Form->button('Zaloguj'); ?>
<?= $this->Form->end() ?>
</div>

44
templates/Users/view.php Normal file
View 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">Operacje</h4>
<?= $this->Html->link('Edytuj użytkownika', ['action' => 'edit', $user->id], ['class' => 'side-nav-item']) ?>
<?= $this->Form->postLink('Usuń użytkownika', ['action' => 'delete', $user->id], ['confirm' => 'Czy na pewno chcesz usunąć użytkownika nr {0}?', 'class' => 'side-nav-item']) ?>
<?= $this->Html->link('Lista użytkowników', ['action' => 'index'], ['class' => 'side-nav-item']) ?>
<?= $this->Html->link('Dodaj użytkownika', ['action' => 'add'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column column-80">
<div class="users view content">
<h3><?= h($user->name) ?></h3>
<table>
<tr>
<th>Nazwa</th>
<td><?= h($user->name) ?></td>
</tr>
<tr>
<th>Email</th>
<td><?= h($user->email) ?></td>
</tr>
<tr>
<th>Id</th>
<td><?= $this->Number->format($user->id) ?></td>
</tr>
<tr>
<th>Utworzono</th>
<td><?= $user->created ? $user->created->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
<tr>
<th>Zmodyfikowano</th>
<td><?= $user->modified ? $user->modified->i18nFormat('dd.MM.yyyy HH:mm') : '' ?></td>
</tr>
</table>
</div>
</div>
</div>

1
templates/cell/.gitkeep Normal file
View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,15 @@
<?php
/**
* @var \App\View\AppView $this
* @var array $params
* @var string $message
*/
$class = 'message';
if (!empty($params['class'])) {
$class .= ' ' . $params['class'];
}
if (!isset($params['escape']) || $params['escape'] !== false) {
$message = h($message);
}
?>
<div class="<?= h($class) ?>" onclick="this.classList.add('hidden');"><?= $message ?></div>

View 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 error" onclick="this.classList.add('hidden');"><?= $message ?></div>

View 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>

View 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 success" onclick="this.classList.add('hidden')"><?= $message ?></div>

View 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>

View File

@@ -0,0 +1,22 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \Cake\View\View $this
* @var string $content
*/
$lines = explode("\n", $content);
foreach ($lines as $line) :
echo '<p> ' . $line . "</p>\n";
endforeach;

View File

@@ -0,0 +1,18 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \Cake\View\View $this
* @var string $content
*/
echo $content;

17
templates/layout/ajax.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \App\View\AppView $this
*/
echo $this->fetch('content');

View File

@@ -0,0 +1,41 @@
<?php
$cakeDescription = 'NarzędziaWMT';
?>
<!DOCTYPE html>
<html>
<head>
<?= $this->Html->charset() ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<?= $cakeDescription ?>:
<?= $this->fetch('title') ?>
</title>
<?= $this->Html->meta('icon') ?>
<?= $this->Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake']) ?><?= $this->fetch('meta') ?>
<?= $this->fetch('css') ?>
<?= $this->fetch('script') ?>
</head>
<body>
<nav class="top-nav">
<div class="top-nav-title">
<a href="<?= $this->Url->build('/') ?>"><span>Narzędzia</span>WMT</a>
</div>
<div class="top-nav-links">
<a href="<?= $this->Url->build('/users') ?>">Użytkownicy</a>
<?php if ($this->request->getAttribute('identity')): ?>
<a href="<?= $this->Url->build('/users/logout') ?>">Wyloguj</a>
<?php else: ?>
<a href="<?= $this->Url->build('/users/login') ?>">Zaloguj</a>
<?php endif; ?>
</div>
</nav>
<main class="main">
<div class="container">
<?= $this->Flash->render() ?>
<?= $this->fetch('content') ?>
</div>
</main>
<footer>
</footer>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \App\View\AppView $this
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title><?= $this->fetch('title') ?></title>
</head>
<body>
<?= $this->fetch('content') ?>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \App\View\AppView $this
*/
echo $this->fetch('content');

View File

@@ -0,0 +1,39 @@
<?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 0.10.0
* @license https://opensource.org/licenses/mit-license.php MIT License
* @var \App\View\AppView $this
*/
?>
<!DOCTYPE html>
<html>
<head>
<?= $this->Html->charset() ?>
<title>
<?= $this->fetch('title') ?>
</title>
<?= $this->Html->meta('icon') ?>
<?= $this->Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake']) ?>
<?= $this->fetch('meta') ?>
<?= $this->fetch('css') ?>
<?= $this->fetch('script') ?>
</head>
<body>
<div class="error-container">
<?= $this->Flash->render() ?>
<?= $this->fetch('content') ?>
<?= $this->Html->link(__('Powrót'), 'javascript:history.back()') ?>
</div>
</body>
</html>