From 39db0ed16dd96ed4124d38ee7864192132afe8b5 Mon Sep 17 00:00:00 2001 From: bachy Date: Wed, 13 Feb 2013 19:40:42 +0100 Subject: [PATCH] header : hide my folders if no flag list Signed-off-by: bachy --- materio_flag.module | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/materio_flag.module b/materio_flag.module index 5ba65cb5..99e23862 100644 --- a/materio_flag.module +++ b/materio_flag.module @@ -215,11 +215,17 @@ function materio_flag_block_view($delta = '') { $flag->flaged_content = $flaged_content; $flags[$name] = $flag; } - - // $block['subject'] = t('My !listname'.'s', array('!listname'=>variable_get('flag_lists_name', 'list'))); - $block['subject'] = t('My '.variable_get('flag_lists_name', 'list').'s'); - $block['content'] = theme('materio_flag_mylists_nav_block', array("flags"=>$flags)); - // $block['content'] = theme('flag_lists_user_page', array('uid' => $user->uid)); + if($flags){ + // $block['subject'] = t('My !listname'.'s', array('!listname'=>variable_get('flag_lists_name', 'list'))); + $block['subject'] = t('My '.variable_get('flag_lists_name', 'list').'s'); + + $block['content'] = theme('materio_flag_mylists_nav_block', array("flags"=>$flags)); + // $block['content'] = theme('flag_lists_user_page', array('uid' => $user->uid)); + } + # what happend if no flags yet + // else{ + // $block['content'] = t('No !listname yet. Add !listname on clicking on results star', array('!listname'=>variable_get('flag_lists_name', 'list'))); + // } } break; }