tripal_views_search_biological_content.tpl.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. *
  4. */
  5. $biological_views = module_invoke_all('search_biological_data_views');
  6. $disabled_views = variable_get('views_defaults', array());
  7. ?>
  8. <p>Use the following to search the various types of biological content available by
  9. this site:</p>
  10. <DL>
  11. <?php foreach ($biological_views as $view) { ?>
  12. <?php if (!isset($disabled_views[ $view['machine_name'] ]) OR ($disabled_views[ $view['machine_name'] ] == TRUE)) { ?>
  13. <DT><?php print l($view['human_name'], $view['link']); ?></DT>
  14. <DD><?php print $view['description']; ?></DD>
  15. <?php }} ?>
  16. </DL>
  17. <?php
  18. // How to disable/remove views from this list
  19. print tripal_set_message(
  20. "To remove a view from this list, simply navigate to the Views UI (Adminster ->
  21. Structure -> Views; admin/structure/views) and choose 'disable' from the action
  22. drop-down to the right of the view you would like to remove.",
  23. TRIPAL_INFO,
  24. array('return_html' => 1)
  25. );
  26. // Tell Tripal admin how to add views to this list
  27. print tripal_set_message(
  28. "In order to add views to the above list you need to implement hook_search_biological_data_views().
  29. This hook should return an array as follows: <code><pre>array(
  30. '[view-machine-name]' => array(
  31. 'machine_name' => '[view-machine-name]',
  32. 'human_name' => '[Human-readable title to show in above list]',
  33. 'description' => '[description to show in above list]',
  34. 'link' => '[path to the view]'
  35. ),
  36. );</pre></code>
  37. Where you should replace all instructions in square-brackets([]) with the details of your view.",
  38. TRIPAL_INFO,
  39. array('return_html' => 1)
  40. );
  41. // Tell Tripal Admin which template to change
  42. print tripal_set_message(
  43. "Administrators, you can customize the way the content above is presented. Tripal
  44. provides a template file for each block of content. To customize, copy the template
  45. file to your site's default theme, edit then " .
  46. l('clear the Drupal cache', 'admin/config/development/performance', array('attributes' => array('target' => '_blank'))) .
  47. ". Currently, the content above is provided by this template: <br><br>$template_file",
  48. TRIPAL_INFO,
  49. array('return_html' => 1)
  50. );
  51. ?>