12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- ?>
- <?php
- $node = tripal_core_expand_chado_vars($node, 'table', 'stock_dbxref');
- $db_references = $node->stock->stock_dbxref;
- if (!$db_references) {
- $db_references = array();
- } elseif (!is_array($db_references)) {
- $db_references = array($db_references);
- }
- ?>
- <?php
-
-
- ?>
- <div id="tripal_stock-references-box" class="tripal_stock-info-box tripal-info-box">
- <div class="tripal_stock-info-box-title tripal-info-box-title">References</div>
- <div class="tripal_stock-info-box-desc tripal-info-box-desc">The stock '<?php print $node->stock->name ?>' is also available at these locations</div>
- <?php if(count($db_references) > 0){ ?>
- <table class="tripal_stock-table tripal-table tripal-table-horz">
- <tr>
- <th>Dababase</th>
- <th>Accession</th>
- </tr>
- <?php
- $i = 0;
- foreach ($db_references as $result){
- $dbxref = $result->dbxref_id;
- $class = 'tripal_stock-table-odd-row tripal-table-odd-row';
- if($i % 2 == 0 ){
- $class = 'tripal_stock-table-odd-row tripal-table-even-row';
- }
- ?>
- <tr class="<?php print $class ?>">
- <td><?php print $dbxref->db_id->name?></td>
- <td><?php
- if($dbxref->db_id->urlprefix){
- print l($dbxref->accession, $dbxref->db_id->urlprefix.$dbxref->accession);
- } else {
- print $dbxref->accession;
- }
- ?>
- </td>
- </tr>
- <?php
- $i++;
- } ?>
- </table>
- <?php } else {
- print '<div class="tripal-no-results">There are no external database references for the current stock.</div>';
- }?>
- </div>
|