mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-16 11:58:25 +00:00
1dce095546
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@856 3807eeeb-6ff5-0310-8944-8be069107fe0
26 lines
No EOL
843 B
Text
26 lines
No EOL
843 B
Text
<?php
|
|
uses('helpers/form');
|
|
|
|
$form = new FormHelper();
|
|
|
|
echo $html->formTag('/'.Inflector::underscore($this->name).'/update');
|
|
|
|
echo $form->generateFields( $html, $fieldNames );
|
|
|
|
echo $form->generateSubmitDiv( $html, 'Save' )
|
|
|
|
?>
|
|
<ul class='actions'>
|
|
<?php
|
|
$modelName = Inflector::singularize($this->name);
|
|
$modelKey = Inflector::underscore($modelName);
|
|
echo "<li>".$html->linkTo('Delete '.Inflector::humanize($modelName), '/'.$this->viewPath.'/destroy/'.$data[$modelKey]['id'])."</li>";
|
|
|
|
foreach( $fieldNames as $field => $value ) {
|
|
if( isset( $value['foreignKey'] ) )
|
|
{
|
|
echo "<li>".$html->linkTo( "View ".Inflector::humanize($value['controller']), "/".Inflector::underscore($value['controller'])."/show/".$data[Inflector::singularize($params['controller'])][$field] )."</li>";
|
|
}
|
|
}
|
|
?>
|
|
</ul> |