function calendar_menu

7.x calendar.module calendar_menu()
6.x calendar.module calendar_menu()

implements hook_menu

File

modules/calendar/calendar.module, line 11

Code

function calendar_menu() {
  $items = array();


  $items ['calendar'] = array(
    'title' => 'Appointments',
    'page_callback' => 'calendar_display_calendar',
    'access_arguments' => array('access_logged_in_content'),
    'type' => MENU_TYPE_TAB,
    'tab_family' => 'calendar_tabs',
    "weight" => 10,
  );


  $items ['calendar/upcoming'] = array(
    'title' => 'Upcoming Appointments',
    'page_callback' => 'calendar_display_upcoming_appointments',
    'access_arguments' => array('access_logged_in_content'),
    'type' => MENU_TYPE_TAB,
    'tab_family' => 'calendar_tabs',
    "weight" => 15,
  );



  $items ['calendar/schedule-staff'] = array(
    'title' => 'Schedule Appointments',
    'page_callback' => 'calendar_display_schedule_staff_page',
    'access_callback' => 'fp_user_is_student',
    'type' => MENU_TYPE_TAB,
    'tab_family' => 'calendar_tabs',
    "weight" => 50,
  );


  //calendar/confirm-cancel-appointment/$content->cid
  $items ['calendar/confirm-cancel-appointment/%'] = array(
    'title' => 'Confirm Cancel Appointment',
    'page_callback' => 'fp_render_form',
    'page_arguments' => array('calendar_confirm_cancel_appointment_form', '', 2),
    'access_callback' => 'calendar_access_can_cancel_appointment',
    'access_arguments' => array(2),
  );



  $items ['schedule-appointment/%'] = array(
    'title' => 'Schedule Appointment',
    'page_callback' => 'calendar_display_schedule_appointment_page',
    'page_arguments' => array(1),
    'access_callback' => TRUE,
    'type' => MENU_TYPE_NORMAL_ITEM,
  );


  $items ['schedule-appointment/%/confirm'] = array(
    'title' => 'Confirm Appointment',
    'page_callback' => 'fp_render_form',
    'page_arguments' => array('calendar_schedule_appointment_confirm_form', 'normal', 1),
    'access_callback' => TRUE,
    'type' => MENU_TYPE_NORMAL_ITEM,
  );


  $items ['schedule-appointment-completed/%'] = array(
    'title' => t('Appointment Scheduled Successfully'),
    'page_callback' => 'calendar_display_schedule_appointment_completed_page',
    'page_arguments' => array(1),
    'access_callback' => TRUE,
    'type' => MENU_TYPE_NORMAL_ITEM,
  );







  $items ['user-settings/appointment-settings'] = array(
    'title' => t('Appointment Settings'),
    'page_callback' => 'calendar_display_user_appointment_settings_page',
    'access_arguments' => array('can_accept_appointments'),
    'type' => MENU_TYPE_TAB,
    'tab_family' => 'user_settings',
    'weight' => 10,
  );




  $items ['admin/config/appointments'] = array(
    'title' => 'Appointment settings',
    'description' => 'Configure global appointment settings',
    'page_callback' => 'fp_render_form',
    'page_arguments' => array('calendar_appointment_settings_form', 'system_settings'),
    'access_arguments' => array('administer_appointment_settings'),
    "page_settings" => array(
      "page_show_title" => TRUE,
      "menu_icon" => fp_get_module_path('system') . "/icons/calendar_view_day.png",
      "menu_links" => array(
        0 => array(
          "text" => "Admin Console",
          "path" => "admin-tools/admin",
          "query" => "de_catalog_year=%DE_CATALOG_YEAR%",
        ),
      ),
    ),
    'type' => MENU_TYPE_NORMAL_ITEM,
    "tab_parent" => "admin-tools/admin",
  );






  return $items;
}