Ignore:
Timestamp:
Feb 29, 2008, 12:41:47 AM (16 years ago)
Author:
rub
Message:

0000809: Use more php classes implementation

Use class for tabsheet like grum class
Change way for tabsheet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_options.php

    r2223 r2226  
    3131
    3232include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
    33 include_once(PHPWG_ROOT_PATH.'admin/include/functions_tabsheet.inc.php');
     33include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
    3434
    3535// +-----------------------------------------------------------------------+
     
    160160 );
    161161
     162// TabSheet
     163$tabsheet = new tabsheet();
    162164// TabSheet initialization
    163165$opt_link = $link_start.'cat_options&section=';
    164 $tabsheet = array
    165 (
    166   'status' => array
    167    (
    168     'caption' => l10n('cat_security'),
    169     'url' => $opt_link.'status'
    170    ),
    171   'visible' => array
    172    (
    173     'caption' => l10n('lock'),
    174     'url' => $opt_link.'visible'
    175    ),
    176   'upload' => array
    177    (
    178     'caption' => l10n('upload'),
    179     'url' => $opt_link.'upload'
    180    ),
    181   'comments' => array
    182    (
    183     'caption' => l10n('comments'),
    184     'url' => $opt_link.'comments'
    185    ),
    186 );
    187 
     166$tabsheet->add('status', l10n('cat_security'), $opt_link.'status');
     167$tabsheet->add('visible', l10n('lock'), $opt_link.'visible');
     168$tabsheet->add('upload', l10n('upload'), $opt_link.'upload');
     169$tabsheet->add('comments', l10n('comments'), $opt_link.'comments');
    188170if ($conf['allow_random_representative'])
    189171{
    190   $tabsheet['representative'] =
    191     array
    192     (
    193       'caption' => l10n('Representative'),
    194       'url' => $opt_link.'representative'
    195     );
    196 }
    197 $tabsheet[$page['section']]['selected'] = true;
    198 
     172  $tabsheet->add('representative', l10n('Representative'), $opt_link.'representative');
     173}
     174// TabSheet selection
     175$tabsheet->select($page['section']);
    199176// Assign tabsheet to template
    200 $template->assign(
    201     array(
    202       'tabsheet' => $tabsheet,
    203       'TABSHEET_TITLE' => $tabsheet[$page['section']]['caption']
    204     )
    205   );
     177$tabsheet->assign();
    206178
    207179// +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.