mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-16 03:48:24 +00:00
4b9df4fda4
Author: phpnut Date: 4:44:45 AM, Wednesday, October 26, 2005 Message: AJAX is now available as a by default in the $html variable in the templates. You access it like this: $html->Ajax->xxx(); Updated default templates. [1208] Author: phpnut Date: 6:49:26 PM, Tuesday, October 25, 2005 Message: Adding fix in Controller::generateFieldNames(); [1203] Author: phpnut Date: 10:40:28 AM, Tuesday, October 25, 2005 Message: Changes made to core templates and css. Fixed added for Ticket #60 [1202] Author: phpnut Date: 2:30:58 AM, Tuesday, October 25, 2005 Message: Fix for cake error templates Fixed a key for tables that are underscored in scaffolded code. git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1211 3807eeeb-6ff5-0310-8944-8be069107fe0
59 lines
No EOL
1.9 KiB
Text
59 lines
No EOL
1.9 KiB
Text
<?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
|
|
*/
|
|
|
|
$modelName = Inflector::singularize($this->name);
|
|
$modelKey = $modelName;
|
|
|
|
?>
|
|
<h1>Edit <?php echo Inflector::humanize($modelName);?></h1>
|
|
|
|
<?php
|
|
echo $html->formTag('/'. Inflector::underscore($this->name) .'/update');
|
|
|
|
|
|
echo $form->generateFields( $fieldNames );
|
|
|
|
echo $form->generateSubmitDiv( 'Save' )
|
|
|
|
?>
|
|
<ul class='actions'>
|
|
<?php
|
|
|
|
echo "<li>".$html->linkTo('Delete '.Inflector::humanize($modelName), '/'.$this->viewPath.'/destroy/'.$data[$modelKey]['id'])."</li>";
|
|
echo "<li>".$html->linkTo('List '.Inflector::humanize($modelName), '/'.$this->viewPath.'/list')."</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[$modelKey][$field] )."</li>";
|
|
}
|
|
}
|
|
?>
|
|
</ul> |