fix: can display contact_info nom on footer
This commit is contained in:
parent
1060aadff7
commit
6035a16ecc
3 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,10 @@ class ContactInformation < ApplicationRecord
|
||||||
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
|
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
|
||||||
validates :groupe_instructeur, presence: { message: 'doit être renseigné' }, allow_nil: false
|
validates :groupe_instructeur, presence: { message: 'doit être renseigné' }, allow_nil: false
|
||||||
|
|
||||||
|
def pretty_nom
|
||||||
|
nom
|
||||||
|
end
|
||||||
|
|
||||||
def telephone_url
|
def telephone_url
|
||||||
if telephone.present?
|
if telephone.present?
|
||||||
"tel:#{telephone.gsub(/[[:blank:]]/, '')}"
|
"tel:#{telephone.gsub(/[[:blank:]]/, '')}"
|
||||||
|
|
|
@ -25,6 +25,10 @@ class Service < ApplicationRecord
|
||||||
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
|
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
|
||||||
validates :administrateur, presence: { message: 'doit être renseigné' }, allow_nil: false
|
validates :administrateur, presence: { message: 'doit être renseigné' }, allow_nil: false
|
||||||
|
|
||||||
|
def pretty_nom
|
||||||
|
"#{nom}, #{organisme}"
|
||||||
|
end
|
||||||
|
|
||||||
def clone_and_assign_to_administrateur(administrateur)
|
def clone_and_assign_to_administrateur(administrateur)
|
||||||
service_cloned = self.dup
|
service_cloned = self.dup
|
||||||
service_cloned.administrateur = administrateur
|
service_cloned.administrateur = administrateur
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
- if service.present?
|
- if service.present?
|
||||||
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header')
|
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header')
|
||||||
.fr-footer__top-link.fr-pb-2w
|
.fr-footer__top-link.fr-pb-2w
|
||||||
%span{ lang: :fr }= "#{service.nom}, #{service.organisme},"
|
%span{ lang: :fr }= service.pretty_nom
|
||||||
%div{ lang: :fr }
|
%div{ lang: :fr }
|
||||||
= render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'})
|
= render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'})
|
||||||
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.contact.header')
|
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.contact.header')
|
||||||
|
|
Loading…
Reference in a new issue