| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 | 
							- <?php
 
- // Purpose: This template provides the layout of the featuremap node (page)
 
- //   using the same templates used for the various featuremap content blocks.
 
- //
 
- // To Customize the Libray Node Page:
 
- //   - This Template: customize basic layout and which elements are included
 
- //   - Using Panels: Override the node page using Panels3 and place the blocks
 
- //       of content as you please. This method requires no programming. See
 
- //       the Tripal User Guide for more details
 
- //   - Block Templates: customize the content/layout of each block of stock 
 
- //       content. These templates are found in the tripal_stock subdirectory
 
- //
 
- // Variables Available:
 
- //   - $node: a standard object which contains all the fields associated with
 
- //       nodes including nid, type, title, taxonomy. It also includes stock
 
- //       specific fields such as stock_name, uniquename, stock_type, synonyms,
 
- //       properties, db_references, object_relationships, subject_relationships,
 
- //       organism, etc.
 
- //   NOTE: For a full listing of fields available in the node object the
 
- //       print_r $node line below or install the Drupal Devel module which 
 
- //       provides an extra tab at the top of the node page labelled Devel
 
- $featuremap  = $variables['node']->featuremap;
 
- // get the template settings
 
- $template_settings = theme_get_setting('tripal');
 
- // toggle the sidebar if desired
 
- $no_sidebar = 0;
 
- if (is_array($template_settings['tripal_no_sidebar']) and 
 
-    $template_settings['tripal_no_sidebar']['featuremap']) {
 
-   $no_sidebar = 1;
 
- }
 
- if ($teaser) { 
 
-   print theme('tripal_featuremap_teaser',$variables); 
 
- } 
 
- else { ?>
 
- <script type="text/javascript">
 
- (function ($) {
 
-   Drupal.behaviors.featuremapBehavior = {
 
-     attach: function (context, settings){ <?php 
 
-       if ($no_sidebar) { ?>    
 
-         // hide the resource side bar and strech the details section    
 
-         $(".tripal_toc").hide();
 
-         $(".tripal_details").addClass("tripal_details_full");
 
-         $(".tripal_details_full").removeClass("tripal_details"); <?php
 
-       } else { ?>
 
-         // use default resource sidebar
 
-         $(".tripal-info-box").hide(); <?php
 
-       } ?>
 
-  
 
-       // iterate through all of the info boxes and add their titles
 
-       // to the table of contents
 
-       $(".tripal-info-box-title").each(function(){
 
-         var parent = $(this).parent();
 
-         var id = $(parent).attr('id');
 
-         var title = $(this).text();
 
-         $('#tripal_featuremap_toc_list').append('<li><a href="#'+id+'" class="tripal_featuremap_toc_item">'+title+'</a></li>');
 
-       });
 
-       // when a title in the table of contents is clicked, then
 
-       // show the corresponding item in the details box
 
-       $(".tripal_featuremap_toc_item").click(function(){
 
-          $(".tripal-info-box").hide();
 
-          href = $(this).attr('href');
 
-          $(href).fadeIn('slow');
 
-          // we want to make sure our table of contents and the details
 
-          // box stay the same height
 
-          $("#tripal_featuremap_toc").height($(href).parent().height());
 
-          return false;
 
-       }); 
 
-       // we want the base details to show up when the page is first shown 
 
-       // unless the user specified a specific block
 
-       var block = window.location.href.match(/[\?|\&]block=(.+?)\&/)
 
-       if(block == null){
 
-          block = window.location.href.match(/[\?|\&]block=(.+)/)
 
-       }
 
-       if(block != null){
 
-          $("#tripal_featuremap-"+block[1]+"-box").show();
 
-       } else {
 
-          $("#tripal_featuremap-base-box").show();
 
-       }
 
-       $("#tripal_featuremap_toc").height($("#tripal_featuremap-base-box").parent().height());
 
-     }     
 
-   };
 
- })(jQuery);
 
- </script>
 
- <div id="tripal_featuremap_details" class="tripal_details">
 
-    <!-- Basic Details Theme -->
 
-    <?php print theme('tripal_featuremap_base',$node); ?>
 
-    
 
-    <!-- Map Features -->
 
-    <?php print theme('tripal_featuremap_featurepos',$node); ?>
 
-    <!-- Properties -->
 
-    <?php print theme('tripal_featuremap_properties',$node); ?>
 
-    
 
-    <!-- Publications -->
 
-    <?php print theme('tripal_featuremap_publications',$node); ?>
 
-    
 
-    <!-- Cross References -->
 
-    <?php print theme('tripal_featuremap_references',$node); ?>
 
-    <!-- Resource Blocks CCK elements --><?php
 
-    for($i = 0; $i < count($node->field_resource_titles); $i++){
 
-      if($node->field_resource_titles[$i]['value']){ ?>
 
-        <div id="tripal_featuremap-resource_<?php print $i?>-box" class="tripal_featuremap-info-box tripal-info-box">
 
-          <div class="tripal_featuremap-info-box-title tripal-info-box-title"><?php print $node->field_resource_titles[$i]['value'] ?></div>
 
-          <?php print $node->field_resource_blocks[$i]['value']; ?>
 
-        </div><?php
 
-      }
 
-    }?>
 
-    
 
-    <!-- Let modules add more content -->
 
-    <?php print $content ?>
 
- </div>
 
- <!-- Table of contents -->
 
- <div id="tripal_featuremap_toc" class="tripal_toc">
 
-    <div id="tripal_featuremap_toc_title" class="tripal_toc_title">Resources</div>
 
-    <ul id="tripal_featuremap_toc_list" class="tripal_toc_list">
 
-    
 
-      <!-- Resource Links CCK elements --><?php
 
-      for($i = 0; $i < count($node->field_resource_links); $i++){
 
-        if($node->field_resource_links[$i]['value']){
 
-          $matches = preg_split("/\|/",$node->field_resource_links[$i]['value']);?>
 
-          <li><a href="<?php print $matches[1] ?>" target="_blank"><?php print $matches[0] ?></a></li><?php
 
-        }
 
-      }?>
 
-      
 
-      <?php // ADD CUSTOMIZED <li> LINKS HERE ?>
 
-    </ul>
 
- </div>
 
- <?php } ?>
 
 
  |