You are here

function spaces_views_handler_crayon_name in Spaces 5

Same name and namespace in other branches
  1. 5.2 spaces_views.inc \spaces_views_handler_crayon_name()

Custom view handler for coloration projects

11 string references to 'spaces_views_handler_crayon_name'
_spaces_casetracker_views_cases in spaces_casetracker/spaces_casetracker.module
_spaces_casetracker_views_cases_byproject in spaces_casetracker/spaces_casetracker.module
_spaces_casetracker_views_cases_bystatus in spaces_casetracker/spaces_casetracker.module
_spaces_casetracker_views_cases_byuser in spaces_casetracker/spaces_casetracker.module
_spaces_casetracker_views_cases_filter in spaces_casetracker/spaces_casetracker.module

... See full list

File

./spaces_views.inc, line 54

Code

function spaces_views_handler_crayon_name($fieldinfo, $fielddata, $value, $data) {
  switch ($fielddata['options']) {
    case 'og':
      $og = db_fetch_object(og_get_node_groups_result($data->nid));
      $og->nid = $og->group_nid;
      return theme('crayon_popup', $og);
      break;
    case 'casetracker':
      static $nodes = array();
      $pid = $data->casetracker_case_pid;
      if (!$nodes[$pid]) {
        $nodes[$pid] = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n WHERE n.nid = %d"), $pid));
      }
      return theme('crayon_popup', $nodes[$pid]);
      break;
  }
}