app/helpers/application_helper.rb
# text in "caption" will be used to display the item next to the image_tag_for_key;
# if "caption" is nil, item.name will be used by default
text in "caption" will be used to display the item next to the image_tag_for_key;
if "caption" is nil, item.name will be used by default
text in " caption " will be used to display the item next to the image_tag_for_key ; if " caption " is nil item . name will be used by default
def list_item_with_icon(icon_type, item, caption, truncate_to, custom_tooltip=nil, size=nil)
    list_item = "<li>"
    if icon_type.downcase == "flag"
      list_item += flag_icon(item.country)
    elsif icon_type == "data_file" || icon_type == "sop"
      list_item += file_type_icon(item)
    else
      list_item += image_tag_for_key(icon_type.downcase, nil, icon_type.camelize, nil, "", false, size)
    end
    item_caption = " " + (caption.blank? ? item.title : caption)
    list_item += link_to truncate(item_caption, :length=>truncate_to), url_for(item), 'data-tooltip' => tooltip(custom_tooltip.blank? ? item_caption : custom_tooltip)
    list_item += "</li>"
    return list_item.html_safe
  end
def list_item_with_icon ( icon_type , item , caption , truncate_to , custom_tooltip = nil , size = nil ) list_item = "<li>" if icon_type . downcase == "flag" list_item += flag_icon ( item . country ) elsif icon_type == "data_file" || icon_type == "sop" list_item += file_type_icon ( item ) else list_item += image_tag_for_key ( icon_type . downcase , nil , icon_type . camelize , nil , "" , false , size ) end item_caption = " " + ( caption . blank? ? item . title : caption ) list_item += link_to truncate ( item_caption , :length => truncate_to ) , url_for ( item ) , 'data-tooltip' => tooltip ( custom_tooltip . blank? ? item_caption : custom_tooltip ) list_item += "</li>" return list_item . html_safe end
text in "caption" will be used to display the item next to the image_tag_for_key;
if "caption" is nil, item.name will be used by default
text in " caption " will be used to display the item next to the image_tag_for_key ; if " caption " is nil item . name will be used by default
icon_type
item
caption
truncate_to
custom_tooltip
size