function tripal_contact_node_view

2.x tripal_contact.chado_node.inc tripal_contact_node_view($node, $view_mode, $langcode)
3.x tripal_contact.chado_node.inc tripal_contact_node_view($node, $view_mode, $langcode)

Implements hook_node_view().

File

legacy/tripal_contact/includes/tripal_contact.chado_node.inc, line 596
Implements drupal node hooks.

Code

function tripal_contact_node_view($node, $view_mode, $langcode) {
  switch ($node->type) {
    case 'chado_contact':
      // Show feature browser and counts
      if ($view_mode == 'full') {
        $node->content['tripal_contact_base'] = array(
          '#theme' => 'tripal_contact_base',
          '#node' => $node,
          '#tripal_toc_id' => 'base',
          '#tripal_toc_title' => 'Overview',
          '#weight' => -100,
        );
        $node->content['tripal_contact_properties'] = array(
          '#theme' => 'tripal_contact_properties',
          '#node' => $node,
          '#tripal_toc_id' => 'properties',
          '#tripal_toc_title' => 'Properties',
        );
        if (module_exists('tripal_pub')) {
          $node->content['tripal_contact_publications'] = array(
            '#theme' => 'tripal_contact_publications',
            '#node' => $node,
            '#tripal_toc_id' => 'publications',
            '#tripal_toc_title' => 'Publications',
          );
        }
        $node->content['tripal_contact_relationships'] = array(
          '#theme' => 'tripal_contact_relationships',
          '#node' => $node,
          '#tripal_toc_id' => 'relationships',
          '#tripal_toc_title' => 'Relationships',
        );
      }
      if ($view_mode == 'teaser') {
        $node->content['tripal_contact_teaser'] = array(
          '#theme' => 'tripal_contact_teaser',
          '#node' => $node,
        );
      }
      break;
  }
}