Mercurial > hg > soundsoftware-site
diff app/helpers/application_helper.rb @ 950:64d990177cda luisf
Merge (Bug #505 fix).
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 02 Aug 2012 19:41:29 +0100 |
parents | 83866d58f2dd |
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 19:41:29 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