function shortcut_set_admin

7.x shortcut.admin.inc shortcut_set_admin()

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

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

File

drupal-7.x/modules/shortcut/shortcut.admin.inc, line 169
Administrative page callbacks for the shortcut module.

Code

function shortcut_set_admin() {
  $shortcut_sets = shortcut_sets();
  $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => 4));

  $rows = array();
  foreach ($shortcut_sets as $set) {
    $row = array(
      check_plain($set->title),
      l(t('list links'), "admin/config/user-interface/shortcut/$set->set_name"),
      l(t('edit set name'), "admin/config/user-interface/shortcut/$set->set_name/edit"),
    );
    if (shortcut_set_delete_access($set)) {
      $row[] = l(t('delete set'), "admin/config/user-interface/shortcut/$set->set_name/delete");
    }
    else {
      $row[] = '';
    }

    $rows[] = $row;
  }

  return theme('table', array('header' => $header, 'rows' => $rows));
}