blast_ui.theme.inc 774 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @file
  4. * This file contains functions specifically related to theme-ing the BLAST module
  5. */
  6. /**
  7. * Preprocess function for the show_blast_report.tpl.php
  8. *
  9. * Use this function to prepare variables for use in the template,
  10. * as well as to add css/javascript needed.
  11. *
  12. * @param $vars
  13. * The variables currently available to the template.
  14. */
  15. function blast_ui_preprocess_show_blast_report(&$vars) {
  16. $path = drupal_get_path('module', 'blast_ui');
  17. drupal_add_css($path . '/theme/blast_report.css');
  18. drupal_add_js('http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');
  19. $path = current_path();
  20. if (preg_match('%blast/report/([\w\.]+)%',$path,$matches)) {
  21. $vars['xml_filename'] = 'sites/default/files/' . $matches[1];
  22. }
  23. }