function theme_insight_report_value in Insight 7
Same name in this branch
- 7 insight.page_reports.inc \theme_insight_report_value()
- 7 insight.page_alerts.inc \theme_insight_report_value()
1 call to theme_insight_report_value()
- insight_page_report_pages in ./
insight.page_reports.inc - Form builder: Builds the node administration overview.
File
- ./
insight.page_alerts.inc, line 148
Code
function theme_insight_report_value($variables) {
$value = $variables['value'];
$status = 'none';
$active = '';
$score = '';
if (isset($value['irid'])) {
$score = $value['score'];
if ($value['status'] == 2) {
$status = 'complete';
$score = $score ? $score : 'P';
}
elseif ($value['status'] == 1) {
$status = 'warning';
$score = $score ? $score : 'W';
}
elseif ($value['status'] == 0) {
$status = 'error';
$score = $score ? $score : 'F';
}
if (is_numeric($score)) {
$score = $score . '%';
}
$active = $value['active'] ? 'active' : 'inactive';
}
else {
$score = 'NA';
}
$output = '<div id="insight-report-value-' . $value['irid'] . '" class="insight-report-value ' . $status . ' ' . $active . '" title="' . strip_tags($value['help']) . '">';
$output .= $score;
$output .= '</div>';
$output = l($output, 'admin/reports/insight/report/' . $value['irid'], array(
'html' => TRUE,
'query' => drupal_get_destination(),
));
return $output;
}