accescible_app/app/views/portlets/render_public/_imagecontent.html.haml
Nicolas Bally d4484275e8 initial
2011-06-25 12:08:06 +02:00

37 lines
846 B
Plaintext

-if input.image_file
-if input.style== "1"
-url =input.image_file.file.large.medium.url
-elsif input.style== "2"
-url =input.image_file.file.large.medium.small.url
-elsif input.style== "3"
-url =input.image_file.file.square.url
-elsif input.style== "4"
-url =input.image_file.file.large.medium.small.thumb.url
-else
-url =""
-url = "http://"+HOSTNAME+url
-style = ""
-style = "text-align:center;" if input.alignement == "center"
-style = "float:right;" if input.alignement == "right"
-style = "float:left;" if input.alignement == "left"
-if input.expandable
%p.img{:style =>style}
=link_to image_tag(url, :alt => input.alt.to_s), (input.image_file ? input.image_file.file.large.url : ""), :rel => "prettyPhoto", :title => input.alt.to_s
-else
%p.img{:style =>style}
=image_tag(url, :alt => input.alt.to_s)