function theme_casetracker_block_latest_cases in Case Tracker 5
Theme the "Latest cases" block.
Parameters
$cases: An array of arrays containing 'case' and 'project' objects of the latest cases and info to be displayed.
1 theme call to theme_casetracker_block_latest_cases()
- casetracker_block in ./
casetracker.module - Implementation of hook_block().
File
- ./
casetracker.module, line 1190 - Enables the handling of projects and their cases.
Code
function theme_casetracker_block_latest_cases($cases) {
$item_list = array();
foreach ($cases as $case) {
$case_link = l('[' . $case['project']->project_number . '-' . $case['case']->case_number . '] ' . $case['case']->title, 'node/' . $case['case']->nid);
$project_link = '(' . l($case['project']->title, 'node/' . $case['project']->nid) . ')';
$item_list[] = $case_link . ' ' . $project_link;
}
// spit only if spittle.
if (count($item_list) > 0) {
return theme('item_list', $item_list);
}
}