Sha256: 87aa27fdb34a592b4735ea79f864995a1e99f76c0151485afc7b5339e5251186

Contents?: true

Size: 591 Bytes

Versions: 12

Compression:

Stored size: 591 Bytes

Contents

module KonoUtils
  module Object
    module Cell
      module Buttons # namespace
        class Download < Base

          def url_to
            options[:url_to] || url_for(model)
          end

          def specific_button_class
            'btn-light'
          end

          def button_content
            options.fetch(:content, fa_icon("download", text: I18n.t('kono_utils.bootstrap4.buttons.download.alt')))
          end

          def btn_opts(opts = {})
            {
              target: :_blank
            }.merge(super)
          end

        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kono_utils_bootstrap_view4-0.3.2 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.3.1 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.3 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.2.3 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.2.2 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.2.1 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.2 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.1.2 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.1.1 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.1.0 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.7 app/concepts/kono_utils/object/cell/buttons/download.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.4 app/concepts/kono_utils/object/cell/buttons/download.rb