function theme_support_pm_user_client_hours_details in Support Ticketing System 6
Same name and namespace in other branches
- 7 support_pm/support_pm.module \theme_support_pm_user_client_hours_details()
Bar graph details.
2 theme calls to theme_support_pm_user_client_hours_details()
- support_pm_admin_reports in support_pm/
support_pm.admin.inc - support_pm_plan_overview_weekly in support_pm/
support_pm.module
File
- support_pm/
support_pm.module, line 720 - Support Project Management. @author Jeremy Andrews <jeremy@tag1consulting.com> @package Support
Code
function theme_support_pm_user_client_hours_details($day, $scale = 12) {
static $comment;
$clients = array();
$chart = array();
$hours = array();
$colors = array();
foreach ($day as $clid => $data) {
$hours[$clid] = $data->hours;
$colors[$clid] = support_pm_chartapi_color($clid);
}
if (empty($hours)) {
$hours[] = 0;
$colors[] = support_pm_chartapi_color(0);
}
// TODO: Allow attribute overrides
$attributes = array(
'class' => 'chart',
);
$output = support_pm_chartapi_render(array(
'cht' => 'bvs',
'chd' => 't:' . implode('|', $hours),
'chco' => implode(',', $colors),
'chs' => '45x70',
'chl' => format_plural(array_sum($hours), '1 hr', '@count hrs'),
'chma' => '7,0,7',
'chds' => "0,{$scale}",
), $attributes);
return $output;
}