Skip to content
Permalink
Browse files

Using the number helper in baked index pages

  • Loading branch information...
lorenzo committed Sep 13, 2014
1 parent a93a0c2 commit 21c9c7a5e888ab30a01ddde0adb0e8d0447f0168
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Template/Bake/default/views/index.ctp
@@ -64,7 +64,11 @@ $fields = collection($fields)
}
}
if ($isKey !== true) {
echo "\t\t\t<td><?= h(\${$singularVar}->{$field}) ?>&nbsp;</td>\n";
if (!in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) {
echo "\t\t\t<td><?= h(\${$singularVar}->{$field}) ?></td>\n";
} else {
echo "\t\t\t<td><?= \$this->Number->format(\${$singularVar}->{$field}) ?></td>\n";
}
}
}

0 comments on commit 21c9c7a

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