Add dynamic logo (opensimplif)

This commit is contained in:
Xavier J 2016-11-03 17:20:56 +01:00
parent 68951c3a53
commit e10c218d3a
14 changed files with 14 additions and 12 deletions

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

View file

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

View file

@ -1,6 +1,6 @@
#form_login
%br
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#login_admin
=t('dynamics.admin.connexion_title')

View file

@ -1,7 +1,7 @@
= devise_error_messages!
#form_login
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Changement de mot de passe

View file

@ -2,7 +2,7 @@
%br
#form_login
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Mot de passe oublié

View file

@ -1,6 +1,6 @@
#form_login
%br
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Accompagnateur

View file

@ -5,7 +5,7 @@
Env Test
= image_tag('marianne_small.png', class: 'logo')
%a{href: '/'}
= image_tag('logo-tps.png', class: 'logo')
= image_tag(LOGO_NAME, class: 'logo')
- if gestionnaire_signed_in? && user_signed_in?
%a{href: (current_gestionnaire.procedure_filter.blank? ? backoffice_dossiers_path : backoffice_dossiers_procedure_path(current_gestionnaire.procedure_filter)), class: 'btn btn-md'}

View file

@ -29,7 +29,7 @@
= devise_error_messages!
#form_login
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Changement de mot de passe

View file

@ -30,7 +30,7 @@
%br
#form_login
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Mot de passe oublié

View file

@ -30,7 +30,7 @@
#form_login
%br
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#gestionnaire_login Inscription

View file

@ -17,7 +17,7 @@
- else
= image_tag('logo-tps.png', {id: 'logo_tps'})
= image_tag(LOGO_NAME, {id: 'logo_tps'})
%br
%h2#login_user

View file

@ -1,6 +1,6 @@
%p.lead{id: 'pro_section'}
= image_tag('logo-tps.png')
= image_tag(LOGO_NAME)
%br
%h2#titre_procedure.text-info
= @procedure.libelle

View file

@ -0,0 +1,2 @@
LOGO_NAME = 'logos/logo-tps.png' unless Features.opensimplif
LOGO_NAME = 'logos/logo-opensimplif.jpg' if Features.opensimplif

View file

@ -16,7 +16,7 @@ describe ProcedureDecorator do
describe 'logo_img' do
subject { super().logo_img }
it { is_expected.to eq('logo-tps.png') }
it { is_expected.to eq(LOGO_NAME) }
end
describe 'geographic_information' do