spficklin před 13 roky
rodič
revize
73122ac047

+ 43 - 47
theme_tripal/tripal_organism/tripal_organism_feature_browser.tpl.php

@@ -1,53 +1,49 @@
 <?php
 $organism = $variables['node']->organism;
-$features = $variables['tripal_feature']['browser']['features'];
-$pager = $variables['tripal_feature']['browser']['pager'];
-$enabled = $variables['tripal_feature']['browser']['enabled'];
+$features = $organism->feature_browser['features'];
+$pager    = $organism->feature_browser['pager'];
+$enabled  = $organism->feature_browser['enabled'];
 
-if($enabled){
-?>
-<div id="tripal_organism-feature_browser-box" class="tripal_organism-info-box tripal-info-box">
-  <div class="tripal_organism-info-box-title tripal-info-box-title">Feature Browser</div>
-  <div class="tripal_organism-info-box-desc tripal-info-box-desc">The following browser provides a quick view for new visitors.  Use the searching mechanism to find specific features.</div>
-   <?php if(count($features) > 0){ ?>
-   <table id="tripal_organism-table-feature_browser" class="tripal_organism-table tripal-table tripal-table-horz">     
-      <tr class="tripal_organism-table-odd-row tripal-table-even-row">
-        <th>Feature Name</th>
-        <th>Unique Name</th>
-        <th>Type</th>
-      </tr>
-      <?php
-      foreach ($features as $feature){ 
-      $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
-      if($i % 2 == 0 ){
-         $class = 'tripal_organism-table-odd-row tripal-table-even-row';
-      }
-      ?>
-      <tr class="<?php print $class ?>">
-        <td><?php 
-           if($feature->nid){    
-              $link =   url("node/$feature->nid");        
-              print "<a href=\"$link\">$feature->name</a>";
-           } else {
-              print $feature->name;
-           }
-           ?>
-        </td>
-        <td><?php print $feature->uniquename?></td>
-        <td><?php print $feature->cvname?></td>
-      </tr>
-      <?php
-      $i++;  
-    } ?>
-   </table>
-  <?php } else {?>
-    <div class="tripal-no-results">There are no features available for browsing</div> 
-  <?php }?>
-  <?php print $pager ?>
-</div>
-<?php 
-} 
-?>
+if($enabled){ ?>
+   <div id="tripal_organism-feature_browser-box" class="tripal_organism-info-box tripal-info-box">
+     <div class="tripal_organism-info-box-title tripal-info-box-title">Feature Browser</div>
+     <div class="tripal_organism-info-box-desc tripal-info-box-desc">The following browser provides a quick view for new visitors.  Use the searching mechanism to find specific features.</div>
+     <?php 
+     if(count($features) > 0){ ?>
+       <table id="tripal_organism-table-feature_browser" class="tripal_organism-table tripal-table tripal-table-horz">     
+         <tr class="tripal_organism-table-odd-row tripal-table-even-row">
+           <th>Feature Name</th>
+           <th>Unique Name</th>
+           <th>Type</th>
+         </tr>
+         <?php
+         foreach ($features as $feature){ 
+           $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
+           if($i % 2 == 0 ){
+             $class = 'tripal_organism-table-odd-row tripal-table-even-row';
+           } ?>
+           <tr class="<?php print $class ?>">
+             <td><?php 
+               if($feature->nid){    
+                 $link =   url("node/$feature->nid");        
+                 print "<a href=\"$link\">$feature->name</a>";
+               } else {
+                 print $feature->name;
+               }?>
+             </td>
+             <td><?php print $feature->uniquename?></td>
+             <td><?php print $feature->cvname?></td>
+           </tr><?php
+           $i++;  
+         } ?>
+       </table><?php 
+     } 
+     else {?>
+       <div class="tripal-no-results">There are no features available for browsing</div> <?php 
+     }
+     print $pager ?>
+   </div> <?php 
+} ?>
 
 
 

+ 32 - 38
theme_tripal/tripal_organism/tripal_organism_feature_counts.tpl.php

@@ -1,44 +1,38 @@
 <?php
 $organism = $variables['node']->organism;
-$types = $variables['tripal_feature']['feature_counts']['types'];
-$enabled = $variables['tripal_feature']['feature_counts']['enabled'];
+$types    = $organism->feature_counts['types'];
+$enabled  = $organism->feature_counts['enabled'];
 
-
-if($enabled){
-?>
-<div id="tripal_organism-feature_counts-box" class="tripal_organism-info-box tripal-info-box">
-  <div class="tripal_organism-info-box-title tripal-info-box-title">Feature Type Summary</div>
-  <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>
-   <?php if(count($types) > 0){ ?>
-   <table id="tripal_organism-table-feature_counts" class="tripal_organism-table tripal-table tripal-table-horz">     
-      <tr class="tripal_organism-table-odd-row tripal-table-even-row">
-        <th>Feature Type</th>
-        <th>Count</th>
-      </tr>
-      <?php
-      foreach ($types as $type){ 
-      $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
-      if($i % 2 == 0 ){
-         $class = 'tripal_organism-table-odd-row tripal-table-even-row';
-      }
-      ?>
-      <tr class="<?php print $class ?>">
-        <td><span title="<?php print $type->definition ?>"><?php print $type->feature_type?></span></td>
-        <td><?php print number_format($type->num_features) ?></td>
-      </tr>
-      <?php
-      $i++;  
-    } ?>
-   </table>
-   <img class="tripal_cv_chart" id="tripal_feature_cv_chart_<?php print $organism->organism_id?>" src="" border="0">
-  <?php } else {?>
-    <div class="tripal-no-results">There are no features available.</div> 
-  <?php }?>
-  <?php print $pager ?>
-</div>
-<?php 
-} 
-?>
+if($enabled){ ?>
+   <div id="tripal_organism-feature_counts-box" class="tripal_organism-info-box tripal-info-box">
+     <div class="tripal_organism-info-box-title tripal-info-box-title">Data Type Summary</div>
+     <div class="tripal_organism-info-box-desc tripal-info-box-desc">The following data types are currently present for this organism</div>
+     <?php 
+     if(count($types) > 0){ ?>
+       <table id="tripal_organism-table-feature_counts" class="tripal_organism-table tripal-table tripal-table-horz">     
+         <tr class="tripal_organism-table-odd-row tripal-table-even-row">
+           <th>Feature Type</th>
+           <th>Count</th>
+         </tr> <?php
+         foreach ($types as $type){ 
+           $class = 'tripal_organism-table-odd-row tripal-table-odd-row';
+           if($i % 2 == 0 ){
+             $class = 'tripal_organism-table-even-row tripal-table-even-row';
+           }?>
+           <tr class="<?php print $class ?>">
+             <td><span title="<?php print $type->definition ?>"><?php print $type->feature_type?></span></td>
+             <td><?php print number_format($type->num_features) ?></td>
+           </tr> <?php
+           $i++;  
+         } ?>
+       </table>
+       <img class="tripal_cv_chart" id="tripal_feature_cv_chart_<?php print $organism->organism_id?>" src="" border="0"><?php 
+     } 
+     else { ?>
+       <div class="tripal-no-results">There are no features available.</div> <?php 
+     }?>
+   </div> <?php 
+} ?>