update.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * The following variables are available in this template:
  4. * - $this: the CrudCode object
  5. */
  6. ?>
  7. <?php echo "<?php\n"; ?>
  8. /* @var $this <?php echo $this->getControllerClass(); ?> */
  9. /* @var $model <?php echo $this->getModelClass(); ?> */
  10. <?php
  11. $nameColumn=$this->guessNameColumn($this->tableSchema->columns);
  12. $label=$this->pluralize($this->class2name($this->modelClass));
  13. echo "\$this->breadcrumbs=array(
  14. '$label'=>array('index'),
  15. \$model->{$nameColumn}=>array('view','id'=>\$model->{$this->tableSchema->primaryKey}),
  16. 'Update',
  17. );\n";
  18. ?>
  19. $this->menu=array(
  20. array('label'=>'List <?php echo $this->modelClass; ?>', 'url'=>array('index')),
  21. array('label'=>'Create <?php echo $this->modelClass; ?>', 'url'=>array('create')),
  22. array('label'=>'View <?php echo $this->modelClass; ?>', 'url'=>array('view', 'id'=>$model-><?php echo $this->tableSchema->primaryKey; ?>)),
  23. array('label'=>'Manage <?php echo $this->modelClass; ?>', 'url'=>array('admin')),
  24. );
  25. ?>
  26. <h1>Update <?php echo $this->modelClass." <?php echo \$model->{$this->tableSchema->primaryKey}; ?>"; ?></h1>
  27. <?php echo "<?php \$this->renderPartial('_form', array('model'=>\$model)); ?>"; ?>