You are here

function theme_statspro_content in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 statspro.reports.inc \theme_statspro_content()
1 theme call to theme_statspro_content()
statspro_overview in ./statspro_overview.inc
Callback function for overview page.

File

./statspro_overview.inc, line 96

Code

function theme_statspro_content($period, $data) {
  $output = '<div id="content-area" style="margin-bottom: 30px">';
  if (is_array($data)) {
    if (statspro_get_available_charts_graphs()) {
      $users_data = array_slice($data, 0, 2);
      $output .= statspro_chart_summary(t('Users - !period', array(
        '!period' => $period,
      )), $users_data);
      $output .= "\n<br />\n";
      $nodes_comments_data = array_slice($data, 2, 3);
      $output .= statspro_chart_summary(t('Nodes and comments - !period', array(
        '!period' => $period,
      )), $nodes_comments_data);
    }

    // theme the table
    $header = array(
      t('Name'),
      t('Value'),
    );
    $output .= theme('table', $header, $data);
  }
  else {
    $output .= t('No content data available for specified period.');
  }
  $output .= '</div>';
  return $output;
}