Extend TabHeader.tpl to support non-ajax tabs
authorColeman Watts <coleman@civicrm.org>
Sun, 5 Jan 2014 00:20:48 +0000 (16:20 -0800)
committerColeman Watts <coleman@civicrm.org>
Mon, 6 Jan 2014 19:12:28 +0000 (11:12 -0800)
templates/CRM/common/TabHeader.tpl

index 5f97ad2a6c73a77bd614b653639dab64f0002d2d..62a352caab18598c757286ac80278de4638ad9de 100644 (file)
     <ul>
        {foreach from=$tabHeader key=tabName item=tabValue}
           <li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if isset($tabValue.class)} {$tabValue.class}{/if}">
-          {if $tabValue.link and $tabValue.active}
-             <a href="{$tabValue.link}" title="{$tabValue.title}{if !$tabValue.valid} ({ts}disabled{/ts}){/if}">{$tabValue.title}</a>
+          {if $tabValue.active}
+             <a href="{if !empty($tabValue.template)}#panel_{$tabName}{else}{$tabValue.link}{/if}" title="{$tabValue.title}{if !$tabValue.valid} ({ts}disabled{/ts}){/if}">{$tabValue.title}</a>
           {else}
              <span {if !$tabValue.valid} title="{ts}disabled{/ts}"{/if}>{$tabValue.title}</span>
           {/if}
           </li>
        {/foreach}
     </ul>
+      {foreach from=$tabHeader key=tabName item=tabValue}
+        {if !empty($tabValue.template)}
+          <div id="#panel_{$tabName}">
+            {include file=$tabValue.template}
+          </div>
+        {/if}
+      {/foreach}
     </div>
   {/if}
   <div class="clear"></div>