You are here

function data_ui_help in Data 7

Same name and namespace in other branches
  1. 6 data_ui/data_ui.module \data_ui_help()

Implements hook_help().

File

data_ui/data_ui.module, line 10
Hooks and API functions for Data UI module.

Code

function data_ui_help($path, $arg) {
  $no_primary_key_text = '<p>' . t("Some tables may not have a 'view' link; this happens when a table doesn't have a primary key or is not joined to another table with a primary key. You can add a primary key field or a join from the table's 'Edit schema' page.") . '</p>';
  switch ($path) {
    case 'admin/content/data':
      $output = '<p>' . t('View content in data tables. If you would like to edit these tables, visit the !data_manage_page.', array(
        '!data_manage_page' => l(t('Data table management page'), 'admin/structure/data'),
      )) . '</p>';
      $output .= $no_primary_key_text;
      return $output;
    case 'admin/structure/data/adopt':
      $output = '<p>' . t('Manage database tables that aren\'t claimed by other modules. Adopting tables listed here will add them to Data\'s list of tables.') . '</p>';
      return $output;
    case 'admin/structure/data':
      if (module_exists('views')) {
        $output = '<p>' . t('Manage data tables. If you would like to view the content of these tables, visit the !data_view_page.', array(
          '!data_view_page' => l(t('Data table content page'), 'admin/content/data'),
        )) . '</p>';
        $output .= $no_primary_key_text;
      }
      else {
        $output = '<p>' . t('Manage data tables.') . '</p>';
      }
      return $output;
  }
}