From c635fc7b03e25856381b0393198b486585410e02 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Fri, 28 May 2004 21:55:02 +0000 Subject: - no more use of clickable bullet with categories in the menu - displays only the number of pictures for categories with pictures (in the menu) git-svn-id: http://piwigo.org/svn/trunk@421 68402e56-0260-453c-a942-63ccdbb3a9ee --- category.php | 45 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/category.php b/category.php index 558615b0c..963bdbe4c 100644 --- a/category.php +++ b/category.php @@ -68,52 +68,25 @@ function display_category( $category, $indent ) 'T_NAME' => $style, 'LINK_NAME' => $name, 'INDENT' => $indent, - 'NB_SUBCATS'=>$category['nb_sub_categories'], - 'TOTAL_CAT'=>$category['nb_images'], - 'CAT_ICON'=>get_icon($category['date_last']), - - 'U_LINK' => add_session_id($url)) + 'U_LINK' => add_session_id($url), + 'BULLET_IMAGE' => $user['lien_collapsed']) ); - if ( $user['expand'] or $category['nb_sub_categories'] == 0 ) + if ( $category['nb_images'] > 0 ) { $template->assign_block_vars( - 'category.bulletnolink', - array('BULLET_IMAGE' => $user['lien_collapsed']) - ); - } - else - { - $url = PHPWG_ROOT_PATH.'category.php'; - if (isset($page['cat'])) - { - $url .='?cat='.$page['cat']; - } - - if ( $category['expanded'] ) - { - $img=$user['lien_expanded']; - } - else - { - $img=$user['lien_collapsed']; - } - - $template->assign_block_vars( - 'category.bulletlink', + 'category.infocat', array( - 'BULLET_IMAGE' => $img, - 'U_BULLET_LINK'=> add_session_id($url)) - ); + 'TOTAL_CAT'=>$category['nb_images'], + 'CAT_ICON'=>get_icon($category['date_last']) + )); } // recursive call if ( $category['expanded'] ) { - foreach ( $category['subcats'] as $subcat ) - { - $template->assign_block_vars('category.subcat', array()); - display_category( $subcat, $indent.str_repeat( ' ', 2 )); + foreach ( $category['subcats'] as $subcat ) { + display_category( $subcat, $indent.str_repeat( ' ', 2 )); } } } -- cgit v1.2.3