Changeset 421


Ignore:
Timestamp:
May 28, 2004, 11:55:02 PM (20 years ago)
Author:
z0rglub
Message:
  • no more use of clickable bullet with categories in the menu
  • displays only the number of pictures for categories with pictures (in the menu)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/category.php

    r405 r421  
    6969      'LINK_NAME' => $name,
    7070      'INDENT' => $indent,
    71       'NB_SUBCATS'=>$category['nb_sub_categories'],
    72       'TOTAL_CAT'=>$category['nb_images'],
    73       'CAT_ICON'=>get_icon($category['date_last']),
    74      
    75       'U_LINK' => add_session_id($url))
     71      'U_LINK' => add_session_id($url),
     72      'BULLET_IMAGE' => $user['lien_collapsed'])
    7673    );
    7774 
    78   if ( $user['expand'] or $category['nb_sub_categories'] == 0 )
     75  if ( $category['nb_images'] > 0 )
    7976  {
    8077    $template->assign_block_vars(
    81       'category.bulletnolink',
    82       array('BULLET_IMAGE' => $user['lien_collapsed'])
    83       );
    84   }
    85   else
    86   {
    87     $url = PHPWG_ROOT_PATH.'category.php';
    88     if (isset($page['cat']))
    89     {
    90       $url .='?cat='.$page['cat'];
    91     }
    92    
    93     if ( $category['expanded'] )
    94     {
    95       $img=$user['lien_expanded'];
    96     }
    97     else
    98     {
    99       $img=$user['lien_collapsed'];
    100     }
    101    
    102     $template->assign_block_vars(
    103       'category.bulletlink',
     78      'category.infocat',
    10479      array(
    105         'BULLET_IMAGE' =>  $img,
    106         'U_BULLET_LINK'=>  add_session_id($url))
    107       );
     80        'TOTAL_CAT'=>$category['nb_images'],
     81        'CAT_ICON'=>get_icon($category['date_last'])
     82        ));
    10883  }
    10984 
     
    11186  if ( $category['expanded'] )
    11287  {
    113     foreach ( $category['subcats'] as $subcat )
    114         {
    115       $template->assign_block_vars('category.subcat', array());
    116           display_category( $subcat, $indent.str_repeat( ' ', 2 ));
     88    foreach ( $category['subcats'] as $subcat ) {
     89      display_category( $subcat, $indent.str_repeat( ' ', 2 ));
    11790    }
    11891  }
Note: See TracChangeset for help on using the changeset viewer.