You are here

function opigno_simple_ui_menu in Opigno 7

Same name and namespace in other branches
  1. 7.0 modules/opigno_simple_ui/opigno_simple_ui.module \opigno_simple_ui_menu()

Implements hook_menu().

File

modules/simple_ui/opigno_simple_ui.module, line 15

Code

function opigno_simple_ui_menu() {
  $items = array();
  if (module_exists('og_ui')) {
    $items = array_merge($items, opigno_simple_ui_og_menu());
  }
  $items['admin/opigno/system/users'] = array(
    'title' => "Manage users",
    'description' => "Manage platform users",
    'page callback' => 'opigno_simple_ui_admin_redirect',
    'page arguments' => array(
      'admin/people',
    ),
    'access arguments' => array(
      'administer users',
    ),
  );
  $items['admin/opigno/appearance/settings'] = array(
    'title' => "Manage display settings",
    'description' => "Manage platform theme settings",
    'page callback' => 'opigno_simple_ui_admin_redirect',
    'page arguments' => array(
      'admin/appearance/settings/' . variable_get('theme_default', 'platon'),
    ),
    'access arguments' => array(
      'administer themes',
    ),
  );
  if (variable_get('theme_default', 'platon') === 'platon') {
    $default_theme_settings = variable_get('theme_platon_settings', array());
    if (!empty($default_theme_settings['platon_menu_source'])) {
      $items['admin/opigno/appearance/menu'] = array(
        'title' => "Manage menu",
        'description' => "Manage the main menu items",
        'page callback' => 'opigno_simple_ui_admin_redirect',
        'page arguments' => array(
          'admin/structure/menu/manage/' . $default_theme_settings['platon_menu_source'],
        ),
        'access arguments' => array(
          'administer menu',
        ),
      );
    }
  }
  $items['admin/opigno/content/default-tools'] = array(
    'title' => "Set default course tools",
    'description' => "Manage the tools that are activated by default for new courses.",
    'page callback' => 'opigno_simple_ui_admin_redirect',
    'page arguments' => array(
      'admin/structure/types/manage/course/fields/opigno_course_tools',
    ),
    'access arguments' => array(
      'administer content types',
    ),
  );
  $items['admin/opigno/content/forums'] = array(
    'title' => "Manage forums",
    'description' => "Manage the different forums and forum containers.",
    'page callback' => 'opigno_simple_ui_admin_redirect',
    'page arguments' => array(
      'admin/structure/forum',
    ),
    'access arguments' => array(
      'administer taxonomy',
    ),
  );
  if (module_exists('apps')) {
    $items['admin/opigno/system/apps'] = array(
      'title' => "Apps",
      'description' => "Manage and install apps for your platform",
      'page callback' => 'opigno_simple_ui_apps_page',
      'access arguments' => array(
        'administer apps',
      ),
    );
  }
  return $items;
}