blast_recent_jobs.tpl.php 843 B

12345678910111213141516171819202122232425262728293031323334
  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. usort($recent_jobs, 'sort_blast_jobs_by_date_submitted_desc');
  9. print '<h2>Recent Jobs</h2>';
  10. $table = array(
  11. 'header' => array('Query Information', 'Search Target', 'Date Requested', ''),
  12. 'rows' => array(),
  13. 'attributes' => array('class' => array('tripal-blast', 'recent-jobs')),
  14. 'sticky' => FALSE
  15. );
  16. foreach ($recent_jobs as $job) {
  17. // Define a row for the current job.
  18. $table['rows'][] = array(
  19. $job->query_summary,
  20. $job->blastdb->db_name,
  21. format_date($job->date_submitted, 'medium'),
  22. l('See Results', 'blast/report/'.blast_ui_make_secret($job->job_id))
  23. );
  24. }
  25. print theme('table', $table);
  26. }
  27. ?>