comparison 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
comparison
equal deleted inserted replaced
944:03975ec7378d 948:83866d58f2dd
289 end 289 end
290 290
291 def principals_check_box_tags(name, principals) 291 def principals_check_box_tags(name, principals)
292 s = '' 292 s = ''
293 principals.sort.each do |principal| 293 principals.sort.each do |principal|
294 s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n" 294
295 if principal.type == "User":
296 s << "<label>#{ check_box_tag name, principal.id, false } #{link_to_user principal}</label>\n"
297 else
298 s << "<label>#{ check_box_tag name, principal.id, false } #{h principal} (Group)</label>\n"
299 end
300
295 end 301 end
296 s.html_safe 302 s.html_safe
297 end 303 end
298 304
299 # Returns a string for users/groups option tags 305 # Returns a string for users/groups option tags