tripal_jbrowse_page.listing.inc 736 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Builds the public jbrowse listing.
  5. */
  6. /**
  7. * Builds the public jbrowse listing.
  8. */
  9. function tripal_jbrowse_page_listing_page() {
  10. $settings = tripal_jbrowse_mgmt_get_settings();
  11. // Retrieve all the instances...
  12. $instances = tripal_jbrowse_mgmt_get_instances();
  13. drupal_add_css(drupal_get_path('module', 'tripal_jbrowse_page') . '/theme/tripal_jbrowse_page.css');
  14. // Add the URL for each to link to.
  15. foreach($instances as $k => $instance) {
  16. $instances[$k]->url = url('jbrowse/'.$instance->organism->genus . '/' . $instance->organism->species, ['absolute' => TRUE]);
  17. }
  18. // Use the template to render the page.
  19. return theme('jbrowse_instance_public_listing', ['instances' => $instances]);
  20. }