@@ -33,7 +33,7 @@ foreach ($fields as $field) {
33
33
if ($ field === $ details ['foreignKey ' ]) {
34
34
$ isKey = true ;
35
35
echo "\t\t<dt<?php if ( \$i % 2 == 0) echo \$class;?>><?php __(' " .Inflector::humanize (Inflector::underscore ($ alias ))."'); ?></dt> \n" ;
36
- echo "\t\t<dd<?php if ( \$i++ % 2 == 0) echo \$class;?>> \n\t\t\t<?php echo \$html->link( \${$ singularVar }[' {$ alias }'][' {$ details ['displayField ' ]}'], array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'view', \${$ singularVar }[' {$ alias }'][' {$ details ['primaryKey ' ]}'])); ?> \n\t\t\t \n\t\t</dd> \n" ;
36
+ echo "\t\t<dd<?php if ( \$i++ % 2 == 0) echo \$class;?>> \n\t\t\t<?php echo \$html->link( \${$ singularVar }[' {$ alias }'][' {$ details ['displayField ' ]}'], array('controller' => ' {$ details ['controller ' ]}', 'action' => 'view', \${$ singularVar }[' {$ alias }'][' {$ details ['primaryKey ' ]}'])); ?> \n\t\t\t \n\t\t</dd> \n" ;
37
37
break ;
38
38
}
39
39
}
@@ -49,17 +49,17 @@ foreach ($fields as $field) {
49
49
<div class="actions">
50
50
<ul>
51
51
<?php
52
- echo "\t\t<li><?php echo \$html->link(__('Edit {$ singularHumanName }', true), array('action'=> 'edit', \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }'])); ?> </li> \n" ;
53
- echo "\t\t<li><?php echo \$html->link(__('Delete {$ singularHumanName }', true), array('action'=> 'delete', \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }'])); ?> </li> \n" ;
54
- echo "\t\t<li><?php echo \$html->link(__('List {$ pluralHumanName }', true), array('action'=> 'index')); ?> </li> \n" ;
55
- echo "\t\t<li><?php echo \$html->link(__('New {$ singularHumanName }', true), array('action'=> 'add')); ?> </li> \n" ;
52
+ echo "\t\t<li><?php echo \$html->link(__('Edit {$ singularHumanName }', true), array('action' => 'edit', \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }'])); ?> </li> \n" ;
53
+ echo "\t\t<li><?php echo \$html->link(__('Delete {$ singularHumanName }', true), array('action' => 'delete', \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$ singularVar }[' {$ modelClass }'][' {$ primaryKey }'])); ?> </li> \n" ;
54
+ echo "\t\t<li><?php echo \$html->link(__('List {$ pluralHumanName }', true), array('action' => 'index')); ?> </li> \n" ;
55
+ echo "\t\t<li><?php echo \$html->link(__('New {$ singularHumanName }', true), array('action' => 'add')); ?> </li> \n" ;
56
56
57
57
$ done = array ();
58
58
foreach ($ associations as $ type => $ data ) {
59
59
foreach ($ data as $ alias => $ details ) {
60
60
if ($ details ['controller ' ] != $ this ->name && !in_array ($ details ['controller ' ], $ done )) {
61
- echo "\t\t<li><?php echo \$html->link(__('List " .Inflector::humanize ($ details ['controller ' ])."', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'index')); ?> </li> \n" ;
62
- echo "\t\t<li><?php echo \$html->link(__('New " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'add')); ?> </li> \n" ;
61
+ echo "\t\t<li><?php echo \$html->link(__('List " .Inflector::humanize ($ details ['controller ' ])."', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'index')); ?> </li> \n" ;
62
+ echo "\t\t<li><?php echo \$html->link(__('New " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'add')); ?> </li> \n" ;
63
63
$ done [] = $ details ['controller ' ];
64
64
}
65
65
}
@@ -84,7 +84,7 @@ if (!empty($associations['hasOne'])) :
84
84
<?php echo "<?php endif; ?> \n" ;?>
85
85
<div class="actions">
86
86
<ul>
87
- <li><?php echo "<?php echo \$html->link(__('Edit " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'edit', \${$ singularVar }[' {$ alias }'][' {$ details ['primaryKey ' ]}'])); ?></li> \n" ;?>
87
+ <li><?php echo "<?php echo \$html->link(__('Edit " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'edit', \${$ singularVar }[' {$ alias }'][' {$ details ['primaryKey ' ]}'])); ?></li> \n" ;?>
88
88
</ul>
89
89
</div>
90
90
</div>
@@ -131,9 +131,9 @@ echo "\t<?php
131
131
}
132
132
133
133
echo "\t\t\t<td class= \"actions \"> \n" ;
134
- echo "\t\t\t\t<?php echo \$html->link(__('View', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'view', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
135
- echo "\t\t\t\t<?php echo \$html->link(__('Edit', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'edit', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
136
- echo "\t\t\t\t<?php echo \$html->link(__('Delete', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'delete', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
134
+ echo "\t\t\t\t<?php echo \$html->link(__('View', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'view', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
135
+ echo "\t\t\t\t<?php echo \$html->link(__('Edit', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'edit', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
136
+ echo "\t\t\t\t<?php echo \$html->link(__('Delete', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'delete', \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$ otherSingularVar }[' {$ details ['primaryKey ' ]}'])); ?> \n" ;
137
137
echo "\t\t\t</td> \n" ;
138
138
echo "\t\t</tr> \n" ;
139
139
@@ -143,7 +143,7 @@ echo "\t<?php endforeach; ?>\n";
143
143
<?php echo "<?php endif; ?> \n\n" ;?>
144
144
<div class="actions">
145
145
<ul>
146
- <li><?php echo "<?php echo \$html->link(__('New " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller'=> ' {$ details ['controller ' ]}', 'action'=> 'add'));?> " ;?> </li>
146
+ <li><?php echo "<?php echo \$html->link(__('New " .Inflector::humanize (Inflector::underscore ($ alias ))."', true), array('controller' => ' {$ details ['controller ' ]}', 'action' => 'add'));?> " ;?> </li>
147
147
</ul>
148
148
</div>
149
149
</div>
0 commit comments