You are here

function casetracker_menu in Case Tracker 7

Same name and namespace in other branches
  1. 5 casetracker.module \casetracker_menu()
  2. 6 casetracker.module \casetracker_menu()
  3. 7.2 casetracker.module \casetracker_menu()

Implements hook_menu().

File

./casetracker.module, line 75
Enables the handling of projects and their cases.

Code

function casetracker_menu() {

  /* casetracker main settings */
  $items['admin/config/casetracker'] = array(
    'title' => 'Case Tracker',
    'description' => 'Administer and configure Case Tracker',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'access administration pages',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/casetracker/settings'] = array(
    'title' => 'Case Tracker settings',
    'description' => 'Configuration of Case Tracker',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'casetracker_settings',
    ),
    'access arguments' => array(
      'administer case tracker',
    ),
    'file' => 'casetracker_admin.inc',
  );
  $items['admin/config/casetracker/settings/overview'] = array(
    'title' => 'Case Tracker',
    'description' => 'Configuration of Case Tracker main options',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/casetracker/settings/states'] = array(
    'title' => 'Case states',
    'description' => 'Add, edit and delete Case States, Types and Priorities',
    'page callback' => 'casetracker_case_state_overview',
    'access arguments' => array(
      'administer case tracker',
    ),
    'file' => 'casetracker_admin.inc',
    'type' => MENU_LOCAL_TASK,
  );

  /* casetracker state handling */
  $items['admin/config/casetracker/settings/states/list'] = array(
    'title' => 'Overview',
    'description' => 'Add, edit and delete Case States, Types and Priorities',
    'page callback' => 'casetracker_case_state_overview',
    'access arguments' => array(
      'administer case tracker',
    ),
    'file' => 'casetracker_admin.inc',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/casetracker/settings/states/add'] = array(
    'title' => 'Add case state',
    'page callback' => 'drupal_get_form',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page arguments' => array(
      'casetracker_case_state_edit',
    ),
    'file' => 'casetracker_admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/casetracker/states/edit/%casetracker_case_state'] = array(
    'title' => 'Edit case state',
    'page callback' => 'drupal_get_form',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page arguments' => array(
      'casetracker_case_state_edit',
      5,
    ),
    'file' => 'casetracker_admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/casetracker/states/delete/%casetracker_case_state'] = array(
    'title' => 'Delete case state',
    'page callback' => 'drupal_get_form',
    'access arguments' => array(
      'administer case tracker',
    ),
    'page arguments' => array(
      'casetracker_case_state_confirm_delete',
      5,
    ),
    'file' => 'casetracker_admin.inc',
    'type' => MENU_CALLBACK,
  );

  /* casetracker autocomplete */
  $items['casetracker_autocomplete'] = array(
    'title' => 'Case Tracker autocomplete',
    'page callback' => 'casetracker_autocomplete',
    'access callback' => 'user_access',
    'access arguments' => array(
      'assign cases',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}