Sha256: 94d144f1840013e44f34065b6cd967aa663095d6f71849f2ff83d7e9219c2d81

Contents?: true

Size: 655 Bytes

Versions: 10

Compression:

Stored size: 655 Bytes

Contents

module TaoUi
  module Components
    module Table

      class BodyBuilder < BaseBuilder

        def row row_options = {}, &block
          row_content = view.capture(row_builder, &block)
          row_builder.reset_cell_count

          if expandable
            row_content
          else
            row_content = selectable_td + row_content if selectable
            row_content = expandable_td + row_content if expandable
            view.content_tag 'tr', row_content, row_options
          end
        end

        private

        def row_builder
          @row_builder ||= RowBuilder.new(view, options)
        end

      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tao_ui-1.0.0.beta.1 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.3.4 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.3.3 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.3.2 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.3.1 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.3.0 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.2.10 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.2.9 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.2.8 lib/tao_ui/components/table/body_builder.rb
tao_ui-0.2.7 lib/tao_ui/components/table/body_builder.rb