module Para::I18n::ResourcesButtons

Public Instance Methods

translate_button(resource) click to toggle source
# File lib/para/i18n/resources_buttons.rb, line 4
def translate_button(resource)
  return unless resource.class.translates? && view.can?(:translate, resource)

  path = component.relation_path(resource, :translation, action: :edit)
  options = { class: 'btn btn-default' }

  view.link_to(path, options) do
    content_tag(:i, '', class: 'fa fa-globe')
  end
end