tripal_feature_go_terms.tpl.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. $feature = $variables['node']->feature;
  3. $terms = $feature->tripal_analysis_go->terms;
  4. ?>
  5. <div id="tripal_feature-go_terms-box" class="tripal_feature-info-box tripal-info-box">
  6. <div class="tripal_feature-info-box-title tripal-info-box-title">GO Assignments</div>
  7. <div class="tripal_feature-info-box-desc tripal-info-box-desc">This <?php print $feature->type_id->name ?> is annotated with the following GO terms.</div>
  8. <?php if(count($terms) > 0){ ?>
  9. <table id="tripal_feature-go_terms-table" class="tripal_feature-table tripal-table tripal-table-horz">
  10. <tr>
  11. <th>Category</th>
  12. <th>Term Accession</th>
  13. <th>Term Name</th>
  14. </tr>
  15. <?php
  16. $i = 0;
  17. foreach ($terms as $term){
  18. $class = 'tripal_feature-table-odd-row tripal-table-odd-row';
  19. if($i % 2 == 0 ){
  20. $class = 'tripal_feature-table-odd-row tripal-table-even-row';
  21. }
  22. ?>
  23. <tr class="<?php print $class ?>">
  24. <td><?php print $term->cvname ?></td>
  25. <td>GO:<?php print $term->accession?></td>
  26. <td><span title="<?php print $term->definition ?>"><?php print $term->goterm ?></span></td>
  27. </tr>
  28. <?php
  29. $i++;
  30. } ?>
  31. </table>
  32. <?php } else { ?>
  33. <div class="tripal-no-results">There are no GO terms for this feature</div>
  34. <?php }?>
  35. </div>