Author: sid.gbf
Date: 2010-04-14 16:09:24 +0200 (Wed, 14 Apr 2010)
New Revision: 29143

Modified:
   
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php
   
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php
   
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php
   
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php
   
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php
Log:
Fixes de idioma

Modified: 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php
===================================================================
--- 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php
       2010-04-14 13:43:02 UTC (rev 29142)
+++ 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/createAction.php
       2010-04-14 14:09:24 UTC (rev 29143)
@@ -7,14 +7,15 @@
 
   public function getObject(sfWebRequest $request) {
     $params = $request->getParameterHolder()->getAll();
+    if($request->getParameter('culture')) {
+      //$this-><?php echo $this->getSingularName() 
?>->setLanguage($request->getParameter('culture'));
+      BaseModelCNM::setMasterLanguage($request->getParameter('culture'));
+    }
     if(isset($params['id']) || isset($params['slug'])) {
       $this-><?php echo $this->getSingularName() ?> = 
$this->getRoute()->getObject();
     } else {
       $this-><?php echo $this->getSingularName() ?> = new <?php echo 
$this->getModelClass() ?>();
     }
-    if($request->getParameter('culture')) {
-      $this-><?php echo $this->getSingularName() 
?>->setLanguage($request->getParameter('culture'));
-    }
     return $this-><?php echo $this->getSingularName() ?>;
   }
   public function executeCreate(sfWebRequest $request)

Modified: 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php
===================================================================
--- 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php
        2010-04-14 13:43:02 UTC (rev 29142)
+++ 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/parts/indexAction.php
        2010-04-14 14:09:24 UTC (rev 29143)
@@ -1,5 +1,8 @@
   public function executeIndex(sfWebRequest $request)
   {
+    if($request->getParameter('culture')) {
+      BaseModelCNM::setMasterLanguage($request->getParameter('culture'));
+    }
     // sorting
     if ($request->getParameter('sort') && 
$this->isValidSortColumn($request->getParameter('sort')))
     {

Modified: 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php
===================================================================
--- 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php
 2010-04-14 13:43:02 UTC (rev 29142)
+++ 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list.php
 2010-04-14 14:09:24 UTC (rev 29143)
@@ -30,6 +30,7 @@
       </tfoot>
       <tbody>
         [?php foreach ($pager->getResults() as $i => $<?php echo 
$this->getSingularName() ?>): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?]
+          [?php $<?php echo $this->getSingularName() 
?>->setLanguage($sf_params->getRaw('culture', 'pt')); ?]
           <tr class="sf_admin_row [?php echo $odd ?]">
 <?php if ($this->configuration->getValue('list.batch_actions')): ?>
             [?php include_partial('<?php echo $this->getModuleName() 
?>/list_td_batch_actions', array('<?php echo $this->getSingularName() ?>' => 
$<?php echo $this->getSingularName() ?>, 'helper' => $helper)) ?]

Modified: 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php
===================================================================
--- 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php
  2010-04-14 13:43:02 UTC (rev 29142)
+++ 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/_list_footer.php
  2010-04-14 14:09:24 UTC (rev 29143)
@@ -0,0 +1,15 @@
+<div style="text-align: right">
+  [?php if($sf_params->get('culture', false)): ?]
+    [?php echo __('Alterar idioma:'); ?]
+    [?php $languages = $helper->getLanguages(); ?]
+    [?php foreach($languages as $culture => $language): ?]
+      [?php if($culture == $sf_params->get('culture')) continue; ?]
+      [?php echo link_to2(
+                    image_tag('cultures/'.$culture.'.png',
+                      array('title' => $language, 'alt' => $language)),
+                    $helper->getUrlForAction('list'),
+                    array('culture' => $culture)
+      ) ?]
+    [?php endforeach; ?]
+  [?php endif; ?]
+</div>
\ No newline at end of file

Modified: 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php
===================================================================
--- 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php
  2010-04-14 13:43:02 UTC (rev 29142)
+++ 
plugins/sfjQueryDoctrineAdminPlugin/tag/0.1/data/generator/sfDoctrineModule/javascript/template/templates/indexSuccess.php
  2010-04-14 14:09:24 UTC (rev 29143)
@@ -31,6 +31,6 @@
   </div>
 
   <div id="sf_admin_footer">
-    [?php include_partial('<?php echo $this->getModuleName() ?>/list_footer', 
array('pager' => $pager)) ?]
+    [?php include_partial('<?php echo $this->getModuleName() ?>/list_footer', 
array('pager' => $pager, 'helper' => $helper)) ?]
   </div>
 </div>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to