Skip to content

Commit 400b0df

Browse files
committed
Remove field created, updated and modified of index view
1 parent 517baa6 commit 400b0df

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Template/Bake/Template/index.ctp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ $fields = collection($fields)
3737
<div class="box-body table-responsive no-padding">
3838
<table class="table table-hover">
3939
<tr>
40-
<% foreach ($fields as $field): %>
40+
<% foreach ($fields as $field):
41+
if (!in_array($field, ['created', 'modified', 'updated'])) :%>
4142
<th><?= $this->Paginator->sort('<%= $field %>') ?></th>
43+
<% endif; %>
4244
<% endforeach; %>
4345
<th><?= __('Actions') ?></th>
4446
</tr>
4547
<?php foreach ($<%= $pluralVar %> as $<%= $singularVar %>): ?>
4648
<tr>
4749
<% foreach ($fields as $field) {
50+
if (!in_array($field, ['created', 'modified', 'updated'])) {
4851
$isKey = false;
4952
if (!empty($associations['BelongsTo'])) {
5053
foreach ($associations['BelongsTo'] as $alias => $details) {
@@ -69,6 +72,7 @@ $fields = collection($fields)
6972
<%
7073
}
7174
}
75+
}
7276
}
7377
$pk = '$' . $singularVar . '->' . $primaryKey[0];
7478
%>

0 commit comments

Comments
 (0)