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 20:23:59 +0000 (15:23 -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.

Conflicts:
templates/CRM/Contribute/Form/Selector.tpl

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

index 875629a6a7d96e417224f25608093ea29112a8ca..de5c9ae90242adbdd4d611812e9028d10279a963 100644 (file)
@@ -533,6 +533,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 10240d77ccda55ade8908dafefb8684b626b9095..4ff2e54f15f36eab1a7140f238799265233b093c 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>