Mercurial > hg > soundsoftware-site
diff app/helpers/application_helper.rb @ 948:83866d58f2dd bug_505
Makes explicit that the "user" is a Group.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 02 Aug 2012 18:42:39 +0100 |
parents | ec1c49528f36 |
children | bb32da3bea34 |
line wrap: on
line diff
--- a/app/helpers/application_helper.rb Wed Jul 11 14:43:58 2012 +0100 +++ b/app/helpers/application_helper.rb Thu Aug 02 18:42:39 2012 +0100 @@ -291,7 +291,13 @@ def principals_check_box_tags(name, principals) s = '' principals.sort.each do |principal| - s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n" + + if principal.type == "User": + s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n" + else + s << "<label>#{ check_box_tag name, principal.id, false } #{h principal} (Group)</label>\n" + end + end s.html_safe end