help: move all partials to shared/help
This commit is contained in:
parent
05fc6cf331
commit
e6351b5b1c
10 changed files with 60 additions and 66 deletions
|
@ -1,20 +0,0 @@
|
|||
.dropdown.help-dropdown
|
||||
.button.primary.dropdown-button Aide
|
||||
.dropdown-content.fade-in-down
|
||||
%ul.dropdown-items
|
||||
|
||||
-# Use the help website
|
||||
%li
|
||||
= link_to FAQ_URL, target: "_blank", rel: "noopener" do
|
||||
%span.icon.help
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title Un problème avec le site ?
|
||||
%p Trouvez votre réponse dans l’aide en ligne.
|
||||
|
||||
-# Technical contact
|
||||
%li
|
||||
= mail_to CONTACT_EMAIL do
|
||||
%span.icon.mail
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title Contact technique
|
||||
%p Envoyez nous un message à #{CONTACT_EMAIL}.
|
|
@ -88,9 +88,11 @@
|
|||
|
||||
%li
|
||||
.header-help
|
||||
- if nav_bar_profile == :user && dossier.present?
|
||||
= render partial: 'users/dossier_help_dropdown', locals: { dossier: dossier }
|
||||
- if dossier.present? && nav_bar_profile == :user
|
||||
= render partial: 'shared/help/help_dropdown_dossier', locals: { dossier: dossier }
|
||||
|
||||
- elsif nav_bar_profile == :gestionnaire
|
||||
= render partial: 'gestionnaires/help_dropdown'
|
||||
= render partial: 'shared/help/help_dropdown_gestionnaire'
|
||||
|
||||
- else
|
||||
= link_to 'Aide', FAQ_URL, class: "button primary"
|
||||
= render partial: 'shared/help/help_button'
|
||||
|
|
1
app/views/shared/help/_help_button.html.haml
Normal file
1
app/views/shared/help/_help_button.html.haml
Normal file
|
@ -0,0 +1 @@
|
|||
= link_to 'Aide', FAQ_URL, class: 'button primary'
|
14
app/views/shared/help/_help_dropdown_dossier.html.haml
Normal file
14
app/views/shared/help/_help_dropdown_dossier.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
.dropdown.help-dropdown
|
||||
.button.primary.dropdown-button Aide
|
||||
.dropdown-content.fade-in-down
|
||||
%ul.dropdown-items
|
||||
- title = dossier.brouillon? ? "Besoin d’aide pour remplir votre dossier ?" : "Une question sur votre dossier ?"
|
||||
|
||||
- if dossier.messagerie_available?
|
||||
= render partial: 'shared/help/dropdown_items/messagerie_item',
|
||||
locals: { dossier: dossier, title: title }
|
||||
- elsif dossier.procedure.service.present?
|
||||
= render partial: 'shared/help/dropdown_items/service_item',
|
||||
locals: { service: dossier.procedure.service, title: title }
|
||||
|
||||
= render partial: 'shared/help/dropdown_items/faq_item'
|
|
@ -0,0 +1,6 @@
|
|||
.dropdown.help-dropdown
|
||||
.button.primary.dropdown-button Aide
|
||||
.dropdown-content.fade-in-down
|
||||
%ul.dropdown-items
|
||||
= render partial: 'shared/help/dropdown_items/faq_item'
|
||||
= render partial: 'shared/help/dropdown_items/email_item'
|
|
@ -0,0 +1,6 @@
|
|||
%li
|
||||
= mail_to CONTACT_EMAIL do
|
||||
%span.icon.mail
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title Contact technique
|
||||
%p Envoyez nous un message à #{CONTACT_EMAIL}.
|
6
app/views/shared/help/dropdown_items/_faq_item.html.haml
Normal file
6
app/views/shared/help/dropdown_items/_faq_item.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
%li
|
||||
= link_to FAQ_URL, target: "_blank", rel: "noopener" do
|
||||
%span.icon.help
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title Un problème avec le site ?
|
||||
%p Trouvez votre réponse dans l’aide en ligne.
|
|
@ -0,0 +1,6 @@
|
|||
%li
|
||||
= link_to messagerie_dossier_path(dossier) do
|
||||
%span.icon.mail
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title= title
|
||||
%p Envoyez directement un message à l’instructeur.
|
15
app/views/shared/help/dropdown_items/_service_item.html.haml
Normal file
15
app/views/shared/help/dropdown_items/_service_item.html.haml
Normal file
|
@ -0,0 +1,15 @@
|
|||
%li.help-dropdown-service
|
||||
%span.icon.person
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title= title
|
||||
.help-dropdown-service-action
|
||||
%p Contactez directement l’administration :
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.mail
|
||||
= link_to service.email, "mailto:#{service.email}"
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.phone
|
||||
= link_to service.telephone, "tel:#{service.telephone}"
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.clock
|
||||
= service.horaires
|
|
@ -1,42 +0,0 @@
|
|||
.dropdown.help-dropdown
|
||||
.button.primary.dropdown-button Aide
|
||||
.dropdown-content.fade-in-down
|
||||
%ul.dropdown-items
|
||||
|
||||
- title = dossier.brouillon? ? "Besoin d’aide pour remplir votre dossier ?" : "Une question sur votre dossier ?"
|
||||
|
||||
- if dossier.messagerie_available?
|
||||
-# Contact the administration using the messagerie
|
||||
%li
|
||||
= link_to messagerie_dossier_path(dossier) do
|
||||
%span.icon.mail
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title= title
|
||||
%p Envoyez directement un message à l’instructeur.
|
||||
|
||||
- elsif dossier.procedure.service.present?
|
||||
- service = dossier.procedure.service
|
||||
-# Contact the administration using email or phone
|
||||
%li.help-dropdown-service
|
||||
%span.icon.person
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title= title
|
||||
.help-dropdown-service-action
|
||||
%p Contactez directement l’administration :
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.mail
|
||||
= link_to service.email, "mailto:#{service.email}"
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.phone
|
||||
= link_to service.telephone, "tel:#{service.telephone}"
|
||||
%p.help-dropdown-service-item
|
||||
%span.icon.small.clock
|
||||
= service.horaires
|
||||
|
||||
-# Use the help website
|
||||
%li
|
||||
= link_to FAQ_URL, target: "_blank", rel: "noopener" do
|
||||
%span.icon.help
|
||||
.dropdown-description
|
||||
%h4.help-dropdown-title Un problème avec le site ?
|
||||
%p Trouvez votre réponse dans l’aide en ligne.
|
Loading…
Reference in a new issue