Changeset 817 for trunk/admin/intro.php


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/intro.php

    r814 r817  
    193193    )
    194194  );
    195  
     195
     196// waiting elements
     197$query = '
     198SELECT COUNT(*)
     199  FROM '.WAITING_TABLE.'
     200  WHERE validated=\'false\'
     201;';
     202list($nb_waiting) = mysql_fetch_row(pwg_query($query));
     203
     204if ($nb_waiting > 0)
     205{
     206  $template->assign_block_vars(
     207    'waiting',
     208    array(
     209      'URL' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=waiting'),
     210      'INFO' => sprintf(l10n('%d waiting for validation'), $nb_waiting)
     211      )
     212    );
     213}
     214
     215// unvalidated comments
     216$query = '
     217SELECT COUNT(*)
     218  FROM '.COMMENTS_TABLE.'
     219  WHERE validated=\'false\'
     220;';
     221list($nb_comments) = mysql_fetch_row(pwg_query($query));
     222
     223if ($nb_comments > 0)
     224{
     225  $template->assign_block_vars(
     226    'unvalidated',
     227    array(
     228      'URL' => add_session_id(PHPWG_ROOT_PATH.'admin.php?page=comments'),
     229      'INFO' => sprintf(l10n('%d waiting for validation'), $nb_comments)
     230      )
     231    );
     232}
     233
    196234// +-----------------------------------------------------------------------+
    197235// |                           sending html code                           |
Note: See TracChangeset for help on using the changeset viewer.