Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit f1272e8

Browse files
author
David Yell
committed
Removed borders from table cells for better readability. Added classes to columns for easier styling
1 parent 919fdc1 commit f1272e8

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/Template/Bake/Template/index.ctp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,17 @@ $fields = collection($fields)
1313
<?= $this->Html->link('New', ['action' => 'add'], ['class' => 'btn btn-primary']);?>
1414
</div>
1515

16+
<div class="filter">
17+
<?php
18+
echo $this->Form->create(null, ['class' => 'form-inline']);
19+
echo $this->Form->button('Filter',['type' => 'submit', 'class' => 'btn btn-success']);
20+
echo $this->Html->link('Reset', ['action' => 'index'], ['class' => 'btn btn-default']);
21+
echo $this->Form->end();
22+
?>
23+
</div>
24+
1625
<div class="<%= $pluralVar %> index">
17-
<table cellpadding="0" cellspacing="0" class="table table-bordered table-hover table-striped">
26+
<table cellpadding="0" cellspacing="0" class="table table-hover table-striped">
1827
<thead>
1928
<tr>
2029
<% foreach ($fields as $field): %>
@@ -44,15 +53,15 @@ $fields = collection($fields)
4453
if ($isKey !== true) {
4554
if (in_array($schema->columnType($field), ['integer', 'biginteger', 'decimal', 'float'])) {
4655
%>
47-
<td><?= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?></td>
56+
<td class="number"><?= $this->Number->format($<%= $singularVar %>-><%= $field %>) ?></td>
4857
<%
4958
} elseif (in_array($schema->columnType($field), ['date', 'datetime', 'timestamp', 'time'])) {
5059
%>
51-
<td><?= $this->Time->timeAgoInWords($<%= $singularVar %>-><%= $field %>) ?></td>
60+
<td class="time"><?= $this->Time->timeAgoInWords($<%= $singularVar %>-><%= $field %>) ?></td>
5261
<%
5362
} elseif (in_array($schema->columnType($field), ['boolean'])) {
5463
%>
55-
<td><?php
64+
<td class="boolean"><?php
5665
if ($<%= $singularVar %>-><%= $field %>) {
5766
echo "<span class='glyphicon glyphicon-ok'></span>";
5867
} else {

0 commit comments

Comments
 (0)