node-chado_stock.tpl.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. // $Id: node.tpl.php,v 1.3 2010/04/12 10:04:07 antsin Exp $
  3. /*
  4. +----------------------------------------------------------------+
  5. | BlogBuzz for Dupal 6.x - Version 1.0 |
  6. | Copyright (C) 2009 Antsin.com All Rights Reserved. |
  7. | @license - GNU GENERAL PUBLIC LICENSE |
  8. |----------------------------------------------------------------|
  9. | Theme Name: BlogBuzz |
  10. | Description: BlogBuzz by Antsin |
  11. | Author: Antsin.com |
  12. | Website: http://www.antsin.com/ |
  13. |----------------------------------------------------------------+
  14. */
  15. ?>
  16. <div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"><div class="node-inner">
  17. <div class="content">
  18. <?php print $picture; ?>
  19. <?php if ($submitted): ?>
  20. <div class="submitted">
  21. <?php print $date ?>
  22. </div>
  23. <?php endif; ?>
  24. <h1 class="title">
  25. <a href="<?php print $node_url; ?>" title="<?php print $title ?>"><?php print $title; ?></a>
  26. </h1>
  27. <?php if ($unpublished): ?>
  28. <div class="unpublished"><?php print t('Unpublished'); ?></div>
  29. <?php endif; ?>
  30. <div class="detail clear-block">
  31. <!-- Tripal Stock Starts --!>
  32. <?php if ($node->is_obsolete == 't') { print "<h4><i>This Stock is obsolete.</i></h4>"; } ?>
  33. <table>
  34. <?php if(!empty($node->stock_name)) { ?>
  35. <tr><th>Name</th><td><?php print $node->stock_name; ?></td></tr>
  36. <?php } ?>
  37. <tr><th>Uniquename</th><td><?php print $node->uniquename; ?></td></tr>
  38. <tr><th>Organism</th><td><?php print l($node->organism->common_name, "node/".$node->organism->nid); print " (<i>". $node->organism->genus ." ". $node->organism->species ."</i>)"; ?></td></tr>
  39. <tr><th>Type</th><td><?php print $node->stock_type; ?></td></tr>
  40. <?php if (!empty($node->main_db_reference->db_name)) { ?>
  41. <tr><th>Database (<?php print $node->main_db_reference->db_name; ?>)</th>
  42. <?php if( !empty($node->main_db_reference->urlprefix) ) { ?>
  43. <td><?php print l($node->main_db_reference->accession, $node->main_db_reference->urlprefix.$node->main_db_reference->accession); ?></td></tr>
  44. <?php } else { ?>
  45. <td><?php print $node->main_db_reference->accession; ?></td></tr>
  46. <?php }
  47. } ?>
  48. <?php if(!empty($node->description)) { ?>
  49. <tr><th>Description</th><td><?php print $node->description; ?></td></tr>
  50. <?php } ?>
  51. <?php if(!empty($node->crossingblock->season) && ($node->crossingblock->season != '---')) { ?>
  52. <tr><th>Crossing Block</th><td><?php print $node->crossingblock->year.' '.$node->crossingblock->season; ?></td></tr>
  53. <?php } ?>
  54. </table>
  55. <!-- Start of Expandable Boxes -->
  56. <?php if (!$teaser) { ?>
  57. <!-- Control link for the expandableBoxes -->
  58. <br><a id="tripal_expandableBox_toggle_button" onClick="toggleExpandableBoxes()">[-] Collapse All</a><br><br>
  59. <!-- End of Control link for the expandableBoxes -->
  60. <!-- Display of Chado Stock Properties from table stockprop in Chado --!>
  61. <?php $properties = $node->properties;
  62. if ( (sizeof($node->synonyms) + sizeof($properties)) > 0 ) { ?>
  63. <div id="feature-references" class="tripal_feature-info-box">
  64. <div class="tripal_expandableBox"><h3>Properties</h3></div>
  65. <div class="tripal_expandableBoxContent">
  66. <table>
  67. <?php if(!empty($node->synonyms)) { ?>
  68. <tr><th>Synonyms</th><td>
  69. <?php print $node->synonyms[0]->value;
  70. array_shift($node->synonyms);
  71. if (sizeof($node->synonyms) >= 1) {
  72. foreach($node->synonyms as $synonym) {print ", ".$synonym->value;}
  73. } ?>
  74. </td></tr>
  75. <?php } ?>
  76. </table>
  77. <table>
  78. <?php if (sizeof($properties) > 0) { ?>
  79. <tr><th>Type of Property</th><th>Value</th></tr>
  80. <?php foreach ($properties as $result) { ?>
  81. <tr><td><?php print $result->type; ?></td>
  82. <td><?php if( $result->value == 't') { print 'TRUE';
  83. } elseif ($result->value == 'f') { print "FALSE";
  84. } else { print $result->value; } ?>
  85. </td></tr>
  86. <?php }
  87. } ?>
  88. </table>
  89. </div></div>
  90. <br>
  91. <?php } ?>
  92. <br>
  93. <!-- Display of External Database entries for the current stock --!>
  94. <?php $references = $node->db_references;
  95. if ( count($references) > 0 ) { ?>
  96. <div id="feature-references" class="tripal_feature-info-box">
  97. <div class="tripal_expandableBox"><h3>External References</h3></div>
  98. <div class="tripal_expandableBoxContent">
  99. <table>
  100. <tr><th>Database</th><th>Accession</th></tr>
  101. <?php foreach($references as $result) { ?>
  102. <tr><td><?php print $result->db_name; ?></td><td>
  103. <?php if ( !empty($result->db_urlprefix) ) {
  104. print l($result->accession, $result->db_urlprefix.$result->accession);
  105. } else {
  106. print $result->accession;
  107. }?>
  108. </td></tr>
  109. <?php } ?>
  110. </table></div></div>
  111. <br>
  112. <?php } ?>
  113. <br>
  114. <!-- Display of Relationships between this stock and other stocks --!>
  115. <?php $o_relationships = $node->object_relationships; ?>
  116. <?php $s_relationships = $node->subject_relationships; ?>
  117. <?php if ( (count($o_relationships) + count($s_relationships)) > 0 ) { ?>
  118. <div id="feature-references" class="tripal_feature-info-box">
  119. <div class="tripal_expandableBox"><h3>Relationships</h3></div>
  120. <div class="tripal_expandableBoxContent">
  121. <table>
  122. <?php if ( count($o_relationships) > 0 ) {
  123. foreach ($o_relationships as $result) { ?>
  124. <tr><td><?php print $node->uniquename; ?></td><td><?php print $result->relationship_type ?></td><td><?php print l($result->object_name, "node/".$result->object_nid); ?></td></tr>
  125. <?php } //end of foreach?>
  126. <? } if ( count($s_relationships) > 0 ) {
  127. foreach ($s_relationships as $result) { ?>
  128. <tr><td><?php print l($result->subject_name, "node/".$result->subject_nid); ?></td><td><?php print $result->relationship_type ?></td><td><?php print $node->uniquename; ?></td></tr>
  129. <?php } //end of foreach
  130. } ?>
  131. </table></div></div>
  132. <br>
  133. <?php } ?>
  134. <br>
  135. <?php } ?> <!-- End of if not Teaser --!>
  136. <!-- Tripal Stock Ends --!>
  137. <?php print $content; ?>
  138. </div>
  139. </div>
  140. <div class="extra-links">
  141. <div class="terms terms-inline"><?php print theme('links', $taxonomy, array('class' => 'links term-links')) ?></div>
  142. <?php print $links; ?>
  143. </div>
  144. </div></div> <!-- /node-inner, /node -->