Module: CcLicenseable::AssetHelper
- Defined in:
- app/helpers/cc_licenseable/asset_helper.rb
Instance Method Summary collapse
- #cc_icon(icon) ⇒ Object
- #cc_icon_chain(abbr, tag_name = :span, options = {class: "icon-chain"}) ⇒ Object
- #cc_logo ⇒ Object
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, ={class: "icon-chain"}) inner_html = "" abbr.downcase.split('-').each do |abbr| inner_html += cc_icon(abbr) end content_tag(tag_name, ) do raw inner_html end.html_safe end |
#cc_logo ⇒ Object
3 4 5 6 7 |
# File 'app/helpers/cc_licenseable/asset_helper.rb', line 3 def cc_logo link_to "http://www.creativecommons.org" do image_tag 'cc_licenseable/logos/cc.logo.svg' end.html_safe end |