When editing a user, the CAS settings page is located beneath the "Edit" or "User settings" tab. However, the OpenID settings page, which provides essentially identical functionality, is located at the same level as the user settings tab, not beneath it. See the attached screenshot.

Because the CAS and OpenID pages are so similar, they should really be at the same menu level for good UX. Either CAS should be bumped up a level in the menu, or OpenID should be put beneath the "edit" / "account settings" tab.

CommentFileSizeAuthor
#6 1244258-fix_tab_parent.txt576 bytesbfroehle
#2 before.png18.46 KBdanepowell
#2 after.png17.22 KBdanepowell

Comments

bfroehle’s picture

Dane: The screenshots weren't attached successfully.

In terms of implementation, the difference between CAS and OpenID comes in the returned key 'tab root' in hook_menu(). Compare:

function openid_menu() {
  // ...
  $items['user/%user/openid'] = array(
    'title' => 'OpenID identities',
    'page callback' => 'openid_user_identities',
    'page arguments' => array(1),
    'access callback' => 'user_edit_access',
    'access arguments' => array(1),
    'type' => MENU_LOCAL_TASK,
    'file' => 'openid.pages.inc',
  );
  // ...
}

vs.

/**
 * Implementation of hook_menu().
 */
function cas_menu() {
  // ...
  $items['user/%user/cas'] = array(
    'title' => 'CAS',
    'page callback' => 'cas_user_identities',
    'page arguments' => array(1),
    'access arguments' => array('administer users'),
    'type' => MENU_LOCAL_TASK,
    'file' => 'cas.pages.inc',
    'tab_parent' => 'user/%/edit',
    'weight' => 1,
  );
  // ...
}

I have no objections to removing the tab_parent line. Could you generate a few screenshots to show the before and after UI for comparison?

danepowell’s picture

StatusFileSize
new17.22 KB
new18.46 KB

Here's the before and after screenshots...

bfroehle’s picture

Assigned: Unassigned » metzlerd

Dave: Any objections to Dane's patch?

Dane: Was the patch merely removing the tab_parent line? Or did you adjust the weight as well?

danepowell’s picture

All I did was to remove the tab_parent line.

metzlerd’s picture

I have no objections. Thanks for asking.

bfroehle’s picture

Assigned: metzlerd » Unassigned
Status: Active » Fixed
StatusFileSize
new576 bytes

Committed to 6.x-3.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.