From 4621be1005ddab4d3a380ab05a124f99f3e36bea Mon Sep 17 00:00:00 2001 From: rub Date: Thu, 28 Feb 2008 23:41:47 +0000 Subject: 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 --- admin/cat_options.php | 50 +++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 39 deletions(-) (limited to 'admin/cat_options.php') 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 | -- cgit v1.2.3