function support_charts_display in Support Ticketing System 7
Same name and namespace in other branches
- 6 support_charts/support_charts.module \support_charts_display()
Display charts and content in context to the current page.
Return value
string markup, chart images.
1 call to support_charts_display()
- support_charts in support_charts/
support_charts.module - Page callback.
File
- support_charts/
support_charts.module, line 78 - Support charting. @author Jeremy Andrews <jeremy@tag1consulting.com> @package Support
Code
function support_charts_display($page = 'global', $object) {
$output = '';
drupal_add_css(drupal_get_path('module', 'support_charts') . '/support_charts.css');
switch ($page) {
case 'global':
$output .= support_charts_build_pie('tickets_open');
$output .= support_charts_build_pie('tickets_per_state');
$output .= support_charts_build_pie('tickets_per_priority');
$output .= support_charts_build_pie('tickets_per_client');
$output .= support_charts_build_pie('tickets_per_assigned');
$output .= support_charts_build_graph('tickets_created');
$output .= support_charts_build_graph('tickets_updated');
$output .= support_charts_build_graph('tickets_closed');
break;
case 'user_opened':
$output .= support_charts_build_pie('tickets_open', 'user', $object);
$output .= support_charts_build_pie('tickets_per_state', 'user', $object);
$output .= support_charts_build_pie('tickets_per_priority', 'user', $object);
$output .= support_charts_build_pie('tickets_per_client', 'user', $object);
$output .= support_charts_build_graph('tickets_created', 'user', $object);
$output .= support_charts_build_graph('tickets_updated', 'user', $object);
$output .= support_charts_build_graph('tickets_closed', 'user', $object);
break;
case 'user_assigned':
$output .= support_charts_build_pie('tickets_per_assigned', 'user_assigned', $object);
$output .= support_charts_build_pie('tickets_per_state', 'user_assigned', $object);
$output .= support_charts_build_pie('tickets_per_priority', 'user_assigned', $object);
$output .= support_charts_build_pie('tickets_per_client', 'user_assigned', $object);
}
return $output;
}