tripal_chado_views_search_biological_content.tpl.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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'] ] == FALSE)) { ?>
  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 (Administer ->
  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. "Developers: To add a view or other search tool to the above list you need to
  29. implement hook_search_biological_data_views() in your custom module.
  30. This hook should return an array as follows: <code><pre>array(
  31. '[view-machine-name]' => array(
  32. 'machine_name' => '[view-machine-name]',
  33. 'human_name' => '[Human-readable title to show in above list]',
  34. 'description' => '[description to show in above list]',
  35. 'link' => '[path to the view]'
  36. ),
  37. );</pre></code>
  38. Where you should replace all instructions in square-brackets([]) with the details of your view.",
  39. TRIPAL_INFO,
  40. array('return_html' => 1)
  41. );
  42. // Tell Tripal Admin which template to change
  43. print tripal_set_message(
  44. "Administrators, you can customize the way the content above is presented. Tripal
  45. provides a template file for each block of content. To customize, copy the template
  46. file to your site's default theme, edit then " .
  47. l('clear the Drupal cache', 'admin/config/development/performance', array('attributes' => array('target' => '_blank'))) .
  48. ". Currently, the content above is provided by this template: <br><br>$template_file",
  49. TRIPAL_INFO,
  50. array('return_html' => 1)
  51. );
  52. ?>