Ignore:
Timestamp:
Feb 28, 2008, 3:41:48 AM (17 years ago)
Author:
rvelices
Message:
  • migrate many templates to smarty
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_tabsheet.inc.php

    r1912 r2223  
    4242{
    4343  global $page, $template;
     44//THIS SHOULD BE DEPRECATED ?
     45 
     46  $template->set_filename('tabsheet', 'admin/tabsheet.tpl');
     47  $template->assign('tabsheet', $page['tabsheet']);
    4448
    45   if (count($page['tabsheet']) > 0)
     49  foreach ($page['tabsheet'] as $tab_name => $tab)
    4650  {
    47     $template->set_filename('tabsheet', 'admin/tabsheet.tpl');
     51    $is_selected = isset($tab['selected']) and $tab['selected'] === true;
     52    if ($is_selected)
     53    {
     54      $template->assign_vars(
     55        array('TABSHEET_TITLE' => '['.$tab['caption'].']'));
     56      break;
     57    }
     58  }
    4859
    49     foreach ($page['tabsheet'] as $tab_name => $tab)
    50     {
    51       $is_selected = isset($tab['selected']) and $tab['selected'] === true;
    52       $template->assign_block_vars
    53       (
    54         'tab',
    55         array
    56         (
    57           'CLASSNAME' => ($is_selected ? 'selected_tab' : 'normal_tab'),
    58           'URL' => $tab['url'],
    59           'CAPTION' => $tab['caption']
    60         )
    61       );
    62 
    63       if ($is_selected)
    64       {
    65         $template->assign_vars(
    66           array('TABSHEET_TITLE' => '['.$tab['caption'].']'));
    67       }
    68     }
    69 
    70     $template->assign_var_from_handle('TABSHEET', 'tabsheet');
    71   }
     60  $template->assign_var_from_handle('TABSHEET', 'tabsheet');
     61  $template->clear_assign('tabsheet');
    7262}
    7363
Note: See TracChangeset for help on using the changeset viewer.