function spaces_casetracker_block in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_casetracker/spaces_casetracker.module \spaces_casetracker_block()
Implementation of hook_block()
File
- spaces_casetracker/
spaces_casetracker.module, line 36
Code
function spaces_casetracker_block($op = 'list', $delta = 0) {
if ($op == 'list') {
$blocks = array();
$blocks[1]['info'] = t('Spaces: User Casetracker Stats');
return $blocks;
}
else {
if ($op == 'view') {
switch ($delta) {
case 1:
$u = (object) array(
'uid' => arg(1),
);
$u = user_load($u);
$space = spaces_get_space();
$block['subject'] = t('Case Stats for @user', array(
'@user' => $u->name,
));
$block['content'] = theme('spaces_casestats', spaces_casetracker_case_stats(arg(1), $space->sid), $u->name);
return $block;
}
}
}
}