tripal_organism_feature_counts.tpl.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. $organism = $variables['node']->organism;
  3. $types = $variables['tripal_feature']['feature_counts']['types'];
  4. $enabled = $variables['tripal_feature']['feature_counts']['enabled'];
  5. if($enabled){
  6. ?>
  7. <div id="tripal_organism-feature_counts-box" class="tripal_organism-info-box tripal-info-box">
  8. <div class="tripal_organism-info-box-title tripal-info-box-title">Feature Type Summary</div>
  9. <div class="tripal_organism-info-box-desc tripal-info-box-desc">The following types of features are currently present in this database. Hold your mouse over the feature type for a popup with a description.</div>
  10. <?php if(count($types) > 0){ ?>
  11. <table id="tripal_organism-table-feature_counts" class="tripal_organism-table tripal-table tripal-table-horz">
  12. <tr class="tripal_organism-table-odd-row tripal-table-even-row">
  13. <th>Feature Type</th>
  14. <th>Count</th>
  15. </tr>
  16. <?php
  17. foreach ($types as $type){
  18. $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
  19. if($i % 2 == 0 ){
  20. $class = 'tripal_organism-table-odd-row tripal-table-even-row';
  21. }
  22. ?>
  23. <tr class="<?php print $class ?>">
  24. <td><span title="<?php print $type->definition ?>"><?php print $type->feature_type?></span></td>
  25. <td><?php print number_format($type->num_features) ?></td>
  26. </tr>
  27. <?php
  28. $i++;
  29. } ?>
  30. </table>
  31. <img class="tripal_cv_chart" id="tripal_feature_cv_chart_<?php print $organism->organism_id?>" src="" border="0">
  32. <?php } else {?>
  33. <div class="tripal-no-results">There are no features available.</div>
  34. <?php }?>
  35. <?php print $pager ?>
  36. </div>
  37. <?php
  38. }
  39. ?>