Ignore:
Timestamp:
Aug 17, 2005, 4:25:38 PM (19 years ago)
Author:
plg
Message:
  • modification : major simplification of admin.php. Titles are managed by included page, localized items are managed directly in the template.
  • new : sub template admin/double_select is included in templates admin/cat_options, admin/user_perm and admin/group_perm. I haven't been able to use it in admin/picture_modify because it seems impossible to have two instance of the same sub-template without interfering.
  • modification : bug 99, in profile manager, no auto submit when changing language (useless and generate accessibility problem).
  • improvement : HTML semantically correct for administration menu, simpler syntax, less tags, correct tags (dl/dt/dd instead of div/div).
  • modification : number of waiting elements and unvalidated comments are displayed in admin/intro instead of administration menu (with a link to the dedicated pages).
  • deletion : no link to profile from admin/user_list anymore (no need).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_options.php

    r809 r817  
    3131}
    3232include_once(PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php');
     33
    3334// +-----------------------------------------------------------------------+
    3435// |                       modification registration                       |
    3536// +-----------------------------------------------------------------------+
     37
    3638// print '<pre>';
    3739// print_r($_POST);
     
    130132  }
    131133}
     134
    132135// +-----------------------------------------------------------------------+
    133136// |                             template init                             |
    134137// +-----------------------------------------------------------------------+
    135 $template->set_filenames(array('cat_options'=>'admin/cat_options.tpl'));
    136 
    137 if (!isset($_GET['section']))
    138 {
    139   $page['section'] = 'upload';
    140 }
    141 else
    142 {
    143   $page['section'] = $_GET['section'];
    144 }
    145 
     138
     139$template->set_filenames(
     140  array(
     141    'cat_options' => 'admin/cat_options.tpl',
     142    'double_select' => 'admin/double_select.tpl'
     143    )
     144  );
     145
     146$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'upload';
    146147$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&amp;section=';
     148
    147149$template->assign_vars(
    148150  array(
     
    154156 );
    155157
    156 $template->assign_vars(array(strtoupper($page['section']).'_CLASS'=>'opened'));
    157158// +-----------------------------------------------------------------------+
    158159// |                              form display                             |
     
    190191    $template->assign_vars(
    191192      array(
    192         'L_CAT_TITLE' => $lang['cat_upload_title'],
     193        'L_SECTION' => $lang['cat_upload_title'],
    193194        'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
    194195        'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
     
    212213    $template->assign_vars(
    213214      array(
    214         'L_CAT_TITLE' => $lang['cat_comments_title'],
     215        'L_SECTION' => $lang['cat_comments_title'],
    215216        'L_CAT_OPTIONS_TRUE' => $lang['authorized'],
    216217        'L_CAT_OPTIONS_FALSE' => $lang['forbidden'],
     
    234235    $template->assign_vars(
    235236      array(
    236         'L_CAT_TITLE' => $lang['cat_lock_title'],
     237        'L_SECTION' => $lang['cat_lock_title'],
    237238        'L_CAT_OPTIONS_TRUE' => $lang['unlocked'],
    238239        'L_CAT_OPTIONS_FALSE' => $lang['locked'],
     
    256257    $template->assign_vars(
    257258      array(
    258         'L_CAT_TITLE' => $lang['cat_status_title'],
     259        'L_SECTION' => $lang['cat_status_title'],
    259260        'L_CAT_OPTIONS_TRUE' => $lang['cat_public'],
    260261        'L_CAT_OPTIONS_FALSE' => $lang['cat_private'],
     
    279280    $template->assign_vars(
    280281      array(
    281         'L_CAT_TITLE' => l10n('Representative'),
     282        'L_SECTION' => l10n('Representative'),
    282283        'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
    283284        'L_CAT_OPTIONS_FALSE' => l10n('randomly represented'),
     
    290291display_select_cat_wrapper($query_true,array(),'category_option_true');
    291292display_select_cat_wrapper($query_false,array(),'category_option_false');
     293
    292294// +-----------------------------------------------------------------------+
    293295// |                           sending html code                           |
    294296// +-----------------------------------------------------------------------+
     297
     298$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
    295299$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_options');
    296300?>
Note: See TracChangeset for help on using the changeset viewer.