node-chado_feature.tpl.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. // Purpose: This template provides the layout of the feature node (page)
  3. // using the same templates used for the various feature content blocks.
  4. //
  5. // To Customize the Featture Node Page:
  6. // - This Template: customize basic layout and which elements are included
  7. // - Using Panels: Override the node page using Panels3 and place the blocks
  8. // of content as you please. This method requires no programming. See
  9. // the Tripal User Guide for more details
  10. // - Block Templates: customize the content/layout of each block of stock
  11. // content. These templates are found in the tripal_stock subdirectory
  12. //
  13. // Variables Available:
  14. // - $node: a standard object which contains all the fields associated with
  15. // nodes including nid, type, title, taxonomy. It also includes stock
  16. // specific fields such as stock_name, uniquename, stock_type, synonyms,
  17. // properties, db_references, object_relationships, subject_relationships,
  18. // organism, etc.
  19. // NOTE: For a full listing of fields available in the node object the
  20. // print_r $node line below or install the Drupal Devel module which
  21. // provides an extra tab at the top of the node page labelled Devel
  22. ?>
  23. <?php
  24. //uncomment this line to see a full listing of the fields avail. to $node
  25. //print '<pre>'.print_r($variables,TRUE).'</pre>';
  26. $feature = $variables['node']->feature;
  27. ?>
  28. <script type="text/javascript">
  29. if (Drupal.jsEnabled) {
  30. $(document).ready(function() {
  31. // hide all tripal info boxes at the start
  32. $(".tripal-info-box").hide();
  33. // iterate through all of the info boxes and add their titles
  34. // to the table of contents
  35. $(".tripal-info-box-title").each(function(){
  36. var parent = $(this).parent();
  37. var id = $(parent).attr('id');
  38. var title = $(this).text();
  39. $('#tripal_feature_toc_list').append('<li><a href="#'+id+'" class="tripal_feature_toc_item">'+title+'</a></li>');
  40. });
  41. // when a title in the table of contents is clicked, then
  42. // show the corresponding item in the details box
  43. $(".tripal_feature_toc_item").click(function(){
  44. $(".tripal-info-box").hide();
  45. href = $(this).attr('href');
  46. $(href).fadeIn('slow');
  47. // we want to make sure our table of contents and the details
  48. // box stay the same height
  49. $("#tripal_feature_toc").height($(href).parent().height());
  50. return false;
  51. });
  52. // we want the base details to show up when the page is first shown
  53. $("#tripal_feature-base-box").show();
  54. $("#tripal_organism_toc").height($("#tripal_feature-base-box").parent().height());
  55. });
  56. }
  57. </script>
  58. <style type="text/css">
  59. /* these styles are specific for this template and is not included
  60. in the main CSS files for the theme as it is anticipated that the
  61. elements on this page may not be used for other customizations */
  62. #tripal_feature_toc {
  63. float: left;
  64. width: 350px;
  65. background-color: #EEEEEE;
  66. -moz-border-radius: 15px;
  67. border-radius: 15px;
  68. -moz-box-shadow: 3px 3px 4px #000;
  69. -webkit-box-shadow: 3px 3px 4px #000;
  70. box-shadow: 3px 3px 4px #000;
  71. padding: 20px;
  72. min-height: 500px;
  73. border-style:solid;
  74. border-width:1px;
  75. }
  76. #tripal_feature_toc ul {
  77. margin-left: 0px;
  78. margin-top: 5px;
  79. padding-left: 15px;
  80. }
  81. #tripal_feature_toc_title {
  82. font-size: 1.5em;
  83. }
  84. #tripal_feature_toc_desc {
  85. font-style: italic;
  86. }
  87. #tripal_feature_details {
  88. float: left;
  89. width: 650px;
  90. background-color: #FFFFFF;
  91. -moz-border-radius: 15px;
  92. border-radius: 15px;
  93. -moz-box-shadow: 3px 3px 4px #000;
  94. -webkit-box-shadow: 3px 3px 4px #000;
  95. box-shadow: 3px 3px 4px #000;
  96. padding: 20px;
  97. min-height: 500px;
  98. margin-right: 10px;
  99. border-style:solid;
  100. border-width:1px;
  101. }
  102. </style>
  103. <div id="tripal_feature_details">
  104. <!-- Basic Details Theme -->
  105. <?php include('tripal_feature/tripal_feature_base.tpl.php'); ?>
  106. <!-- Database References -->
  107. <?php include('tripal_feature/tripal_feature_references.tpl.php'); ?>
  108. <!-- Properties -->
  109. <?php include('tripal_feature/tripal_feature_properties.tpl.php'); ?>
  110. <!-- Synonyms -->
  111. <?php include('tripal_feature/tripal_feature_synonyms.tpl.php'); ?>
  112. <!-- Sequence -->
  113. <?php include('tripal_feature/tripal_feature_sequence.tpl.php'); ?>
  114. <!-- Formatted Sequences -->
  115. <?php include('tripal_feature/tripal_feature_featureloc_sequences.tpl.php'); ?>
  116. <!-- Object Relationships -->
  117. <?php include('tripal_feature/tripal_feature_relationships_as_object.tpl.php'); ?>
  118. <!-- Subject Relationships -->
  119. <?php include('tripal_feature/tripal_feature_relationships_as_subject.tpl.php'); ?>
  120. <!-- Feature locations as Child -->
  121. <?php include('tripal_feature/tripal_feature_featurelocs_as_child.tpl.php'); ?>
  122. <!-- Subject Relationships -->
  123. <?php include('tripal_feature/tripal_feature_featurelocs_as_parent.tpl.php'); ?>
  124. <!-- Blast Results -->
  125. <?php include('tripal_analysis_blast/tripal_analysis_blast_results.tpl.php'); ?>
  126. <!-- InterProScan Results -->
  127. <?php include('tripal_analysis_interpro/tripal_analysis_interpro_results.tpl.php'); ?>
  128. <?php print $content ?>
  129. </div>
  130. <!-- Table of contents -->
  131. <div id="tripal_feature_toc">
  132. <div id="tripal_feature_toc_title"><?php print $feature->featurename ?> Resources</div>
  133. <span id="tripal_feature_toc_desc">Select a link below for more information</span>
  134. <ul id="tripal_feature_toc_list">
  135. </ul>
  136. </div>