pictcode / lib / Cake / View / Scaffolds / form.ctp @ 0b1b8047
履歴 | 表示 | アノテート | ダウンロード (2.166 KB)
| 1 | 635eef61 | spyder1211 | <?php |
|---|---|---|---|
| 2 | /** |
||
| 3 | * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) |
||
| 4 | * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
||
| 5 | * |
||
| 6 | * Licensed under The MIT License |
||
| 7 | * For full copyright and license information, please see the LICENSE.txt |
||
| 8 | * Redistributions of files must retain the above copyright notice. |
||
| 9 | * |
||
| 10 | * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
||
| 11 | * @link http://cakephp.org CakePHP(tm) Project |
||
| 12 | * @package Cake.View.Scaffolds |
||
| 13 | * @since CakePHP(tm) v 0.10.0.1076 |
||
| 14 | * @license http://www.opensource.org/licenses/mit-license.php MIT License |
||
| 15 | */ |
||
| 16 | ?> |
||
| 17 | <div class="<?php echo $pluralVar; ?> form"> |
||
| 18 | <?php |
||
| 19 | echo $this->Form->create(); |
||
| 20 | echo $this->Form->inputs($scaffoldFields, array('created', 'modified', 'updated'));
|
||
| 21 | echo $this->Form->end(__d('cake', 'Submit'));
|
||
| 22 | ?> |
||
| 23 | </div> |
||
| 24 | <div class="actions"> |
||
| 25 | <h3><?php echo __d('cake', 'Actions'); ?></h3>
|
||
| 26 | <ul> |
||
| 27 | <?php if ($this->request->action !== 'add'): ?> |
||
| 28 | <li><?php echo $this->Form->postLink( |
||
| 29 | __d('cake', 'Delete'),
|
||
| 30 | array('action' => 'delete', $this->Form->value($modelClass . '.' . $primaryKey)),
|
||
| 31 | array(), |
||
| 32 | __d('cake', 'Are you sure you want to delete # %s?', $this->Form->value($modelClass . '.' . $primaryKey)));
|
||
| 33 | ?></li> |
||
| 34 | <?php endif; ?> |
||
| 35 | <li><?php echo $this->Html->link(__d('cake', 'List') . ' ' . $pluralHumanName, array('action' => 'index')); ?></li>
|
||
| 36 | <?php |
||
| 37 | $done = array(); |
||
| 38 | foreach ($associations as $_type => $_data): |
||
| 39 | foreach ($_data as $_alias => $_details): |
||
| 40 | if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)): |
||
| 41 | echo "\t\t<li>" . $this->Html->link( |
||
| 42 | __d('cake', 'List %s', Inflector::humanize($_details['controller'])),
|
||
| 43 | array('plugin' => $_details['plugin'], 'controller' => $_details['controller'], 'action' => 'index')
|
||
| 44 | ) . "</li>\n"; |
||
| 45 | echo "\t\t<li>" . $this->Html->link( |
||
| 46 | __d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))),
|
||
| 47 | array('plugin' => $_details['plugin'], 'controller' => $_details['controller'], 'action' => 'add')
|
||
| 48 | ) . "</li>\n"; |
||
| 49 | $done[] = $_details['controller']; |
||
| 50 | endif; |
||
| 51 | endforeach; |
||
| 52 | endforeach; |
||
| 53 | ?> |
||
| 54 | </ul> |
||
| 55 | </div> |