app/helpers/groups_helper.rb
# Return a group's image link.
# The default is to display the group's icon linked to the profile.
Return a group's image link.
The default is to display the group's icon linked to the profile.
Return a group ' s image link . The default is to display the group ' s icon linked to the profile .
def image_link(group, options = {})
    link = options[:link] || group
    image = options[:image] || :icon
    image_options = { :title => h(group.name), :alt => h(group.name) }
    unless options[:image_options].nil?
      image_options.merge!(options[:image_options]) 
    end
    link_options =  { :title => h(group.name) }
    unless options[:link_options].nil?                    
      link_options.merge!(options[:link_options])
    end
    content = image_tag(group.send(image), image_options)
    if options[:vcard]
      content = %(#{content}#{content_tag(:span, h(group.name), :class => "fn" )})
    end
    link_to(content, link, link_options)
  end
def image_link ( group , options = { } ) link = options [ :link ] || group image = options [ :image ] || :icon image_options = { :title => h ( group . name ) , :alt => h ( group . name ) } unless options [ :image_options ] . nil? image_options . merge! ( options [ :image_options ] ) end link_options = { :title => h ( group . name ) } unless options [ :link_options ] . nil? link_options . merge! ( options [ :link_options ] ) end content = image_tag ( group . send ( image ) , image_options ) if options [ :vcard ] content = %(#{content}#{content_tag(:span, h(group.name), :class => "fn" )}) end link_to ( content , link , link_options ) end
Return a group's image link.
Return a group ' s image link .
# This is a hack needed for the way the designer handled rastered images # (with a 'vcard' class).
group
<not_specific>
options
<not_specific>