Merge pull request #9529 from demarches-simplifiees/fix-contact-information
Fix contact information
This commit is contained in:
commit
63ca98b5b6
4 changed files with 10 additions and 2 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
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
= succeed '.' do
|
= succeed '.' do
|
||||||
= link_to t('.file_messagerie'), messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener'
|
= link_to t('.file_messagerie'), messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener'
|
||||||
|
|
||||||
|
- service = dossier&.service || dossier.procedure.service
|
||||||
- if service.present?
|
- if service.present?
|
||||||
%table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0", style: "cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;text-align:left;" }
|
%table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0", style: "cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;text-align:left;" }
|
||||||
%tr
|
%tr
|
||||||
|
@ -13,7 +14,6 @@
|
||||||
%strong
|
%strong
|
||||||
= t('.procedure_management')
|
= t('.procedure_management')
|
||||||
= service.nom
|
= service.nom
|
||||||
= service.organisme
|
|
||||||
= service.adresse
|
= service.adresse
|
||||||
%td{ width: "50%", valign: "top" }
|
%td{ width: "50%", valign: "top" }
|
||||||
%p
|
%p
|
||||||
|
|
|
@ -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