The toolbar currently skims the top level of links off the management menu, this won't work for several reasons:
1. The top level links don't link 1-1 with top level admin items, Content should go to admin/content/content, People should go to admin/user/user
2. It requires a fair bit of messing about in toolbar.module to get the single level of links like that.
3. We're probably going to use the management menu for the config and modules page, where it's going to end up with lots of categories that in no way relate to the toolbar links.
So here's a patch, uses the same mechanisms as the shortcuts (query for the custom menu, menu_link_save() for the links, let's not debate that process here), and adds in the actual links with current best-fit destinations from the d7ux wireframes whilst removing 'dashboard' and 'find content' as shortcuts because one doesn't exist and the other is already in the top level.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | toolbar_menu.patch | 4.62 KB | catch |
| #8 | toolbar_menu.patch | 4.04 KB | catch |
| #6 | toolbar_menu.patch | 4.04 KB | catch |
| #3 | toolbar_menu.patch | 3.78 KB | catch |
| #3 | toolbar.png | 3.83 KB | catch |
Comments
Comment #1
catchscreenshot.
Comment #2
leisareichelt commentedhey Catch - looking good.
a couple of things
1. the order should be:
Content, Structure, People, Appearance, Config & Modules, Help
2. it would be fantastic if the URL structure could map to the section naming (so we could have /people rather than /user)
Comment #3
catchFixed the order and added Help.
On changing paths, agreed, but we need to work on that alongside #510110: IA : Configuration & Module - i.e. admin/content is currently the content administration overview page, so we can't move admin/content/content there easily.
Comment #4
Frando commentedWell, while this might be OK as a first step, I don't know if it is a good idea to basically split Drupal's admin IA like that. IMO people will be quite confused if the toolbar links don't match with the links and categories in the regular admin menu (which is still where breadcrumbs and the admin category / submenu pages are coming from). With this patch committed, there is no clear or intuitive way of navigation at all to get e.g. to admin/content/book or admin/user/roles.
This patch basically reduces HEAD's user experience a lot. So as this can be nothing but an interim step I think before commiting this, there should be some more discussion or thinking on what's the next step.
What's the general plan on how to deal with this issue? I mean, I have seen several different proposals for a new admin IA, but is there something more or less complete on which we have some agreement? With more or less complete I mean a model into which all current admin pages fit, e.g. the create / manage / configure IA proposed by sun. How are people going to find admin/content/book, admin/user/roles or admin/development/testing, when there are no top level links to admin/content, admin/user and admin/development?
Comment #5
catchThe idea is that all commonly used stuff /admin/content /admin/users is a top level link, everything else moves to 'Configuration and Modules' - which is more or less /admin as it currently stands with different categories.
I'd say the best summary of the current approach is at http://www.yoroy.com/2009/reorganize-drupal-admin-items-within-d7ux-fram...
And yes this is only a very interim step, I don't want to mix this up with the two other ongoing IA issues referenced (not to mention others in the queue), and it'll clearly be very broken until everything is in place (and even then we have to test it a lot and see how it interacts with the top 40-60 contrib modules).
Comment #6
catchDiscussed this a fair bit with leisa and webchick in irc. At least for now, we decided to leave /admin as is to allow for sorting out the categories without a massive refactoring - but alias it to admin/config so we can have consistent toolbar links - so that alias gets added in toolbar_install() - other path changes need to wait on the IA patches.
Comment #8
catchOh dear.
Comment #10
catchCommonLUnitTest relies on not hitting the database, which we do if there's even a single path alias in the system when calling url(), so made it CommonLTestCase extends DrupalWebTestCase instead.
Comment #11
sunBut you know that menu links have absolutely no way to be maintained in any way? That is why admin_menu 6.x-1.x failed.
Comment #13
gábor hojtsyI would sincerely hope that this idea would only be a temporary measure, since having two different IAs for the admin menu can easily become a disaster. As said above, other navigation tools, URLs, breadcrumbs, etc all match the default menu structure.
I don't see how moving RSS publishing out of the Content management section and moving the content admin page one level up and doing similar adjustments on the Users area would be worse. Especially that RSS publishing settings screen is probably one of the least referenced items in core, so would be easy to move. These two changes would set up the scene for the top level Content and People items as designed without much tinkering in duplicating the IA.
Comment #14
gábor hojtsyAlso, the "Find content" item was discussed with Mark. It does point to the same item as "Content" in the upper menu, but is a bigger call to action and especially with the icon it provides an easier way to get to this same screen. These are supposed to be configurable sets of shortcuts, so people can set up different menu items for there. This default set is aimed at content creators and will not fit all.
Comment #15
catch@Gabor: this is a much wider problem than simply users and content. The 'configuration and modules' item points to /admin - which isn't in the top level of the management menu. With Locale and Simpletest modules enabled, both 'International' and 'Development' menu items would show up here. Not to mention the config and modules IA is likely to lead to a lot more top level categories (one is even proposed for RSS, to go with aggregator), and they'd all show up here too, along with anything which contrib adds. So this is fundamentally a different set of links to the 'top level of the management menu' - it's an arbitrary selection of stuff which otherwise used to appear under /admin, including an (albeit revamped) /admin itself - as such those links need to be specifically defined by toolbar.module, although I think a hook_menu_alter() is probably more appropriate than menu_link_save() - since then when disabling toolbar, Content, People and other links which shouldn't be duplicated under /admin will pop back there.
Comment #16
gábor hojtsy@catch: I think we had this same fundamentally different thinking of implementation before on this and I tried to explain my point, but did not find any evidence that it was dismissed or there is any reason to hack menu structures like you explain. As far as I see the D7 path structure would be:
/admin
/content
/structure
/appearance
/people
/config
/help
Now the config IA discussed in your linked issue would go under /admin/config. The IA of the header is not just sugar on top of the ugliness of the Drupal admin but instead a reformulation of the Drupal IA. Modules like simpletest and locale would not add to the top level but instead would add to the config section. Locale even has its place mapped out on the IA for config and modules there.
So I'd understand your patch as a temporary measure until all the IA is mapped down the Drupal paths and code, but would definitely not understand it as a definite answer to how the toolbar should work.
Comment #17
catchIn discussion with leisa and webchick a couple of weeks ago we had it as:
/admin/content
/admin/structure
/admin/appearance
/admin/people
/admin/config (actually a path alias for /admin)
/admin/help
i.e we keep the /admin namespace so that sites with existing paths like /people don't get broken. And /admin stays where it is both in the path structure and its technical implementation to make it easier for contrib modules to fit in. Personally I think your site should still work if you disable toolbar.module, which means there has to be some kind of fallback to a menu or page where you can reasonably find all administrative pages.
Comment #18
gábor hojtsy@catch: well, while this sounds like keeping the current implementation of /admin, it would really need to have exceptions or /admin/content, /admin/structure, etc. will show up on the config page. With all our changes to admin paths anyway, I would not worry about /admin/people possibly being on a D6 site, and a D6 -> D7 upgrade would need to resolve this anyway. (I've assumed you mean /admin/people, not /people, since /admin/people would be what shows up on the toolbar).
Comment #19
sunIf modules add items to the top-level categories, but those do not appear in the toolbar, then we are introducing a major WTF issue.
This looks like much cosmetics to me, which would need to be removed later on - especially the admin/settings => admin/config renaming, resp. admin => admin/config path alias.
So why not this way:
1) Turn /admin into /admin/settings, removing /admin, replacing the default sub-item listing on /admin/settings
2) Directly use the top-level items of the Management menu from menu router for the toolbar.
3) Build the Configuration dashboard on /admin/settings. Also fix the admin menu system nightmare, which is totally dependent on an "admin" menu link that must live in the same menu as the children.
4) Rename /admin/settings to /admin/config.
Due to 1), the Management menu starts with the categories directly (next to "Add content"). No path aliases, and cosmetics come last.
Comment #20
catch/admin/people I have no problem overwriting. However it's quite likely a lot of sites have existing visitor facing pages at /people - bringing those items up out of the /admin namespace I didn't think was under discussion (and would contradict what Leisa's said about this).
Personally I wouldn't mind having content/people/structure/appearance duplicated under config and modules, but I realise that wasn't what's been proposed.
So the only option to me seems to be a separate menu, and hook_menu_alter() these items out of the management menu.
Comment #21
catch@sun, this is similar to what I proposed over at #508458: Config and modules page. The main issues are we add an extra level of depth for every admin URL, and we have to move every single contrib module administrative path down that level too (since for that page to work, we don't have admin/config/mymodulesettings we have admin/config/category/mymodulesettings). In fact you made that same point yourself at http://drupal.org/node/508458#comment-1772230
Comment #22
gábor hojtsy@catch: Gosh, my indentation did not come over in my comment above. Let me retry:
I don't think it would be a problem at all, if contrib modules would need to add their paths under /admin/config/category/ since that would even replicate the navigation structure keeping tradition with how Drupal worked so far. Hacking around with aliasing paths does not sound like a great idea.
Comment #23
catch@Gabor, ahhhh ;)
In that case I've re-opened #508458: Config and modules page and closing this one out as duplicate.