-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
175 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* @var \Bake\Test\App\View\AppView $this | ||
* @var iterable<\Cake\Datasource\EntityInterface> $articles | ||
*/ | ||
?> | ||
<div class="articles index content"> | ||
<?= $this->Html->link(__('New Article'), ['action' => 'add'], ['class' => 'button float-right']) ?> | ||
<h3><?= __('Articles') ?></h3> | ||
<div class="table-responsive"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th><?= $this->Paginator->sort('id') ?></th> | ||
<th><?= $this->Paginator->sort('author_id') ?></th> | ||
<th><?= $this->Paginator->sort('title') ?></th> | ||
<th><?= $this->Paginator->sort('published') ?></th> | ||
<th class="actions"><?= __('Actions') ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php foreach ($articles as $article): ?> | ||
<tr> | ||
<td><?= $this->Number->format($article->id) ?></td> | ||
<td><?= $article->hasValue('author') ? $this->Html->link($article->author->name, ['controller' => 'Authors', 'action' => 'view', $article->author->id]) : '' ?></td> | ||
<td><?= h($article->title) ?></td> | ||
<td><?= $article->published === null ? '' : h($article->published->value) ?></td> | ||
<td class="actions"> | ||
<?= $this->Html->link(__('View'), ['action' => 'view', $article->id]) ?> | ||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $article->id]) ?> | ||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $article->id], ['confirm' => __('Are you sure you want to delete # {0}?', $article->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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* @var \Bake\Test\App\View\AppView $this | ||
* @var iterable<\Cake\Datasource\EntityInterface> $bakeUsers | ||
*/ | ||
?> | ||
<div class="bakeUsers index content"> | ||
<?= $this->Html->link(__('New Bake User'), ['action' => 'add'], ['class' => 'button float-right']) ?> | ||
<h3><?= __('Bake Users') ?></h3> | ||
<div class="table-responsive"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th><?= $this->Paginator->sort('id') ?></th> | ||
<th><?= $this->Paginator->sort('username') ?></th> | ||
<th><?= $this->Paginator->sort('status') ?></th> | ||
<th><?= $this->Paginator->sort('created') ?></th> | ||
<th><?= $this->Paginator->sort('updated') ?></th> | ||
<th class="actions"><?= __('Actions') ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php foreach ($bakeUsers as $bakeUser): ?> | ||
<tr> | ||
<td><?= $this->Number->format($bakeUser->id) ?></td> | ||
<td><?= h($bakeUser->username) ?></td> | ||
<td><?= $bakeUser->status === null ? '' : h($bakeUser->status->label()) ?></td> | ||
<td><?= h($bakeUser->created) ?></td> | ||
<td><?= h($bakeUser->updated) ?></td> | ||
<td class="actions"> | ||
<?= $this->Html->link(__('View'), ['action' => 'view', $bakeUser->id]) ?> | ||
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $bakeUser->id]) ?> | ||
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $bakeUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $bakeUser->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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/** | ||
* @var \Bake\Test\App\View\AppView $this | ||
* @var \Cake\Datasource\EntityInterface $article | ||
*/ | ||
?> | ||
<div class="row"> | ||
<aside class="column"> | ||
<div class="side-nav"> | ||
<h4 class="heading"><?= __('Actions') ?></h4> | ||
<?= $this->Html->link(__('Edit Article'), ['action' => 'edit', $article->id], ['class' => 'side-nav-item']) ?> | ||
<?= $this->Form->postLink(__('Delete Article'), ['action' => 'delete', $article->id], ['confirm' => __('Are you sure you want to delete # {0}?', $article->id), 'class' => 'side-nav-item']) ?> | ||
<?= $this->Html->link(__('List Articles'), ['action' => 'index'], ['class' => 'side-nav-item']) ?> | ||
<?= $this->Html->link(__('New Article'), ['action' => 'add'], ['class' => 'side-nav-item']) ?> | ||
</div> | ||
</aside> | ||
<div class="column column-80"> | ||
<div class="articles view content"> | ||
<h3><?= h($article->title) ?></h3> | ||
<table> | ||
<tr> | ||
<th><?= __('Author') ?></th> | ||
<td><?= $article->hasValue('author') ? $this->Html->link($article->author->name, ['controller' => 'Authors', 'action' => 'view', $article->author->id]) : '' ?></td> | ||
</tr> | ||
<tr> | ||
<th><?= __('Title') ?></th> | ||
<td><?= h($article->title) ?></td> | ||
</tr> | ||
<tr> | ||
<th><?= __('Id') ?></th> | ||
<td><?= $this->Number->format($article->id) ?></td> | ||
</tr> | ||
<tr> | ||
<th><?= __('Published') ?></th> | ||
<td><?= $article->published === null ? '' : h($article->published->value) ?></td> | ||
</tr> | ||
</table> | ||
<div class="text"> | ||
<strong><?= __('Body') ?></strong> | ||
<blockquote> | ||
<?= $this->Text->autoParagraph(h($article->body)); ?> | ||
</blockquote> | ||
</div> | ||
<div class="related"> | ||
<h4><?= __('Related Tags') ?></h4> | ||
<?php if (!empty($article->tags)) : ?> | ||
<div class="table-responsive"> | ||
<table> | ||
<tr> | ||
<th><?= __('Id') ?></th> | ||
<th><?= __('Name') ?></th> | ||
<th><?= __('Description') ?></th> | ||
<th><?= __('Created') ?></th> | ||
<th class="actions"><?= __('Actions') ?></th> | ||
</tr> | ||
<?php foreach ($article->tags as $tag) : ?> | ||
<tr> | ||
<td><?= h($tag->id) ?></td> | ||
<td><?= h($tag->name) ?></td> | ||
<td><?= h($tag->description) ?></td> | ||
<td><?= h($tag->created) ?></td> | ||
<td class="actions"> | ||
<?= $this->Html->link(__('View'), ['controller' => 'tags', 'action' => 'view', $tag->id]) ?> | ||
<?= $this->Html->link(__('Edit'), ['controller' => 'tags', 'action' => 'edit', $tag->id]) ?> | ||
<?= $this->Form->postLink(__('Delete'), ['controller' => 'tags', 'action' => 'delete', $tag->id], ['confirm' => __('Are you sure you want to delete # {0}?', $tag->id)]) ?> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
</div> | ||
<?php endif; ?> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |