When you are on the admin/by-module page and click on "Configure Permissions" it takes you to the access control page, but just to the top of the page.
This patch adds a named anchor to each .module level row of the access control page and adds the fragment identifier to the "configure permissions" link so things go to the right place.
I believe this is a usability issue. I just fired up 5.x for the first time and was very happy with all the new admin interface changes. However, the link to the access control page makes user interaction much slower - they go from a specific page (the by modules page) to a big sea of information. Using the named anchors helps direct people right to the section they want to modify.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | link-to-perm.patch | 2.31 KB | webchick |
| #25 | link_directly_to_permissions_9.patch | 1.66 KB | greggles |
| #24 | link_directly_to_permissions_8.patch | 1.8 KB | greggles |
| #22 | link_directly_to_permissions_7.patch | 1.79 KB | kkaefer |
| #20 | link_directly_to_permissions_6.patch | 1.79 KB | kkaefer |
Comments
Comment #1
MrPrise commentedThe patch works well and I like it. It makes that admin page more user-friendly. After I apply the patch I wonder why that feature is not the part of the system by the begining.
Comment #2
webchickAwesome.
Two things:
1. The attribute should be id="" and not name="" for XHTML compliance.
2. You can't do simply id="module" because there are already classes declared for #menu and such which will screw up the way the table looks. So something like id="perm-module" or something will work fine.
Comment #3
greggles@webchick - thanks for the review.
Here is an updated file including your suggested changes, so I'm changing it back to patch-CNR.
Comment #4
dries commentedLet's write 'permission' or 'permissions' rather than 'perm'.
Comment #5
dries commentedDo we need the 'perm-' to begin with? Why not just the module name?
Comment #6
webchickDries: Because some of these module names (like menu, iirc) are already IDs in CSS (#menu) that have their own formatting. So if we just use id="menu", the table gets distorted because a few oddball modules get right-aligned or what have you.
At least this is what I remember from when I worked on merlin's big administration patch where this functionality first showed up.
Comment #7
greggles@dries - webchick's advice is indeed correct in my testing: if you are using bluemarine and try to visit admin/user/access#menu then your page won't drop down at all, but will just sit there. Prefixing the module with permission- fixes this issue.
Here's a new patch with your requested change to permission included.
Comment #8
neclimdulThis patch just syncs and adds a space to the line in system.module to conform with coding standards. Great work Greg. Works as specified and does improve usability. I'm going to RTBC with the assumption that Dries' concerns have been addressed.
Comment #9
profix898 commentedDo you think
<a id="permission-@module">@module module</a>should be translatable? If someone does, it could break the desired functionality. This is not a language-specific string and it shouldnt be wrapped in t() IMO.Comment #10
profix898 commentedThis patch adds the "id=..." stuff via #prefix/#suffix, so no translator will see it. Only the translatable part is still wrapped in t().
Comment #11
gregglesthanks for the updates neclimudl and profix898 - works
I'm guessing that it's ok to say
Though I get nervous looking at anything that involves .$ instead of using the printf style substitution.
Comment #12
webchickMight not hurt to wrap $module in a check_plain.
Comment #13
profix898 commentedNot sure this is really needed, but added check_plain.
Comment #14
kkaefer commentedIf you wrap one in check_plain, do it with the other as well.
+1 on this patch. Looks good to go.
Comment #15
kkaefer commentedCorrected a whitespace issue and added a comma to the last array element.
Comment #16
dries commentedAFAIK, these check_plain()s are not needed.
Comment #17
profix898 commentedYou can use #10. Its the same patch, but without the check_plain()s.
Comment #18
dries commentedprofix: #10 actually fails ... needs to be re-rolled, I'm afraid.
Comment #19
profix898 commentedre-rolled
Comment #20
kkaefer commentedRemoved the whitespace again.
Comment #21
profix898 commented@kkaefer: Thanks and Sorry for 'again' :)
Comment #22
kkaefer commentedAh, the capitalization patch. Made the "Configure" uppercase just in the original.
Comment #23
edmund.kwok commented+1 to the patch. Tested on HEAD, did not apply cleanly though. Just one question, would it be slightly misleading if the module names in the access control page inherits link styles? Like having link colors and having on hover styles. Apart from that, looks RTBC to me :)
Comment #24
gregglesThanks for letting us know it wasn't working edkwh
I rerolled it. This version doesn't have the check_plains in it.
Comment #25
gregglesThis patch no longer applied because of http://drupal.org/node/90614
I rerolled it. It applies cleanly for me.
This version does not include the check_plains, keeps the divs in the prefix/suffix for easier translation, and uses permission- to create the id so we don't collide with other id values on the page. I believe this is RTBC.
Comment #26
profix898 commentedLets set this RTBC and see what happens ... we all did enough re-rolls, I think.
Comment #27
drummPlease use an id on an existing element instead of throwing in an extra a tag.
Aren't these modules, not permissions? I think the id should be module-name.
Comment #28
webchickOk, let's try this.
Comment #29
kkaefer commentedwebchick's patch can't work because there are not yet any existing IDs for each module on the permissions page.
Comment #30
webchickHuh? It does work..? I add the ID to the table cell.
Tested in Firefox and Safari.
Comment #31
gregglesI confirm webchick's comment - works fine for me in FF2.
Comment #32
neclimdulDoesn't seem to be working in IE. Most likely this is IE being stupid about implementing something. Either way, it look like we have to work around it and may need to go with the <a ... anchor instead of embedding it in an existing tag to support IE.
Comment #33
RobRoy commentedThis works for me in IE6.0.2 on Windows XP (and all the other browsers). Having any element's ID used as an anchor is a standard HTML 4 trait so not sure what's going on with your browser.
Not sure what the issue is here, but this works fine for me. +1
Comment #34
gregglesWorks fine for me in IE7 and IE6.0.2
In IRC neclimdul mentioned using IE6.0.2 Robroy tested in IE6.0.2 and it worked fine for him.
Comment #35
kkaefer commentedAfter a short discussion with webchick, I'm fine with this patch.
Comment #36
kkaefer commentedWorks also in Safari.
Comment #37
neclimdulI don't know either. It was IE 6.0.2 but if everyone else is working then I'm not going to argue. Its the first time I've used IE in a couple years so its just as likely I was overlooking something. The id thing seems pretty standard so lets get this thing committed.
Comment #38
neclimdulwoops, that wasn't my fault. I agree, RTBC.
Comment #39
drummCommitted to HEAD.
Comment #40
(not verified) commented