cakephp2-php8/libs/controllers/templates/scaffolds/edit.thtml
phpnut e2af5c8608 merging changes from [614]
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@616 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-08-21 20:01:32 +00:00

25 lines
No EOL
769 B
Text

<?php
uses('helpers/form');
$form = new FormHelper();
echo $html->formTag('/'.$this->name.'/update');
echo $form->generateFields( $html, $fieldNames );
echo $form->generateSubmitDiv( $html, 'Save' )
?>
<ul class='actions'>
<?php
$modelName = Inflector::singularize($this->name);
echo "<li>".$html->linkTo('Delete '.Inflector::humanize($modelName), '/'.$this->viewPath.'/destroy/'.$data[$modelName]['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>