You are here

function library_menu in Library 6.2

Same name and namespace in other branches
  1. 5.2 library.module \library_menu()
  2. 6 library.module \library_menu()
  3. 7 library.module \library_menu()

Implementation of hook_menu().

File

./library.module, line 456

Code

function library_menu() {
  $items['library-items'] = array(
    'title' => 'Library',
    'page callback' => 'library_display_items',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_SUGGESTED_ITEM,
    'file' => 'library.pages.inc',
  );
  $items['node/%node/library/history'] = array(
    'title' => 'History',
    'page callback' => 'library_history',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'view library history',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'library.pages.inc',
  );
  $items['user/%user/library/history'] = array(
    'title' => 'History',
    'page callback' => 'library_history_user',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'library_history_user_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'library.pages.inc',
  );
  $items['library-items/transaction/view/%'] = array(
    'title' => 'View a Transaction',
    'page callback' => 'library_transaction_view',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'administer transactions',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.pages.inc',
  );
  $items['library-items/transaction/%/%library'] = array(
    'title' => 'Perform a Library Transaction',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'library_transaction_form',
      2,
      3,
    ),
    'access callback' => 'library_action_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.pages.inc',
  );
  $items['library-items/overdue'] = array(
    'title' => 'Overdue Items',
    'page callback' => 'library_overdue_items',
    'access arguments' => array(
      'administer transactions',
    ),
    'type' => MENU_SUGGESTED_ITEM,
    'file' => 'library.pages.inc',
  );
  $items['library-items/overdue/email'] = array(
    'title' => 'Email patrons with overdue items',
    'page callback' => 'library_notify_overdue',
    'access arguments' => array(
      'administer transactions',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.admin.inc',
  );
  $items['admin/settings/library'] = array(
    'title' => 'Library Settings',
    'description' => 'Edit Library Settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'library_admin_settings',
    ),
    'access arguments' => array(
      'administer library',
    ),
    'file' => 'library.admin.inc',
  );
  $items['admin/settings/library/display'] = array(
    'title' => 'Display',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/settings/library/duedates'] = array(
    'title' => 'Loan Periods',
    'description' => 'Enable loan periods for checkouts and configure overdue emails.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'library_admin_settings_overdue',
    ),
    'access arguments' => array(
      'administer library',
    ),
    'file' => 'library.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/settings/library/actions'] = array(
    'title' => 'Library Actions',
    'description' => 'View, edit, or add library actions.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'library_admin_new_action',
    ),
    'access arguments' => array(
      'administer library',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'library.admin.inc',
  );
  $items['admin/settings/library/actions/edit'] = array(
    'title' => 'Edit Library Action',
    'page arguments' => array(
      'library_admin_action',
    ),
    'access arguments' => array(
      'administer library',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.admin.inc',
  );
  $items['library-items/autocomplete'] = array(
    'title' => t('Library Autocomplete'),
    'page callback' => 'library_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.admin.inc',
  );
  $items['library/js'] = array(
    'title' => 'Javascript Add More Form',
    'page callback' => 'library_item_js',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['library/title_js'] = array(
    'title' => 'Javascript Title Validation',
    'page callback' => 'library_title_js',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['patrons/autocomplete'] = array(
    'title' => 'Patron Autocomplete',
    'page callback' => 'library_patron_autocomplete',
    'access arguments' => array(
      'access user profiles',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}