Skip to content
Permalink
Browse files

Fixnished view bake template

  • Loading branch information...
lorenzo committed Sep 14, 2014
1 parent 44bd7c4 commit bb8189e88125d1afe99f37b3852fe4f83ed6b0f6
Showing with 8 additions and 9 deletions.
  1. +8 −9 src/Template/Bake/default/views/view.ctp
@@ -116,9 +116,11 @@ $groupedFields += ['number' => [], 'string' => [], 'boolean' => [], 'date' => []
</div>
<?php if ($groupedFields['text']) : ?>
<?php foreach ($groupedFields['text'] as $field) : ?>
<div class="row">
<h6 class="subheader"><?= "<?= __('" . Inflector::humanize($field) . "') ?>" ?></h6>
<?= "<?= \$this->Text->autoParagraph(h(\${$singularVar}->{$field})); ?>" ?>
<div class="row texts">
<div class="columns large-9">
<h6 class="subheader"><?= "<?= __('" . Inflector::humanize($field) . "') ?>" ?></h6>
<?= "<?= \$this->Text->autoParagraph(h(\${$singularVar}->{$field})); ?>" ?>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
@@ -129,8 +131,9 @@ foreach ($relations as $alias => $details):
$otherSingularVar = Inflector::variable($alias);
$otherPluralHumanName = Inflector::humanize($details['controller']);
?>
<div class="related">
<h3 class="subheader"><?= "<?= __('Related " . $otherPluralHumanName . "') ?>"; ?></h3>
<div class="related row">
<div class="column large-12">
<h4 class="subheader"><?= "<?= __('Related " . $otherPluralHumanName . "') ?>"; ?></h4>
<?= "<?php if (!empty(\${$singularVar}->{$details['property']})): ?>\n"; ?>
<table cellpadding="0" cellspacing="0">
<tr>
@@ -161,10 +164,6 @@ echo "\t\t<?php endforeach; ?>\n";
?>
</table>
<?= "\t<?php endif; ?>\n"; ?>
<div class="actions">
<ul>
<li><?= "<?= \$this->Html->link(__('New " . Inflector::humanize(Inflector::singularize(Inflector::underscore($alias))) . "'), ['controller' => '{$details['controller']}', 'action' => 'add']) ?>"; ?> </li>
</ul>
</div>
</div>
<?php endforeach; ?>

0 comments on commit bb8189e

Please sign in to comment.
You can’t perform that action at this time.