Module: CcLicenseable::AssetHelper

Defined in:
app/helpers/cc_licenseable/asset_helper.rb

Instance Method Summary collapse

Instance Method Details

#cc_icon(icon) ⇒ Object



9
10
11
# File 'app/helpers/cc_licenseable/asset_helper.rb', line 9

def cc_icon(icon)
  image_tag "cc_licenseable/icons/#{icon}.svg"
end

#cc_icon_chain(abbr, tag_name = :span, options = {class: "icon-chain"}) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'app/helpers/cc_licenseable/asset_helper.rb', line 13

def cc_icon_chain(abbr, tag_name=:span, options={class: "icon-chain"})
  inner_html = ""
  abbr.downcase.split('-').each do |abbr|
    inner_html += cc_icon(abbr)
  end
  (tag_name, options) do
    raw inner_html
  end.html_safe
end

#cc_logoObject



3
4
5
6
7
# File 'app/helpers/cc_licenseable/asset_helper.rb', line 3

def 
  link_to "http://www.creativecommons.org" do
    image_tag 'cc_licenseable/logos/cc.logo.svg'
  end.html_safe
end