function shortcut_set_admin

Menu page callback: builds the page for administering shortcut sets.

1 string reference to 'shortcut_set_admin'
shortcut_menu in drupal/core/modules/shortcut/shortcut.module
Implements hook_menu().

File

drupal/core/modules/shortcut/shortcut.admin.inc, line 158
Administrative page callbacks for the shortcut module.

Code

function shortcut_set_admin() {
  $shortcut_sets = shortcut_sets();
  $header = array(
    t('Name'),
    t('Operations'),
  );
  $rows = array();
  foreach ($shortcut_sets as $set) {
    $row = array(
      check_plain($set->title),
    );
    $links['list'] = array(
      'title' => t('list links'),
      'href' => "admin/config/user-interface/shortcut/{$set->set_name}",
    );
    $links['edit'] = array(
      'title' => t('list links'),
      'href' => "admin/config/user-interface/shortcut/{$set->set_name}/edit",
    );
    if (shortcut_set_delete_access($set)) {
      $links['delete'] = array(
        'title' => t('delete set'),
        'href' => "admin/config/user-interface/shortcut/{$set->set_name}/delete",
      );
    }
    $row[] = array(
      'data' => array(
        '#type' => 'operations',
        '#links' => $links,
      ),
    );
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}