blast_recent_jobs.tpl.php 775 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. *
  4. */
  5. // Gets the list of recent jobs filtered to the current blast program (ie: blastn).
  6. $recent_jobs = get_recent_blast_jobs($programs);
  7. if ($recent_jobs) {
  8. print '<h2>Recent Jobs</h2>';
  9. $table = array(
  10. 'header' => array('Query Information', 'Search Target', 'Date Requested', ''),
  11. 'rows' => array(),
  12. 'attributes' => array('class' => array('tripal-blast', 'recent-jobs')),
  13. 'sticky' => FALSE
  14. );
  15. foreach ($recent_jobs as $job) {
  16. // Define a row for the current job.
  17. $table['rows'][] = array(
  18. $job->query_summary,
  19. $job->blastdb->db_name,
  20. format_date($job->date_submitted, 'medium'),
  21. l('See Results', 'blast/report/'.blast_ui_make_secret($job->job_id))
  22. );
  23. }
  24. print theme('table', $table);
  25. }
  26. ?>