mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
- 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
This commit is contained in:
+9
-36
@@ -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 ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user