lib/ruprint/builders.rb
# Generate the html for the grid
Generate the html for the grid
Generate the html for the grid
def render
        @css_classes << :container if @container
        @css_classes << :showgrid  if @showgrid
        options         = {}
        options[:id]    = @css_id if @css_id.present?
        options[:class] = @css_classes.join(" ") if @css_classes.present?
        @rows.each do |row|
          @html << row.render
        end
        options.keys.present? ? content_tag(:div, @html, options) : @html
      end
def render @css_classes << :container if @container @css_classes << :showgrid if @showgrid options = { } options [ :id ] = @css_id if @css_id . present? options [ :class ] = @css_classes . join ( " " ) if @css_classes . present? @rows . each do | row | @html << row . render end options . keys . present? ? content_tag ( :div , @html , options ) : @html end
Generate the html for the grid
Generate the html for the grid
# Add extra classes based on boolean accessors # Only apply the wrapper div if we have properties given. # Should refactor so a grid declaration isn't required for subgrids.