Sha256: 65c229849ad8f3cd7e78afc1b60913f69a14373064553af38f6171735f468586
Contents?: true
Size: 934 Bytes
Versions: 14
Compression:
Stored size: 934 Bytes
Contents
module UiBibz::Ui::Ux::Tables # As # class As def initialize col, record, content, table_options @col = col @record = record @content = content @form = table_options.try(:[], :form) end def render case @col.as when :boolean boolean_render when :progress progress_render when :input inp_options = (@col.input_options || {}).merge({ label: false }) @form.input @col.data_index, inp_options end end private def boolean_render if @content == true glyph = UiBibz::Ui::Core::Icons::Glyph.new('check-circle', status: :success) else glyph = UiBibz::Ui::Core::Icons::Glyph.new('minus-circle', status: :danger) end glyph.render end def progress_render UiBibz::Ui::Core::Notifications::ProgressBar.new(@content, @col.progress_options).render end end end
Version data entries
14 entries across 14 versions & 1 rubygems