diff options
author | rub <rub@piwigo.org> | 2008-02-28 23:41:47 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2008-02-28 23:41:47 +0000 |
commit | 4621be1005ddab4d3a380ab05a124f99f3e36bea (patch) | |
tree | a97ca3808e62d07687508a635ef1bfe3bd5cee4e /admin/cat_options.php | |
parent | 7818a7715b95c1912a71057ee0e050f30865298c (diff) |
0000809: Use more php classes implementation
Use class for tabsheet like grum class
Change way for tabsheet
git-svn-id: http://piwigo.org/svn/trunk@2226 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/cat_options.php')
-rw-r--r-- | admin/cat_options.php | 50 |
1 files changed, 11 insertions, 39 deletions
diff --git a/admin/cat_options.php b/admin/cat_options.php index 210427eea..5569506f9 100644 --- a/admin/cat_options.php +++ b/admin/cat_options.php @@ -30,7 +30,7 @@ if (!defined('PHPWG_ROOT_PATH')) } include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); -include_once(PHPWG_ROOT_PATH.'admin/include/functions_tabsheet.inc.php'); +include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); // +-----------------------------------------------------------------------+ // | Check Access and exit when user status is not ok | @@ -159,50 +159,22 @@ $template->assign( ) ); +// TabSheet +$tabsheet = new tabsheet(); // TabSheet initialization $opt_link = $link_start.'cat_options&section='; -$tabsheet = array -( - 'status' => array - ( - 'caption' => l10n('cat_security'), - 'url' => $opt_link.'status' - ), - 'visible' => array - ( - 'caption' => l10n('lock'), - 'url' => $opt_link.'visible' - ), - 'upload' => array - ( - 'caption' => l10n('upload'), - 'url' => $opt_link.'upload' - ), - 'comments' => array - ( - 'caption' => l10n('comments'), - 'url' => $opt_link.'comments' - ), -); - +$tabsheet->add('status', l10n('cat_security'), $opt_link.'status'); +$tabsheet->add('visible', l10n('lock'), $opt_link.'visible'); +$tabsheet->add('upload', l10n('upload'), $opt_link.'upload'); +$tabsheet->add('comments', l10n('comments'), $opt_link.'comments'); if ($conf['allow_random_representative']) { - $tabsheet['representative'] = - array - ( - 'caption' => l10n('Representative'), - 'url' => $opt_link.'representative' - ); + $tabsheet->add('representative', l10n('Representative'), $opt_link.'representative'); } -$tabsheet[$page['section']]['selected'] = true; - +// TabSheet selection +$tabsheet->select($page['section']); // Assign tabsheet to template -$template->assign( - array( - 'tabsheet' => $tabsheet, - 'TABSHEET_TITLE' => $tabsheet[$page['section']]['caption'] - ) - ); +$tabsheet->assign(); // +-----------------------------------------------------------------------+ // | form display | |