[ Index ] |
|
Code source de CakePHP 1.1.13.4450 |
1 <?php 2 /* SVN FILE: $Id: edit.thtml 4409 2007-02-02 13:20:59Z phpnut $ */ 3 /** 4 * 5 * PHP versions 4 and 5 6 * 7 * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> 8 * Copyright 2005-2007, Cake Software Foundation, Inc. 9 * 1785 E. Sahara Avenue, Suite 490-204 10 * Las Vegas, Nevada 89104 11 * 12 * Licensed under The MIT License 13 * Redistributions of files must retain the above copyright notice. 14 * 15 * @filesource 16 * @copyright Copyright 2005-2007, Cake Software Foundation, Inc. 17 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 18 * @package cake 19 * @subpackage cake.cake.libs.view.templates.scaffolds 20 * @since CakePHP(tm) v 0.10.0.1076 21 * @version $Revision: 4409 $ 22 * @modifiedby $LastChangedBy: phpnut $ 23 * @lastmodified $Date: 2007-02-02 07:20:59 -0600 (Fri, 02 Feb 2007) $ 24 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 25 */ 26 $modelName = ucwords(Inflector::singularize($this->name)); 27 $modelKey = $modelName; 28 if(is_null($this->plugin)) { 29 $path = '/'; 30 } else { 31 $path = '/'.$this->plugin.'/'; 32 }?> 33 <h1><?php echo $type.' '.Inflector::humanize($modelName);?></h1> 34 <?php 35 if($type == 'Edit') { 36 echo $html->formTag($path . Inflector::underscore($this->name) .'/update'); 37 } else { 38 echo $html->formTag($path. Inflector::underscore($this->name).'/create'); 39 } 40 echo $form->generateFields( $fieldNames ); 41 echo $form->generateSubmitDiv( 'Save' ); ?> 42 </form> 43 <ul class='actions'> 44 <?php 45 if($type == 'Edit') { 46 echo "<li>".$html->link('Delete '.Inflector::humanize($modelName), $path.$this->viewPath.'/delete/'.$data[$modelKey][$this->controller->{$modelName}->primaryKey])."</li>"; 47 } 48 echo "<li>".$html->link('List '.Inflector::humanize($modelName), $path.$this->viewPath.'/index')."</li>"; 49 if($type == 'Edit') { 50 foreach($fieldNames as $field => $value) { 51 if(isset($value['foreignKey'])) { 52 echo "<li>".$html->link( "View ".Inflector::humanize($value['controller']), $path.Inflector::underscore($value['controller'])."/view/".$data[$modelKey][$field] )."</li>"; 53 } 54 } 55 }?> 56 </ul>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 19:27:47 2007 | par Balluche grâce à PHPXref 0.7 |