tripal_contact.admin.inc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /**
  3. * @file
  4. * Handle administration of contacts.
  5. *
  6. * @ingroup tripal_contact
  7. */
  8. /**
  9. * Launchpage for contact administration. Makes sure views are enabled and if not provides
  10. * links to enable them.
  11. *
  12. * @ingroup tripal_contact
  13. */
  14. function tripal_contact_admin_contact_view() {
  15. $output = '';
  16. // set the breadcrumb
  17. $breadcrumb = array();
  18. $breadcrumb[] = l('Home', '<front>');
  19. $breadcrumb[] = l('Administration', 'admin');
  20. $breadcrumb[] = l('Tripal', 'admin/tripal');
  21. $breadcrumb[] = l('Chado', 'admin/tripal/chado');
  22. $breadcrumb[] = l('Contacts', 'admin/tripal/chado/tripal_contact');
  23. drupal_set_breadcrumb($breadcrumb);
  24. // Add the view
  25. $view = views_embed_view('tripal_contact_admin_contacts','default');
  26. if (isset($view)) {
  27. $output .= $view;
  28. }
  29. else {
  30. $output .= '<p>The Contact module uses primarily views to provide an '
  31. . 'administrative interface. Currently one or more views needed for this '
  32. . 'administrative interface are disabled. <strong>Click each of the following links to '
  33. . 'enable the pertinent views</strong>:</p>';
  34. $output .= '<ul>';
  35. $output .= '<li>'.l('Contacts View', 'admin/tripal/chado/tripal_contact/views/contacts/enable').'</li>';
  36. $output .= '</ul>';
  37. }
  38. return $output;
  39. }
  40. /**
  41. * Administrative settings form
  42. *
  43. * @ingroup tripal_contact
  44. */
  45. function tripal_contact_admin() {
  46. $form = array();
  47. $form['nothing'] = array(
  48. '#markup' => t('There are currently no settings to configure.')
  49. );
  50. return system_settings_form($form);
  51. }
  52. /**
  53. * Reindex nodes for drupal search
  54. *
  55. * @ingroup tripal_contact
  56. */
  57. function get_tripal_contact_admin_form_reindex_set(&$form) {
  58. }
  59. /**
  60. * Validate the contact settings form.
  61. *
  62. * @ingroup tripal_contact
  63. */
  64. function tripal_contact_admin_validate($form, &$form_state) {
  65. }