app/views/components/lolita/configuration/tab/files/_fixed_gallery.html.haml in lolita-file-upload-0.2.3 vs app/views/components/lolita/configuration/tab/files/_fixed_gallery.html.haml in lolita-file-upload-0.2.4
- old
+ new
@@ -25,9 +25,10 @@
- resource_class.lolita.tabs.select{|tab| tab.type == :files}.each do |tab|
%h1= tab.title
- files = tab.association_type == :one ? [resource.send(tab.association.name)].compact : resource.send(tab.association.name)
- files.each do |file|
- if file.send(tab.uploader).to_s =~ /(jpg|jpeg|png|gif)$/i
- = image_tag(file.send(tab.uploader).url)
+ - url = file.send(tab.uploader).normalized.url.blank? ? file.send(tab.uploader).url : file.send(tab.uploader).normalized.url
+ = image_tag(url)
- else
= link_to file.send(tab.uploader).url, file.send(tab.uploader).url
%button{:onclick=>"$('#fixed-gallery').hide();"}Aizvērt
\ No newline at end of file