You are here

function library_menu in Library 7

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

Implements hook_menu().

File

./library.module, line 397

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_single_user',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'library_may_view_history',
    '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_may_perform_action',
    '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/config/workflow/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/config/workflow/library/display'] = array(
    'title' => 'Display',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/workflow/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/config/workflow/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/config/workflow/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' => 'Library Autocomplete',
    'page callback' => 'library_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'library.admin.inc',
  );
  $items['library-items/patrons/autocomplete'] = array(
    'title' => 'Patron Autocomplete',
    'page callback' => 'library_patron_autocomplete',
    'access arguments' => array(
      'access user profiles',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}