Method: BMC::ButtonHelper#export_button

Defined in:
app/helpers/bmc/button_helper.rb

#export_button(url, **options) ⇒ Object



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'app/helpers/bmc/button_helper.rb', line 120

def export_button(url, **options)
  ext = url.split(".").last

  if ext.length <= 4
    text = "#{ta(:export)} (#{ext.upcase})"
  else
    text = ta(:export)
  end

  options = {
    :icon   => :download,
    :action => :export,
    :text   => text,
  }.merge(options)

  download_button(url, **options)
end