Development

Changeset 29143

You must first sign up to be able to contribute.

Changeset 29143

Show
Ignore:
Timestamp:
04/14/10 16:09:24 (3 years ago)
Author:
sid.gbf
Message:

Fixes de idioma

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php

    r28787 r29143  
    88  public function getObject(sfWebRequest $request) { 
    99    $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    } 
    1014    if(isset($params['id']) || isset($params['slug'])) { 
    1115      $this-><?php echo $this->getSingularName() ?> = $this->getRoute()->getObject(); 
    1216    } else { 
    1317      $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')); 
    1718    } 
    1819    return $this-><?php echo $this->getSingularName() ?>; 
  • plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php

    r28432 r29143  
    11  public function executeIndex(sfWebRequest $request) 
    22  { 
     3    if($request->getParameter('culture')) { 
     4      BaseModelCNM::setMasterLanguage($request->getParameter('culture')); 
     5    } 
    36    // sorting 
    47    if ($request->getParameter('sort') && $this->isValidSortColumn($request->getParameter('sort'))) 
  • plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php

    r28432 r29143  
    3131      <tbody> 
    3232        [?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')); ?] 
    3334          <tr class="sf_admin_row [?php echo $odd ?]"> 
    3435<?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  
    3232 
    3333  <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)) ?] 
    3535  </div> 
    3636</div>