Project

General

Profile

« Previous | Next » 

Revision 875d5c3b

Added by Patrick Plitzner over 4 years ago

ref #8657 Add taxon information to description detail page

View differences:

modules/cdm_dataportal/includes/pages.inc
687 687
  return $link;
688 688
}
689 689

  
690
/**
691
 * Renders the link which will lead to the taxon detail page
692
 * @param object $taxon
693
 *    the taxon which will be linked to
694
 *
695
 * @return string
696
 *     the markup for the link
697
 */
698
function render_cdm_taxon($taxon) {
699
  $path = path_to_taxon($taxon->uuid);
700
  $attributes['class'][] = html_class_attribute_ref($taxon);
701
  $link = l($taxon->titleCache, $path, array('attributes' => $attributes));
702
  return $link;
703
}
704

  
690 705
/**
691 706
 * Returns HTML containing the synonymy for the accepted taxon.
692 707
 *
......
1240 1255
    $render_array[] = markup_to_render_array("<b>Specimen</b><br>");
1241 1256
    $render_array[] = markup_to_render_array(render_cdm_specimen_link($description->describedSpecimenOrObservation));
1242 1257
  }
1258
  if (isset($description->taxon)) {
1259
    $render_array[] = markup_to_render_array("<b>Taxon</b><br>");
1260
    $render_array[] = markup_to_render_array(render_cdm_taxon($description->taxon));
1261
  }
1243 1262

  
1244 1263
  $root_nodes = [];
1245 1264
  $root_nodes = get_root_nodes_for_dataset($description);

Also available in: Unified diff