@@ -37,13 +37,18 @@ function materio_flag_menu() {
|
||||
'file' => 'materio_flag.pages.inc',
|
||||
);
|
||||
|
||||
|
||||
$items['materioflag/refresh/block/bookmarks'] = $base+array(
|
||||
'access arguments' => array('flag bookmarks'),
|
||||
'page callback' => 'materio_flag_refresh_block',
|
||||
'page arguments' => array(3),
|
||||
);
|
||||
|
||||
$items['bookmarks'] = $base+array(
|
||||
'access arguments' => array('flag bookmarks'),
|
||||
'page callback' => 'materio_flag_user_bookmarks',
|
||||
'page arguments' => array(),
|
||||
);
|
||||
|
||||
$items['materioflag/refresh/block/lists'] = $base+array(
|
||||
'access arguments' => array('create flag lists'),
|
||||
'page callback' => 'materio_flag_refresh_block',
|
||||
@@ -156,7 +161,9 @@ function materio_flag_block_view($delta = '') {
|
||||
foreach ($userflags['bookmarks'] as $nid => $flag) {
|
||||
$userbookmarks[] = node_load($nid);
|
||||
}
|
||||
$block['subject'] = t('My bookmarks (@len)', array("@len"=>count($userbookmarks)));
|
||||
// TODO: put this title generation on a theme function
|
||||
$subject = '<span class="listname">'.t('My bookmarks (@len) ', array("@len"=>count($userbookmarks))).'</span>';
|
||||
$block['subject'] = $subject . l('<i class="icon-resize-full"></i>', 'bookmarks', array('html'=>true, 'attributes' => array('class' => array('open-list')),)); //
|
||||
$block['content'] = theme('materio_flag_mybookmarks_block', array("bookmarks"=>$userbookmarks, "viewmode"=>"bookmark"));
|
||||
}else{
|
||||
$block['subject'] = t('My bookmarks');
|
||||
@@ -215,16 +222,17 @@ function materio_flag_block_view($delta = '') {
|
||||
$flag->flaged_content = $flaged_content;
|
||||
$flags[$name] = $flag;
|
||||
}
|
||||
if($flags){
|
||||
// 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')));
|
||||
// $block['subject'] = t('My '.variable_get('flag_lists_name', 'list').'s');
|
||||
// // $block['content'] = t('No !listname yet. Add !listname on clicking on results star', array('!listname'=>variable_get('flag_lists_name', 'list')));
|
||||
// }
|
||||
}
|
||||
break;
|
||||
@@ -339,7 +347,7 @@ function materio_flag_get_entity_links($entity, $type, $view_mode = null){
|
||||
|
||||
$items[] = array(
|
||||
'data' => $link,
|
||||
'class' => array('flag-lists-link', $action.'-action'),
|
||||
'class' => array('flag-lists-link', $action.'-action', 'fid-'.$flag->fid),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user