Comments

MattWithoos’s picture

Simple patch attached

gisle’s picture

Thanks for the patch!

It is actually a very old feature request: #839382: Integrate with the Core Admin Help link - but your patch made it much more concrete.

gnuget’s picture

This patch removes the link from the admin bar and where put it? By default the administration menu can't have submenus, so the menu disappear, right? or I'm doing something wrong?

But really like this idea.

MattWithoos’s picture

The administration menu can have submenus. So no, the menu won't disappear.

gnuget’s picture

StatusFileSize
new18.43 KB

Sorry, I wasn't talking about this module: https://www.drupal.org/project/admin_menu I was talking about the native admin menu, that one can have submenus?

Admin menu

MattWithoos’s picture

Good point gnuget. I spun up a core Drupal install and tested out a patch. Now, this patch will show a different menu item based on one of three conditions:

1. Help module exists, admin_menu exists: show "Advanced Help" on the submenu of "Help"

2. Help module exists, admin_menu doesn't exist: show "Advanced Help" on the main black admin menu

3. Help module doesn't exist: show "Help" on the main black admin menu

Could you test it works in your usecase and if so change to RTBC?

MattWithoos’s picture

I've gone one step further! Now, on the Core Help page, there is a tab that allows you to switch to Advanced Help. See attached patch (which combines both features).

MattWithoos’s picture

Even better: I've put these menu items under the "if the help module exists" condition, as there's no point making tabs if the Help module isn't enabled.

gnuget’s picture

Hi @MattWithoos.

I would like get feedback from gisle before to put it as RTBC but this looks good to me.

Some comments:

  1. +++ b/advanced_help.module
    @@ -40,12 +40,39 @@ function advanced_help_menu() {
    +    // Add tabs to core Help page to access Advanced Help
    

    The comment should finish with a dot.

  2. +++ b/advanced_help.module
    @@ -40,12 +40,39 @@ function advanced_help_menu() {
    +      'access callback' => true,
    

    We want to do this? I mean, with this even the non logged users will be able to access to this tab, right?

  3. +++ b/advanced_help.module
    @@ -40,12 +40,39 @@ function advanced_help_menu() {
    +    // Determine whether to nest the Advanced Help menu link
    

    The comment should finish with a dot.

great work, thank you.

MattWithoos’s picture

Thanks for the review! I've amended and attached the new patch.

gisle’s picture

Status: Needs review » Needs work

Thanks for the patch in #10.

The part that leverages on the contrib. Administration menu module to nest the Advanced Help menu link seems to work as intended.

However, the code that is supposed to add tabs to core Help page to access Advanced Help does not work on my test site. I would expect to see something like the mockup below:

Tab suggestion

But there are no tabs. And when Administration menu is not enabled, your patch has no effect.

gnuget’s picture

Issue summary: View changes
StatusFileSize
new184.59 KB
new69.6 KB

I think when the administration menu module is not enabled the link should keep appearing in the admin menu, so I think what the patch does in this part is ok.

And on my side the tab appear but when I click it returns "access denied".

New tab

Access denied

gnuget’s picture

Issue summary: View changes
gisle’s picture

Issue summary: View changes
StatusFileSize
new10.8 KB

Another attempt of adding the mockup of how it should appear if Administration menu is not enabled:

Tab suggestion

I don't think "Advanced help" should be visible in the admin toolbar when it is accessible via a separate tab on the "Help" page. The general idea here is too avoid cluttering the admin toolbar, and this applies both when Administration menu is enabled, and when it is not enabled.

gisle’s picture

Issue summary: View changes

Removed mockup from summary.

gisle’s picture

Here is my take on uncluttering the admin toolbar.

It is based upon the mockup in #14 and does not leverage of the contrib Administration menu.

What it does is simply to remove the "Advanced menu" from the admin toolbar and makes it accessible via a tab inside "Help" (unless "Help" is disabled - then it appears on the admin toolbar).

I believe this implementation is what was requested in the original feature request: #839382: Integrate with the Core Admin Help link.

Please review.

gisle’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Needs work » Needs review

Changing version. Patch in #16 must be applied against dev snapshot (0ce616 - it is currently the HEAD).

gnuget’s picture

Status: Needs review » Needs work

Just one thing

+++ b/advanced_help.module
@@ -247,11 +257,12 @@ function advanced_help_index_page($module = '') {
+        // $items[] = advanced_help_l($name, "admin/advanced_help/$module");

Can we delete this comment?

And this is RTBC to me.

  • gisle committed f1f6fec on 7.x-1.x
    Issue #2492565 by gisle: Moved Advanced help to a tab under help
    
gisle’s picture

Status: Needs work » Needs review

Can we delete this comment?

I've deleted the comment and applied the patch.

Result is now in the latest snapshot of the 7.x-1.x branch.

gnuget’s picture

Status: Needs review » Fixed
gnuget’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Fixed » Active

Now we need port this to the D8 branch.

gnuget’s picture

Assigned: Unassigned » gnuget

  • gnuget committed f8053b2 on 8.x-1.x
    Issue #2492565 by MattWithoos, gisle, Gnuget: Why clutter the admin menu...
gnuget’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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