ual_app/app/views/admin/contact_files/_contact_file.html.haml
2016-10-20 18:24:38 +02:00

19 lines
754 B
Plaintext

- if contact_file.file?
%tr#contact_file.contact_file{:id => contact_file.id, :class => ("new" if @contact_file_create)}
%td{:style => "width:32px;text-align:center;"}
-ext = File.extname(contact_file.file.path)[1..-1]
=image_tag "file_types/"+ext+".png", :style => "height:30px;"
%td
=contact_file.name
%td{:style => "width:300px;"}
=contact_file.file_type
%td{:style => "width:100px;"}
= link_to i(:"trash-o"), admin_contact_file_path(:id => contact_file.id, :manager => params[:manager], :multiple => params[:multiple]), :data => {:confirm => 'Voulez-vous vraiment supprimer cette pièce jointe ?'}, :method => :delete, :remote => true
=link_to i(:"download"), contact_file.file.url