Project

General

Profile

« Previous | Next » 

Revision 33c93671

Added by Marc Dequènes about 14 years ago

  • ID 33c93671e7aca8988443063c986223fa036d6fba

[cosmetic] display groups in a set into a light blue cell, like in the tree (closes #18), and btw improved CSS handling a bit (unfinished)

View differences:

app/helpers/application_helper.rb
with_link = params.has_key?(:with_link) ? params[:with_link] : true
image_padding = params.has_key?(:image_padding) ? params[:image_padding] : 5
frame_margin = params.has_key?(:frame_margin) ? params[:frame_margin] : 3
classes = params.has_key?(:classes) ? params[:classes].to_a : []
thumb = image.thumbnail(size)
frame_width = thumb.width + image_padding * 2
style = "text-align: center; padding: 0px; width: #{frame_width}px;"
style = "width: #{frame_width}px;"
#style += " border: 1px solid red;"
case frame_type
when :classic
......
style += " margin: #{frame_margin}px; display: inline-block;"
end
html = "<div class=\"image_frame\" style=\"" + style + "\">"
classes << "image_frame" unless classes.member? "image_frame"
html = "<div class=\"#{classes.join(" ")}\" style=\"" + style + "\">"
html += "<div style=\"padding: #{image_padding}px #{image_padding}px 0; margin: 0px;\">" + display_thumbnail(image, size) + "</div>"
html += "<div>"
infos = []

Also available in: Unified diff