2005-10-09 01:56:21 +00:00
|
|
|
<?php
|
|
|
|
/* SVN FILE: $Id$ */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Base controller class.
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
|
|
|
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
|
|
|
* Copyright (c) 2005, CakePHP Authors/Developers
|
|
|
|
*
|
|
|
|
* Author(s): Michal Tatarynowicz aka Pies <tatarynowicz@gmail.com>
|
|
|
|
* Larry E. Masters aka PhpNut <nut@phpnut.com>
|
|
|
|
* Kamil Dzielinski aka Brego <brego.dk@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
|
|
|
* @filesource
|
|
|
|
* @author CakePHP Authors/Developers
|
|
|
|
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
|
|
|
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.controller.templates.scaffolds
|
|
|
|
* @since CakePHP v 0.10.0.1076
|
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
|
|
|
*/
|
|
|
|
?>
|
2005-07-21 04:02:32 +00:00
|
|
|
<?php
|
|
|
|
|
2005-09-17 02:22:07 +00:00
|
|
|
echo $html->formTag('/'.Inflector::underscore($this->name).'/update');
|
2005-07-21 04:02:32 +00:00
|
|
|
|
2005-10-03 04:48:00 +00:00
|
|
|
echo $form->generateFields( $fieldNames );
|
2005-08-21 20:01:32 +00:00
|
|
|
|
2005-10-03 04:48:00 +00:00
|
|
|
echo $form->generateSubmitDiv( 'Save' )
|
2005-08-21 06:49:02 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
<ul class='actions'>
|
2005-07-21 04:02:32 +00:00
|
|
|
<?php
|
2005-08-21 06:49:02 +00:00
|
|
|
$modelName = Inflector::singularize($this->name);
|
2005-09-17 02:22:07 +00:00
|
|
|
$modelKey = Inflector::underscore($modelName);
|
|
|
|
echo "<li>".$html->linkTo('Delete '.Inflector::humanize($modelName), '/'.$this->viewPath.'/destroy/'.$data[$modelKey]['id'])."</li>";
|
2005-07-21 04:02:32 +00:00
|
|
|
|
2005-09-17 02:22:07 +00:00
|
|
|
foreach( $fieldNames as $field => $value ) {
|
2005-08-21 06:49:02 +00:00
|
|
|
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>";
|
|
|
|
}
|
|
|
|
}
|
2005-07-21 04:02:32 +00:00
|
|
|
?>
|
2005-08-21 06:49:02 +00:00
|
|
|
</ul>
|