Closed (fixed)
Project:
Role help
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2009 at 20:50 UTC
Updated:
8 Dec 2011 at 14:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedCouldn't that potentially get horribly long...?
The one site I used this module on, each role description was about a paragraph plus some bullet points.
The way to do it is with hook_form_alter -- just query the role descriptions from the database and insert them into the form.
I guess we could add a setting on the admin page for whether to insert the descriptions into the roles.
We should maybe emulate the way permissions + descriptions look on Drupal 7.
Comment #2
deggertsen commentedGood thoughts. It would definitely be a good idea to have an option that allows you to post the descriptions on the settings page. Personally my descriptions are not that long. I also like the idea of emulating the look of Drupal 7.
I'll try to find time to see what I can do here...
Comment #3
browlands commentedAlso see #526602: instructions settings
Comment #4
deggertsen commentedDon't know why this is assigned to me. I must have done that by accident...
Comment #5
jromine commentedNice module. I had originally searched for this, and not finding it, coded something myself. Much better to merge my ideas with yours, I think.
Here are some patches to add a one-line summary for each role, and display the summary on the roles list page, and the user profile edit page. We have a site with a lot of roles, so we want the role names to be short, but needed more detail for the person assigning roles to users.
Comment #6
jromine commentedRe-roll patch to fix diff pathnames
Comment #7
joachim commentedSorry for total maintainer silence for so long :(
Needs a bit of work:
This todo shouldn't be getting pulled.
Also, can you run it through Coder review to pick up things like missing docblocks and comment formatting?
Comment #8
joachim commentedI made some changes to this patch and committed it:
- remove the variable for whether there is a summary field. Didn't seem much point to having a master switch
- renamed the 'description' DB field to 'help', otherwise its meaning seems too close to 'summary'
- added filtering out of roles on the role help page that have empty or null help text, now that it's possible for a row to exist with this
- made use of hook_theme_registry_alter()
- added check_plain() where needed
I'll make a stable release with this in later today.
Possible follow-ups:
- the two built-in roles don't have summaries. I don't know whether they need them or not -- any thoughts on this?
- theme_role_name() needs a fix so the query isn't run for every role