Fix path to procedure logo

This commit is contained in:
Guillaume Lazzara 2016-07-05 11:50:56 +02:00
parent aebc673cdc
commit e1f73f3bdc
3 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ class ProcedureDecorator < Draper::Decorator
def logo_img
return 'logo-tps.png' if logo.blank?
logo
File.join(STORAGE_URL, File.basename(logo.path))
end
def geographic_information
module_api_carto

View file

@ -1,6 +1,6 @@
%h2.text-info
-unless @procedure.logo.blank?
= image_tag @procedure.logo, style: 'width: 30px'
= image_tag @procedure.decorate.logo_img, style: 'width: 30px'
=@procedure.libelle
%br

View file

@ -15,7 +15,7 @@
.col-md-6.col-lg-6
%h4 Logo de la procédure
- unless @procedure.logo.blank?
= image_tag @procedure.logo, {style: 'height: 40px; display: inline; margin-right: 6px', id: 'preview_procedure_logo'}
= image_tag @procedure.decorate.logo_img, {style: 'height: 40px; display: inline; margin-right: 6px', id: 'preview_procedure_logo'}
= f.file_field(:logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display:inline')
%div{style:'margin-top:5px'}