tripal_phylogeny.taxonomy.inc

  1. 2.x tripal_phylogeny/includes/tripal_phylogeny.taxonomy.inc
  2. 3.x legacy/tripal_phylogeny/includes/tripal_phylogeny.taxonomy.inc

File

legacy/tripal_phylogeny/includes/tripal_phylogeny.taxonomy.inc
View source
  1. <?php
  2. /**
  3. * Generates a page that contains the taxonomy view.
  4. */
  5. function tripal_phylogeny_taxonomy_view() {
  6. $values = array(
  7. 'type_id' => array(
  8. 'name' => 'taxonomy',
  9. ),
  10. );
  11. $message = t('Site administrators: This page is meant to provide
  12. a heirarchical taxonomic tree for all of the organism present
  13. in this site. This may not be useful if you only have a few
  14. species. If so, you can turn off this page by disabling this page on
  15. the site\'s <a href="@menu">Navigation Menu</a>. Otherwise, to generate the taxonomy go to this site\'s
  16. <a href="@taxloader">NCBI taxonomy loader</a> to import the taxonomy information from NCBI.
  17. <br><br>Note: If you add new species to this site, you should rerun the
  18. NCBI taxonomy loader to update the view</p>',
  19. array(
  20. '@menu' => url('admin/structure/menu/manage/navigation'),
  21. '@taxloader' => url('admin/tripal/loaders/ncbi_taxonomy_loader'
  22. ))
  23. );
  24. $admin_message = tripal_set_message($message, TRIPAL_INFO, array('return_html' => TRUE));
  25. $phylotree = chado_generate_var('phylotree', $values);
  26. if ($phylotree) {
  27. $node = new stdClass();
  28. $node->phylotree = $phylotree;
  29. $html = theme('tripal_phylogeny_taxonomic_tree', array('node' => $node)) .
  30. $admin_message;
  31. return $html;
  32. }
  33. return array(
  34. '#type' => 'markup',
  35. '#markup' => t('This site has not yet prepared the taxonomy for viewing.') . $admin_message,
  36. );
  37. }