aboutsummaryrefslogtreecommitdiffstats
path: root/category.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-05-28 21:55:02 +0000
committerz0rglub <z0rglub@piwigo.org>2004-05-28 21:55:02 +0000
commitc635fc7b03e25856381b0393198b486585410e02 (patch)
tree48de35a821341852bc91e0960a32338fe2e4b445 /category.php
parent8db124da81b8f90d6622ae8086ff57010a996355 (diff)
- 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
Diffstat (limited to '')
-rw-r--r--category.php45
1 files 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( '&nbsp;', 2 ));
+ foreach ( $category['subcats'] as $subcat ) {
+ display_category( $subcat, $indent.str_repeat( '&nbsp;', 2 ));
}
}
}