You are here

function fusion_apply_ui_menu in Fusion Accelerator 7

Same name and namespace in other branches
  1. 7.2 fusion_apply/fusion_apply_ui.module \fusion_apply_ui_menu()

Implements hook_menu().

File

fusion_apply/fusion_apply_ui.module, line 29
Handles Fusion Apply UI functionality allowing users to apply skins to their site.

Code

function fusion_apply_ui_menu() {
  $items['admin/appearance/fusion'] = array(
    'title' => 'Fusion Accelerator',
    'description' => 'Manage site skins and customize your Fusion grid.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_list',
    ),
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/appearance/fusion/list'] = array(
    'title' => 'Applied skins',
    'description' => t('Manage Fusion skin configurations.'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );

  // Themes.
  $items['admin/appearance/fusion/skins'] = array(
    'title' => 'Skin library',
    'description' => 'Manage which skins are available when applying a skin configuration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_admin_skin_infos',
    ),
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/appearance/fusion/skins/select'] = array(
    'title' => 'List',
    'description' => 'Manage your skins.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/appearance/fusion/skins/settings/%fusion_apply_ui_skin_info'] = array(
    'title' => 'Skin settings',
    'title callback' => 'fusion_apply_ui_skin_info_title',
    'title arguments' => array(
      5,
    ),
    'description' => 'Manage which options are available for each skin when applying a skin configuration.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_admin_skin_info_settings',
      5,
    ),
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );

  // Fusion Apply skin rules.
  if (module_exists('fusion_apply_rules')) {
    $items['admin/appearance/fusion/rules'] = array(
      'title' => 'Page and region rules',
      'page callback' => 'fusion_apply_rules',
      'type' => MENU_LOCAL_TASK,
      'weight' => 1,
      'description' => t('Configure region and page level skin rules.'),
      'access arguments' => array(
        'administer fusion',
      ),
    );
    $items['admin/appearance/fusion/rules/add'] = array(
      'title' => 'Create a new rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'fusion_apply_rule_add',
      ),
      'type' => MENU_LOCAL_ACTION,
      'access arguments' => array(
        'administer fusion',
      ),
    );
    $items['admin/appearance/fusion/rules/edit'] = array(
      'title' => 'Edit rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'fusion_apply_rule_edit',
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer fusion',
      ),
    );
    $items['admin/appearance/fusion/rules/delete'] = array(
      'title' => 'Delete rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'fusion_apply_rule_delete_confirm',
      ),
      'type' => MENU_CALLBACK,
      'access arguments' => array(
        'administer fusion',
      ),
    );
  }

  // Import & Export.
  $items['admin/appearance/fusion/list/import'] = array(
    'title' => 'Import',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_import_form',
    ),
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer fusion',
    ),
    'weight' => -4,
    'description' => t('Import skin configurations.'),
    'file' => 'fusion_apply_ui.admin.inc',
  );
  $items['admin/appearance/fusion/list/export'] = array(
    'title' => 'Export',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_export_form',
    ),
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer fusion',
    ),
    'weight' => -5,
    'description' => t('Export skin configurations.'),
    'file' => 'fusion_apply_ui.admin.inc',
  );

  // Configure skin settings for an element.
  $items['admin/appearance/fusion/edit/%fusion_apply_js/%/%'] = array(
    'title' => 'Edit skin',
    'title callback' => 'fusion_apply_ui_edit_title',
    'title arguments' => array(
      5,
      6,
    ),
    'page callback' => 'fusion_apply_ui_edit',
    'page arguments' => array(
      4,
      5,
      6,
    ),
    // js|nojs, module, element
    'type' => MENU_CALLBACK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'access arguments' => array(
      'edit skin settings',
    ),
  );
  $items['admin/appearance/fusion/edit/%fusion_apply_js/%/%/configure'] = array(
    'title' => 'Edit skin',
    'title callback' => 'fusion_apply_ui_edit_contextual_title',
    'title arguments' => array(
      5,
      6,
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'context' => MENU_CONTEXT_INLINE,
  );

  // Enable a skin configuration.
  $items['admin/appearance/fusion/enable/%fusion_apply_skin'] = array(
    'title' => 'Enable skin',
    'page callback' => 'fusion_apply_ui_skin_status_set',
    'page arguments' => array(
      4,
      TRUE,
    ),
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
  );

  // Disable a skin configuration.
  $items['admin/appearance/fusion/disable/%fusion_apply_skin'] = array(
    'title' => 'Disable skin',
    'page callback' => 'fusion_apply_ui_skin_status_set',
    'page arguments' => array(
      4,
      FALSE,
    ),
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
  );

  // Delete a skin configuration.
  $items['admin/appearance/fusion/delete/%fusion_apply_skin'] = array(
    'title' => 'Delete skin',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fusion_apply_ui_delete_confirm',
      4,
    ),
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer fusion',
    ),
    'file' => 'fusion_apply_ui.admin.inc',
  );

  // Fetch skin file info through AJAX.
  $items['admin/appearance/fusion/info/%'] = array(
    'title' => 'Fusion file information',
    'page callback' => 'fusion_apply_ui_skin_get_files',
    'page arguments' => array(
      4,
    ),
    'type' => MENU_CALLBACK,
    'access arguments' => array(
      'administer fusion',
    ),
  );
  return $items;
}