Fix broken table in languages other than English
authorColeman Watts <coleman@civicrm.org>
Thu, 3 Dec 2015 19:41:37 +0000 (14:41 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 3 Dec 2015 19:41:42 +0000 (14:41 -0500)
Table layout was broken because code was relying on english label "Soft Credit For".
There may well be a better way to do this, but at least it's not as broken as before.

CRM/Contribute/Selector/Search.php
templates/CRM/Contribute/Form/Selector.tpl

index d7c007b8afc98015a8ba2bc70322a46f25dae852..7839b113253f3a6dc10e1518b917622647c5209b 100644 (file)
@@ -559,6 +559,7 @@ class CRM_Contribute_Selector_Search extends CRM_Core_Selector_Base implements C
           array('desc' => ts('Actions')),
         )
       );
+    CRM_Core_Smarty::singleton()->assign('softCreditColumns', $this->_includeSoftCredits);
     return self::$_columnHeaders;
   }
 
index 7097f287615925ffdfea555b5f47170ecee20ba4..ceb19bb823fce170449fe448d92f35adafed5130 100644 (file)
@@ -32,7 +32,6 @@
       {if !$single and $context eq 'Search' }
         <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
       {/if}
-      {assign var="softCreditColumns" value=0}
       {foreach from=$columnHeaders item=header}
         <th scope="col">
           {if $header.sort}
@@ -42,9 +41,6 @@
             {$header.name}
           {/if}
         </th>
-        {if $header.name eq "Soft Credit For"}
-          {assign var='softCreditColumns' value=1}
-        {/if}
       {/foreach}
     </tr>
     </thead>