Add dynamic logo (opensimplif)
This commit is contained in:
parent
68951c3a53
commit
e10c218d3a
14 changed files with 14 additions and 12 deletions
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
%br
|
||||
#form_login
|
||||
= image_tag('logo-tps.png')
|
||||
= image_tag(LOGO_NAME)
|
||||
%br
|
||||
%h2#gestionnaire_login Mot de passe oublié
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#form_login
|
||||
%br
|
||||
= image_tag('logo-tps.png')
|
||||
= image_tag(LOGO_NAME)
|
||||
%br
|
||||
%h2#gestionnaire_login Accompagnateur
|
||||
|
||||
|
|
|
@ -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'}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
%br
|
||||
#form_login
|
||||
= image_tag('logo-tps.png')
|
||||
= image_tag(LOGO_NAME)
|
||||
%br
|
||||
%h2#gestionnaire_login Mot de passe oublié
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#form_login
|
||||
%br
|
||||
= image_tag('logo-tps.png')
|
||||
= image_tag(LOGO_NAME)
|
||||
%br
|
||||
%h2#gestionnaire_login Inscription
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
- else
|
||||
= image_tag('logo-tps.png', {id: 'logo_tps'})
|
||||
= image_tag(LOGO_NAME, {id: 'logo_tps'})
|
||||
%br
|
||||
|
||||
%h2#login_user
|
||||
|
|
|
@ -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
|
||||
|
|
2
config/initializers/logos.rb
Normal file
2
config/initializers/logos.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
LOGO_NAME = 'logos/logo-tps.png' unless Features.opensimplif
|
||||
LOGO_NAME = 'logos/logo-opensimplif.jpg' if Features.opensimplif
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue