style fixes

This commit is contained in:
chris-ibcsf 2016-02-22 22:46:37 +01:00
parent 79b7f61116
commit 808c017bcd

View File

@ -220,9 +220,9 @@ Redmine::Plugin.register :redmine_dmsf do
raise 'Not supported image format' unless file.image?
url = url_for(:controller => :dmsf_files, :action => 'view', :id => file)
file_view_url = url_for(:controller => :dmsf_files, :action => 'view', :id => file, :download => args[2])
if size and size.include? "%"
if size && size.include?("%")
img = image_tag(url, :alt => file.title, :width => size, :height => size)
elsif size and size.include? "x"
elsif size && size.include?("x")
img = image_tag(url, :alt => file.title, :size => size)
elsif height
img = image_tag(url, :alt => file.title, :width => 'auto', :height => height)