Explorar el Código

Merge pull request #9 from njbooher/fix-big-result-file

Show download links when result file is large
Lacey-Anne Sanderson hace 8 años
padre
commit
0351aa12c6
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      theme/blast_report.tpl.php

+ 3 - 2
theme/blast_report.tpl.php

@@ -64,7 +64,7 @@ $no_hits = TRUE;
 
 <!-- Provide Information to the user about their blast job -->
 <div class="blast-job-info">
-<?php if($xml):
+<?php 
   $output_files = array();
   if (file_exists($blast_job->files->result->html))
     $output_files['html'] = array('path' => $blast_job->files->result->html, 'title' => 'Alignment');
@@ -75,6 +75,7 @@ $no_hits = TRUE;
   if (file_exists($blast_job->files->result->xml))
     $output_files['xml'] = array('path' => $blast_job->files->result->xml, 'title' => 'XML');
 ?>
+  <?php if(!empty($output_files)): ?>
   <div class="blast-download-info"><strong>Download</strong>:
     <?php
       $i = 0;
@@ -84,7 +85,7 @@ $no_hits = TRUE;
         if (sizeof($output_files) != $i) print ', ';
     } ?>
   </div>
-<?php endif; ?>
+  <?php endif; ?>
   <br />
   <div class="blast-query-info"><strong>Query Information</strong>:
     <?php print $blast_job->files->query;?></div>