* Copyright 2005-2007, Cake Software Foundation, Inc. * 1785 E. Sahara Avenue, Suite 490-204 * Las Vegas, Nevada 89104 * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @filesource * @copyright Copyright 2005-2007, Cake Software Foundation, Inc. * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project * @package cake * @subpackage cake.cake.libs.view.templates.scaffolds * @since CakePHP(tm) v 0.10.0.1076 * @version $Revision$ * @modifiedby $LastChangedBy$ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ ?>

$value) { if($i++ % 2 == 0) { $class = 'class="altrow"'; } else { $class = null; } echo "
".$value['label']."
"; if(isset($value['foreignKey'])) { $otherControllerName = $value['controller']; $otherControllerPath = Inflector::underscore($value['controller']); $otherModelObj =& ClassRegistry::getObject($value['modelKey']); $othereDisplayField = $otherModelObj->getDisplayField(); $displayText = $data[$alias[$value['model']]][$othereDisplayField]; if(!empty($data[$modelClass][$field]) && (!empty($displayText))) { echo "
".$html->link($displayText, $path . $otherControllerPath.'/view/' .$data[$modelClass][$field] )."
"; } else { echo "
 
"; } } else { if( !empty($data[$modelClass][$field])) { echo "
".$data[$modelClass][$field]."
"; } else { echo "
 
"; } } }?>
hasOne as $associationNameName => $relation) { $otherModelKey = Inflector::underscore($relation['className']); $otherModelObj =& ClassRegistry::getObject($otherModelKey); $otherControllerPath = Inflector::pluralize($otherModelKey); $new = true; if($j++ % 2 == 0) { $class = 'class="altrow"'; } else { $class = null; } echo "
"; echo "

".sprintf(__("Related %s", true), Inflector::humanize($associationNameName))."

"; if(!empty($data[$associationNameName])) { echo "
"; foreach($data[$associationNameName] as $field => $value) { if(isset($value)) { echo "
".Inflector::humanize($field)."
"; if(!empty($value)) { echo "
".$value."
"; } else { echo "
 
"; } $new = null; } } echo "
"; } echo "
"; echo ""; echo "
"; echo "
"; } ?> hasMany, $modelObj->hasAndBelongsToMany); foreach($relations as $associationName => $relation) { $otherModelKey = Inflector::underscore($relation['className']); $otherModelObj = &ClassRegistry::getObject($otherModelKey); $otherControllerPath = Inflector::pluralize($otherModelKey); $otherModelName = $relation['className']; echo "
"; echo "

".sprintf(__("Related %s", true), Inflector::humanize($otherControllerPath))."

"; if(isset($data[$associationName][0]) && is_array($data[$associationName])) {?> $value) { if(false !== strpos($column, "_id")) { $column = substr($column, 0, strpos($column, "_id" )); } echo ""; }?> "; foreach($row as $column => $value) { echo ""; } ?> "; } ?>
".Inflector::humanize($column)."Actions
".$value." link(__('View', true), array('controller'=> $otherControllerPath, 'action'=>'view', $row[$otherModelObj->primaryKey]))?> link(__('Edit', true), array('controller'=> $otherControllerPath, 'action'=>'edit', $row[$otherModelObj->primaryKey]))?> link(__('Delete', true), array('controller'=> $otherControllerPath, 'action'=>'delete', $row[$otherModelObj->primaryKey]), null, sprintf(__("Are you sure you want to delete id %s?", true), $row[$otherModelObj->primaryKey]))?>