'. t('Tools for creating and importing dates and calendars.') .'
'; case 'admin/content/date/tools/change': return ''. t('Change a date field from one type to another. Very experimental, use at your own risk!') .'
'; case 'admin/content/date/tools/date_wizard': $disabled_modules = date_tools_wizard_disabled_modules(array('popup', 'repeat', 'linked')); if (!empty($disabled_modules)) { drupal_set_message(t('The following modules are required for the wizard to work:') .''. t('Only a limited set of options are displayed here to make this easy to set up. Once the date has been created you will be able to make other changes to the date settings and add other fields to your new content type on the Manage fields screen, and make changes to the calendar on the Views edit page.') . '
'; return $output; } } function date_tools_perm() { return array('administer date tools'); } function date_tools_menu() { $items = array(); $items['admin/content/date/tools'] = array( 'title' => 'Date Tools', 'description' => 'Tools to import and auto-create dates and calendars.', 'access arguments' => array('administer date tools'), 'page callback' => 'date_tools_page', 'type' => MENU_NORMAL_ITEM, ); $items['admin/content/date/tools/about'] = array( 'title' => 'About', 'description' => 'Tools to import and auto-create dates and calendars.', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -5, 'priority' => 1, 'page callback' => 'date_tools_page', 'access arguments' => array('administer date tools'), ); $items['admin/content/date/tools/date_wizard'] = array( 'title' => 'Date wizard', 'description' => 'Easy creation of date content types and calendars.', 'type' => MENU_LOCAL_TASK, 'weight' => 1, 'priority' => 1, 'page callback' => 'drupal_get_form', 'page arguments' => array('date_tools_wizard_form'), 'access arguments' => array('administer date tools'), 'file' => 'date_tools.wizard.inc', 'path' => drupal_get_path('module', 'date_tools'), ); $items['admin/content/date/tools/import'] = array( 'title' => 'Import', 'access arguments' => array('administer date tools'), 'page callback' => 'drupal_get_form', 'page arguments' => array('date_tools_copy_import_event_form'), 'type' => MENU_LOCAL_TASK, 'weight' => 2, 'file' => 'date_tools.event.inc', 'path' => drupal_get_path('module', 'date_tools'), ); $items['admin/content/date/tools/import/event'] = array( 'title' => 'Event import', 'access arguments' => array('administer date tools'), 'page callback' => 'drupal_get_form', 'page arguments' => array('date_tools_copy_import_event_form'), 'type' => MENU_LOCAL_TASK, 'weight' => 3, 'file' => 'date_tools.event.inc', 'path' => drupal_get_path('module', 'date_tools'), ); $items['date/tools/remove'] = array( 'title' => 'Remove calendar', 'access arguments' => array('administer date tools'), 'page callback' => 'drupal_get_form', 'page arguments' => array('date_tools_remove_form', 3), 'type' => MENU_CALLBACK, ); $items['admin/content/date/tools/change'] = array( 'title' => 'Change', 'access arguments' => array('administer date tools'), 'page callback' => 'drupal_get_form', 'page arguments' => array('date_tools_change_type_form'), 'type' => MENU_LOCAL_TASK, 'weight' => 3, 'file' => 'date_tools.change_type.inc', 'path' => drupal_get_path('module', 'date_tools'), ); return $items; } /** * Main Date Tools page */ function date_tools_page() { $choices = array(); $choices[] = t('Dates and calendars can be complicated to set up. The !date_wizard makes it easy to create a simple date content type and related calendar.', array('!date_wizard' => l(t('Date wizard'), 'admin/content/date/tools/date_wizard'))); $content = '