[drupal-devel] [feature] Roles should not be separated by a BR.

jhriggs drupal-devel at drupal.org
Wed Apr 13 20:20:51 UTC 2005


Issue status update for http://drupal.org/node/20457

 Project:      Drupal
 Version:      cvs
 Component:    user.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  Morbus Iff
 Reported by:  Morbus Iff
 Updated by:   jhriggs
-Status:       active
+Status:       patch
 Attachment:   http://drupal.org/files/issues/roles_div.patch (930 bytes)

Ugh...and the patch




jhriggs



Previous comments:
------------------------------------------------------------------------

April 13, 2005 - 13:34 : Morbus Iff

Attachment: http://drupal.org/files/issues/_patch_usermodulebr.patch (848 bytes)

On admin/user, the user's roles are separated both by a comma and a [br
/]. The comma is quite enough - the [br /] merely makes the page look
retarded ("fat" rows) on screens that have plenty of width to
accomodate the entire table without the BR. On smaller width'd
browsers, the "fat" rows will return, but naturally wrapped, not forced
with inline HTML. Likewise, [BR] and the comma are both delimiters: only
one is needed (if we use [BR], the newline becomes the visual delimiter;
if we use comma, then we don't need the newlines). The attached patch
removes the [BR].




------------------------------------------------------------------------

April 13, 2005 - 13:45 : Dries

Committed to HEAD.




------------------------------------------------------------------------

April 13, 2005 - 13:52 : jhriggs

I'm not sure how I feel about this. Removing the break is OK, I suppose,
but removing the comma would not be.  You could not have breaks alone,
because roles can have spaces in them, and they may not break properly.
So, we need to leave the commas in.  Personally, I think it is nicer to
see what we have now:



authenticated user,
administrator,
web site user

rather than:



authenticated user, administrator, web
site user

We probably shouldn't have the hardcoded break, but maybe they should
be in a div. That way a theme can display them inline if desired.




------------------------------------------------------------------------

April 13, 2005 - 13:53 : jhriggs

Cross-posted with Dries there.  Setting back to active, because I don't
think this is the best fix.




------------------------------------------------------------------------

April 13, 2005 - 14:20 : jhriggs

Here's a patch that wraps each role in a div:


<div class="role">authenticated user,</div> <div class="role">foo
bar,</div> <div class="role">baz blah</div>

This way they still appear on separate lines unless the theme decides
to make div.class display inline.







More information about the drupal-devel mailing list