Changeset 29143
- Timestamp:
- 04/14/10 16:09:24 (3 years ago)
- Files:
-
- plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php (modified) (1 diff)
- plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php (modified) (1 diff)
- plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php (modified) (1 diff)
- plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php (modified) (1 diff)
- plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php
r28787 r29143 8 8 public function getObject(sfWebRequest $request) { 9 9 $params = $request->getParameterHolder()->getAll(); 10 if($request->getParameter('culture')) { 11 //$this-><?php echo $this->getSingularName() ?>->setLanguage($request->getParameter('culture')); 12 BaseModelCNM::setMasterLanguage($request->getParameter('culture')); 13 } 10 14 if(isset($params['id']) || isset($params['slug'])) { 11 15 $this-><?php echo $this->getSingularName() ?> = $this->getRoute()->getObject(); 12 16 } else { 13 17 $this-><?php echo $this->getSingularName() ?> = new <?php echo $this->getModelClass() ?>(); 14 }15 if($request->getParameter('culture')) {16 $this-><?php echo $this->getSingularName() ?>->setLanguage($request->getParameter('culture'));17 18 } 18 19 return $this-><?php echo $this->getSingularName() ?>; plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php
r28432 r29143 1 1 public function executeIndex(sfWebRequest $request) 2 2 { 3 if($request->getParameter('culture')) { 4 BaseModelCNM::setMasterLanguage($request->getParameter('culture')); 5 } 3 6 // sorting 4 7 if ($request->getParameter('sort') && $this->isValidSortColumn($request->getParameter('sort'))) plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php
r28432 r29143 31 31 <tbody> 32 32 [?php foreach ($pager->getResults() as $i => $<?php echo $this->getSingularName() ?>): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?] 33 [?php $<?php echo $this->getSingularName() ?>->setLanguage($sf_params->getRaw('culture', 'pt')); ?] 33 34 <tr class="sf_admin_row [?php echo $odd ?]"> 34 35 <?php if ($this->configuration->getValue('list.batch_actions')): ?> plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php
r28432 r29143 1 <div style="text-align: right"> 2 [?php if($sf_params->get('culture', false)): ?] 3 [?php echo __('Alterar idioma:'); ?] 4 [?php $languages = $helper->getLanguages(); ?] 5 [?php foreach($languages as $culture => $language): ?] 6 [?php if($culture == $sf_params->get('culture')) continue; ?] 7 [?php echo link_to2( 8 image_tag('cultures/'.$culture.'.png', 9 array('title' => $language, 'alt' => $language)), 10 $helper->getUrlForAction('list'), 11 array('culture' => $culture) 12 ) ?] 13 [?php endforeach; ?] 14 [?php endif; ?] 15 </div> plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php
r28432 r29143 32 32 33 33 <div id="sf_admin_footer"> 34 [?php include_partial('<?php echo $this->getModuleName() ?>/list_footer', array('pager' => $pager )) ?]34 [?php include_partial('<?php echo $this->getModuleName() ?>/list_footer', array('pager' => $pager, 'helper' => $helper)) ?] 35 35 </div> 36 36 </div>