Subversion-Projekte lars-tiefland.cakephp

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/* SVN FILE: $Id: edit.ctp 7945 2008-12-19 02:16:01Z gwoo $ */
3
/**
4
 *
5
 * PHP versions 4 and 5
6
 *
7
 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
8
 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
9
 *
10
 * Licensed under The MIT License
11
 * Redistributions of files must retain the above copyright notice.
12
 *
13
 * @filesource
14
 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
15
 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
16
 * @package       cake
17
 * @subpackage    cake.cake.libs.view.templates.scaffolds
18
 * @since         CakePHP(tm) v 0.10.0.1076
19
 * @version       $Revision: 7945 $
20
 * @modifiedby    $LastChangedBy: gwoo $
21
 * @lastmodified  $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
22
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
23
 */
24
?>
25
<div class="<?php echo $pluralVar;?> form">
26
<?php
27
	echo $form->create();
28
	echo $form->inputs(null, array('created', 'modified', 'updated'));
29
	echo $form->end(__('Submit', true));
30
?>
31
</div>
32
<div class="actions">
33
	<ul>
34
<?php if ($this->action != 'add'):?>
35
		<li><?php echo $html->link(__('Delete', true), array('action'=>'delete', $form->value($modelClass.'.'.$primaryKey)), null, __('Are you sure you want to delete', true).' #' . $form->value($modelClass.'.'.$primaryKey)); ?></li>
36
<?php endif;?>
37
		<li><?php echo $html->link(__('List', true).' '.$pluralHumanName, array('action'=>'index'));?></li>
38
<?php
39
		$done = array();
40
		foreach ($associations as $_type => $_data) {
41
			foreach ($_data as $_alias => $_details) {
42
				if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
43
					echo "\t\t<li>".$html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller'=> $_details['controller'], 'action'=>'index'))."</li>\n";
44
					echo "\t\t<li>".$html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller'=> $_details['controller'], 'action'=>'add'))."</li>\n";
45
					$done[] = $_details['controller'];
46
				}
47
			}
48
		}
49
?>
50
	</ul>
51
</div>