Changeset 2789
- Timestamp:
- 11/22/06 21:06:59 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrine/data/generator/sfDoctrineAdmin/default/template
- Property svn:externals set to
templates http://svn.symfony-project.com/trunk/data/generator/sfPropelAdmin/default/template/templates
- Property svn:externals set to
plugins/sfDoctrine/data/generator/sfDoctrineAdmin/default/template/actions/actions.class.php
r2767 r2789 74 74 { 75 75 return $this->redirect('<?php echo $this->getModuleName() ?>/edit?<?php echo $this->getPrimaryKeyUrlParams('this->') ?>); 76 <?php //' ?>77 76 } 78 77 } 79 78 else 80 79 { 81 // add javascripts 82 $this->getResponse()->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/prototype'); 83 $this->getResponse()->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/collapse'); 84 $this->getResponse()->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/double_list'); 80 $this->addJavascriptsForEdit(); 81 82 $this->labels = $this->getLabels(); 85 83 } 86 84 } … … 125 123 $this-><?php echo $this->getSingularName() ?> = $this->get<?php echo $this->getClassName() ?>OrCreate(); 126 124 $this->update<?php echo $this->getClassName() ?>FromRequest(); 125 126 $this->addJavascriptsForEdit(); 127 128 $this->labels = $this->getLabels(); 127 129 128 130 return sfView::SUCCESS; … … 397 399 } 398 400 } 401 402 protected function addJavascriptsForEdit() 403 { 404 $this->getResponse()->addJavascript(sfConfig::get('sf_prototype_web_dir').'/js/prototype'); 405 $this->getResponse()->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/collapse'); 406 $this->getResponse()->addJavascript(sfConfig::get('sf_admin_web_dir').'/js/double_list'); 407 } 408 409 protected function getLabels() 410 { 411 return array( 412 <?php foreach ($this->getColumnCategories('edit.display') as $category): ?> 413 <?php foreach ($this->getColumns('edit.display', $category) as $name => $column): ?> 414 '<?php echo $this->getSingularName() ?>{<?php echo $column->getName() ?>}' => '<?php $label_name = str_replace("'", "\\'", $this->getParameterValue('edit.fields.'.$column->getName().'.name')); echo $label_name ?><?php if ($label_name): ?>:<?php endif ?>', 415 <?php endforeach; ?> 416 <?php endforeach; ?> 417 ); 418 } 399 419 }