diff --git a/src/View/Helper/BakeHelper.php b/src/View/Helper/BakeHelper.php index 2cdf6220..431405b3 100644 --- a/src/View/Helper/BakeHelper.php +++ b/src/View/Helper/BakeHelper.php @@ -9,9 +9,9 @@ use Cake\Core\Configure; use Cake\Core\ConventionsTrait; use Cake\Database\Schema\TableSchema; +use Cake\Database\Type\EnumType; use Cake\Database\TypeFactory; use Cake\Datasource\SchemaInterface; -use Cake\Database\Type\EnumType; use Cake\ORM\Table; use Cake\Utility\Inflector; use Cake\View\Helper; diff --git a/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php b/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php index e69de29b..8f3ee6d1 100644 --- a/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php +++ b/tests/comparisons/Template/testBakeIndexWithEnumNoLabel.php @@ -0,0 +1,48 @@ + $articles + */ +?> +
+ Html->link(__('New Article'), ['action' => 'add'], ['class' => 'button float-right']) ?> +

+
+ + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id') ?>Paginator->sort('author_id') ?>Paginator->sort('title') ?>Paginator->sort('published') ?>
Number->format($article->id) ?>hasValue('author') ? $this->Html->link($article->author->name, ['controller' => 'Authors', 'action' => 'view', $article->author->id]) : '' ?>title) ?>published === null ? '' : h($article->published->value) ?> + Html->link(__('View'), ['action' => 'view', $article->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $article->id]) ?> + Form->postLink(__('Delete'), ['action' => 'delete', $article->id], ['confirm' => __('Are you sure you want to delete # {0}?', $article->id)]) ?> +
+
+
+ +

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

+
+
\ No newline at end of file diff --git a/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php b/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php index e69de29b..b5b49745 100644 --- a/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php +++ b/tests/comparisons/Template/testBakeIndexWithEnumWithLabel.php @@ -0,0 +1,50 @@ + $bakeUsers + */ +?> +
+ Html->link(__('New Bake User'), ['action' => 'add'], ['class' => 'button float-right']) ?> +

+
+ + + + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id') ?>Paginator->sort('username') ?>Paginator->sort('status') ?>Paginator->sort('created') ?>Paginator->sort('updated') ?>
Number->format($bakeUser->id) ?>username) ?>status === null ? '' : h($bakeUser->status->label()) ?>created) ?>updated) ?> + Html->link(__('View'), ['action' => 'view', $bakeUser->id]) ?> + Html->link(__('Edit'), ['action' => 'edit', $bakeUser->id]) ?> + Form->postLink(__('Delete'), ['action' => 'delete', $bakeUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $bakeUser->id)]) ?> +
+
+
+ +

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

+
+
\ No newline at end of file diff --git a/tests/comparisons/Template/testBakeViewEnum.php b/tests/comparisons/Template/testBakeViewEnum.php index 49391e45..4cae270b 100644 --- a/tests/comparisons/Template/testBakeViewEnum.php +++ b/tests/comparisons/Template/testBakeViewEnum.php @@ -28,7 +28,7 @@ - status === null ? '' : $this->Number->format($bakeUser->status) ?> + status === null ? '' : h($bakeUser->status->label()) ?> diff --git a/tests/comparisons/Template/testBakeViewEnumNoLabel.php b/tests/comparisons/Template/testBakeViewEnumNoLabel.php index e69de29b..e5e0fd4b 100644 --- a/tests/comparisons/Template/testBakeViewEnumNoLabel.php +++ b/tests/comparisons/Template/testBakeViewEnumNoLabel.php @@ -0,0 +1,75 @@ + +
+ +
+
+

title) ?>

+ + + + + + + + + + + + + + + + + +
hasValue('author') ? $this->Html->link($article->author->name, ['controller' => 'Authors', 'action' => 'view', $article->author->id]) : '' ?>
title) ?>
Number->format($article->id) ?>
published === null ? '' : h($article->published->value) ?>
+
+ +
+ Text->autoParagraph(h($article->body)); ?> +
+
+ +
+
+
\ No newline at end of file