diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-02-28 02:41:48 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-02-28 02:41:48 +0000 |
commit | c73923204927f406d492491398980d3aa429c4eb (patch) | |
tree | 717f79ecab01b8d97c359c27406be6dd26ff8193 /admin/include | |
parent | 618158aca4d99fe522b0f54d547442f17a5db148 (diff) |
- migrate many templates to smarty
git-svn-id: http://piwigo.org/svn/trunk@2223 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_tabsheet.inc.php | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/admin/include/functions_tabsheet.inc.php b/admin/include/functions_tabsheet.inc.php index e8a5704d7..9bb57322d 100644 --- a/admin/include/functions_tabsheet.inc.php +++ b/admin/include/functions_tabsheet.inc.php @@ -41,34 +41,24 @@ function template_assign_tabsheet() { global $page, $template; +//THIS SHOULD BE DEPRECATED ? + + $template->set_filename('tabsheet', 'admin/tabsheet.tpl'); + $template->assign('tabsheet', $page['tabsheet']); - if (count($page['tabsheet']) > 0) + foreach ($page['tabsheet'] as $tab_name => $tab) { - $template->set_filename('tabsheet', 'admin/tabsheet.tpl'); - - foreach ($page['tabsheet'] as $tab_name => $tab) + $is_selected = isset($tab['selected']) and $tab['selected'] === true; + if ($is_selected) { - $is_selected = isset($tab['selected']) and $tab['selected'] === true; - $template->assign_block_vars - ( - 'tab', - array - ( - 'CLASSNAME' => ($is_selected ? 'selected_tab' : 'normal_tab'), - 'URL' => $tab['url'], - 'CAPTION' => $tab['caption'] - ) - ); - - if ($is_selected) - { - $template->assign_vars( - array('TABSHEET_TITLE' => '['.$tab['caption'].']')); - } + $template->assign_vars( + array('TABSHEET_TITLE' => '['.$tab['caption'].']')); + break; } - - $template->assign_var_from_handle('TABSHEET', 'tabsheet'); } + + $template->assign_var_from_handle('TABSHEET', 'tabsheet'); + $template->clear_assign('tabsheet'); } ?> |