tripal_jbrowse_page.listing.inc 754 B

1234567891011121314151617181920212223242526
  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. $q = tripal_jbrowse_mgmt_build_http_query($instance);
  17. $instances[$k]->url = url($settings['link'], ['query' => $q, 'absolute' => TRUE]);
  18. }
  19. // Use the template to render the page.
  20. return theme('jbrowse_instance_public_listing', ['instances' => $instances]);
  21. }