tripal_organism_feature_counts.tpl.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <script type="text/javascript">
  8. if (Drupal.jsEnabled) {
  9. $(document).ready(function() {
  10. $("[title]").tooltip();
  11. });
  12. }
  13. </script>
  14. <div id="tripal_organism-feature_counts-box" class="tripal_organism-info-box tripal-info-box">
  15. <div class="tripal_organism-info-box-title tripal-info-box-title">Feature Type Summary</div>
  16. <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>
  17. <?php if(count($types) > 0){ ?>
  18. <table id="tripal_organism-table-feature_counts" class="tripal_organism-table tripal-table tripal-table-horz">
  19. <tr class="tripal_organism-table-odd-row tripal-table-even-row">
  20. <th>Feature Type</th>
  21. <th>Count</th>
  22. </tr>
  23. <?php
  24. foreach ($types as $type){
  25. $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
  26. if($i % 2 == 0 ){
  27. $class = 'tripal_organism-table-odd-row tripal-table-even-row';
  28. }
  29. ?>
  30. <tr class="<?php print $class ?>">
  31. <td><span title="<?php print $type->definition ?>"><?php print $type->feature_type?></span></td>
  32. <td><?php print number_format($type->num_features) ?></td>
  33. </tr>
  34. <?php
  35. $i++;
  36. } ?>
  37. </table>
  38. <img class="tripal_cv_chart" id="tripal_feature_cv_chart_<?php print $organism->organism_id?>" src="" border="0">
  39. <?php } else {?>
  40. <div class="tripal-no-results">There are no features available.</div>
  41. <?php }?>
  42. <?php print $pager ?>
  43. </div>
  44. <?php
  45. }
  46. ?>