Revision 2bb0d6d3
Added by Marc Dequènes over 15 years ago
- ID 2bb0d6d34eb653e1898d0db503fc8ae95c4377bf
app/helpers/application_helper.rb | ||
---|---|---|
display_title = params.has_key?(:display_title) ? params[:display_title] : true
|
||
display_size = params.has_key?(:display_size) ? params[:display_size] : true
|
||
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
|
||
|
||
thumb = image.artwork_step_thumbnails.find_by_thumbnail(size.to_s)
|
||
img_padding = 5
|
||
frame_margin = 3
|
||
frame_width = thumb.width + img_padding * 2
|
||
frame_width = thumb.width + image_padding * 2
|
||
style = "text-align: center; padding: 0px; width: #{frame_width}px;"
|
||
#style += " border: 1px solid red;"
|
||
case frame_type
|
||
... | ... | |
end
|
||
|
||
html = "<div class=\"artwork_frame\" style=\"" + style + "\">"
|
||
html += "<div style=\"padding: #{img_padding}px #{img_padding}px 0; margin: 0px;\">" + display_thumbnail(image, size) + "</div>"
|
||
html += "<div style=\"padding: #{image_padding}px #{image_padding}px 0; margin: 0px;\">" + display_thumbnail(image, size) + "</div>"
|
||
html += "<div>"
|
||
infos = []
|
||
if display_title
|
Also available in: Unified diff
[evol] image frame improvements #3 (cleanup)