Changeset 1457
- Timestamp:
- 06/16/06 15:21:10 (2 years ago)
- Files:
-
- trunk/lib/generator/sfGenerator.class.php (modified) (2 diffs)
- trunk/lib/generator/sfPropelAdminGenerator.class.php (modified) (2 diffs)
- trunk/lib/generator/sfPropelCrudGenerator.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/generator/sfGenerator.class.php
r1415 r1457 56 56 { 57 57 // eval template file 58 $template_template = $template_dir.'/templates/'.$template .'.php';58 $template_template = $template_dir.'/templates/'.$template; 59 59 if (!is_readable($template_template)) 60 60 { 61 $template_template = $default_template_dir.'/templates/'.$template .'.php';61 $template_template = $default_template_dir.'/templates/'.$template; 62 62 if (!is_readable($template_template)) 63 63 { … … 69 69 70 70 // save actions class 71 $this->getGeneratorManager()->getCache()->set($template .'.php', $generatedModuleName.DIRECTORY_SEPARATOR.'templates', $retval);71 $this->getGeneratorManager()->getCache()->set($template, $generatedModuleName.DIRECTORY_SEPARATOR.'templates', $retval); 72 72 } 73 73 } trunk/lib/generator/sfPropelAdminGenerator.class.php
r1415 r1457 72 72 // theme exists? 73 73 $theme = isset($this->params['theme']) ? $this->params['theme'] : 'default'; 74 if (!is_dir(sfConfig::get('sf_symfony_data_dir').'/generator/sfPropelAdmin/'.$theme.'/template')) 74 $themeDir = sfConfig::get('sf_symfony_data_dir').'/generator/sfPropelAdmin/'.$theme.'/template'; 75 if (!is_dir($themeDir)) 75 76 { 76 77 $error = 'The theme "%s" does not exist.'; … … 80 81 81 82 $this->setTheme($theme); 82 $templateFiles = array( 83 'listSuccess', 'editSuccess', '_filters', 84 '_list_th_'.$this->getParameterValue('list.layout', 'tabular'), '_list_td_'.$this->getParameterValue('list.layout', 'tabular'), 85 '_list_th_tabular', 86 '_list_header', '_edit_header', '_list_footer', '_edit_footer', 87 '_list_td_actions', '_list_actions', '_edit_actions', 88 ); 83 84 $templateFiles = sfFinder::type('file')->name('*.php')->relative()->in($themeDir.'/templates'); 89 85 $this->generatePhpFiles($this->generatedModuleName, $templateFiles); 90 86 trunk/lib/generator/sfPropelCrudGenerator.class.php
r1415 r1457 83 83 84 84 $this->setTheme($theme); 85 $this->generatePhpFiles($this->generatedModuleName, array('listSuccess ', 'editSuccess', 'showSuccess'));85 $this->generatePhpFiles($this->generatedModuleName, array('listSuccess.php', 'editSuccess.php', 'showSuccess.php')); 86 86 87 87 // require generated action class