accessibilite(page#dossiers): utiliser les role=alert sur le status des dossiers
This commit is contained in:
parent
0a10a08c21
commit
4e201a245b
4 changed files with 31 additions and 38 deletions
|
@ -13,14 +13,10 @@
|
|||
|
||||
|
||||
.status-explanation
|
||||
- if dossier.brouillon?
|
||||
.brouillon
|
||||
%p Votre dossier n’est pas encore visible par l’administration.
|
||||
%p Vous pouvez déposer votre dossier afin de le transmettre à l’administration. Une fois soumis, vous pourrez toujours modifier votre dossier.
|
||||
|
||||
- elsif dossier.en_construction?
|
||||
-# brouillon does not occure
|
||||
- if dossier.en_construction?
|
||||
.en-construction
|
||||
%p
|
||||
%p{ role: 'status' }
|
||||
= t('views.users.dossiers.show.status_overview.en_construction_html')
|
||||
|
||||
= render partial: 'users/dossiers/show/estimated_delay', locals: { procedure: dossier.procedure }
|
||||
|
@ -30,7 +26,7 @@
|
|||
|
||||
- elsif dossier.en_instruction?
|
||||
.en-instruction
|
||||
%p
|
||||
%p{ role: 'alert' }
|
||||
= t('views.users.dossiers.show.status_overview.admin_review')
|
||||
|
||||
= render partial: 'users/dossiers/show/estimated_delay', locals: { procedure: dossier.procedure }
|
||||
|
@ -40,14 +36,12 @@
|
|||
|
||||
- elsif dossier.accepte?
|
||||
.accepte
|
||||
%p.decision
|
||||
%p.decision{ role: 'alert' }
|
||||
%span.icon.accept
|
||||
Votre dossier a été
|
||||
= succeed '.' do
|
||||
%strong accepté
|
||||
= t('views.users.dossiers.show.status_overview.acceptee_html')
|
||||
|
||||
- if dossier.motivation.present?
|
||||
%h3 Motif de l’acceptation
|
||||
%h3= t('views.users.dossiers.show.status_overview.accepte_motivation')
|
||||
%blockquote= dossier.motivation
|
||||
|
||||
= render partial: 'users/dossiers/show/download_justificatif', locals: { dossier: dossier }
|
||||
|
@ -56,35 +50,31 @@
|
|||
.action
|
||||
= link_to attestation_dossier_path(dossier), target: '_blank', rel: 'noopener', class: 'button primary' do
|
||||
%span.icon.download-white
|
||||
Télécharger l’attestation
|
||||
= t('views.users.dossiers.show.status_overview.accepte_attestation')
|
||||
|
||||
|
||||
- elsif dossier.refuse?
|
||||
.refuse
|
||||
%p.decision
|
||||
%p.decision{ role: 'alert' }
|
||||
%span.icon.refuse
|
||||
Nous sommes désolés, votre dossier a malheureusement été
|
||||
= succeed '.' do
|
||||
%strong refusé
|
||||
= t('views.users.dossiers.show.status_overview.refuse_html')
|
||||
|
||||
- if dossier.motivation.present?
|
||||
%h3 Motif du refus
|
||||
%h3= t('views.users.dossiers.show.status_overview.refuse_motivation')
|
||||
%blockquote= dossier.motivation
|
||||
|
||||
= render partial: 'users/dossiers/show/download_justificatif', locals: { dossier: dossier }
|
||||
.action
|
||||
= link_to 'Envoyer un message à l’administration', messagerie_dossier_url(dossier, anchor: 'new_commentaire'), class: 'button'
|
||||
= link_to t('views.users.dossiers.show.status_overview.refuse_reply'), messagerie_dossier_url(dossier, anchor: 'new_commentaire'), class: 'button'
|
||||
|
||||
- elsif dossier.sans_suite?
|
||||
.sans-suite
|
||||
%p.decision
|
||||
%p.decision{ role: 'alert' }
|
||||
%span.icon.without-continuation
|
||||
Votre dossier a été classé
|
||||
= succeed '.' do
|
||||
%strong sans suite
|
||||
= t('views.users.dossiers.show.status_overview.sans_suite_html')
|
||||
|
||||
= render partial: 'users/dossiers/show/download_justificatif', locals: { dossier: dossier }
|
||||
|
||||
- if dossier.motivation.present?
|
||||
%h3 Motif du classement sans suite
|
||||
%h3= t('views.users.dossiers.show.status_overview.sans_suite_motivation')
|
||||
%blockquote= dossier.motivation
|
||||
|
|
|
@ -257,6 +257,14 @@ en:
|
|||
admin_review: The administration is reviewing your file. You are no longer able to edit it.
|
||||
status_completed: completed
|
||||
use_mailbox_for_questions_html: "<strong>You have a question?</strong> Use the mailbox to <a href=\"%{mailbox_url}\">contact the administration directly</a>."
|
||||
acceptee_html: "Your file had been <strong>accepted</strong>."
|
||||
accepte_motivation: "Reason"
|
||||
accepte_attestation: "Download the attestation"
|
||||
refuse_html: "Sorry, your file had been <strong>rejected</strong>."
|
||||
refuse_motivation: "Reason"
|
||||
refuse_reply: "Send a message to the administration"
|
||||
sans_suite_html: "Your file had been <strong>closed, no further action</strong>."
|
||||
sans_suite_motivation: "Reason"
|
||||
latest_message:
|
||||
latest_message: "Latest message"
|
||||
messagerie:
|
||||
|
|
|
@ -251,6 +251,14 @@ fr:
|
|||
admin_review: Votre dossier est en cours d’instruction par l’administration. Vous ne pouvez plus le modifier.
|
||||
status_completed: terminé
|
||||
use_mailbox_for_questions_html: "<strong>Vous avez une question ?</strong> Utilisez la messagerie pour <a href=\"%{mailbox_url}\">contacter l’administration directement</a>."
|
||||
acceptee_html: "Votre dossier a été <strong>accepté</strong>."
|
||||
accepte_motivation: "Motif de l’acceptation"
|
||||
accepte_attestation: "Télécharger l’attestation"
|
||||
refuse_html: "Nous sommes désolés, votre dossier a malheureusement été <strong>refusé</strong>."
|
||||
refuse_motivation: "Motif du refus"
|
||||
refuse_reply: "Envoyer un message à l’administration"
|
||||
sans_suite_html: "Votre dossier a été classé <strong>sans suite</strong>."
|
||||
sans_suite_motivation: "Motif du classement sans suite"
|
||||
latest_message:
|
||||
latest_message: "Dernier message"
|
||||
messagerie:
|
||||
|
|
|
@ -24,19 +24,6 @@ describe 'users/dossiers/show/_status_overview.html.haml', type: :view do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when brouillon' do
|
||||
let(:dossier) { create :dossier }
|
||||
|
||||
it 'renders the timeline (without the final states)' do
|
||||
expect(rendered).to have_timeline_item('.brouillon').active
|
||||
expect(rendered).to have_timeline_item('.en-construction').inactive
|
||||
expect(rendered).to have_timeline_item('.en-instruction').inactive
|
||||
expect(rendered).to have_timeline_item('.termine').inactive
|
||||
end
|
||||
|
||||
it { is_expected.to have_selector('.status-explanation .brouillon') }
|
||||
end
|
||||
|
||||
context 'when en construction' do
|
||||
let(:dossier) { create :dossier, :en_construction }
|
||||
|
||||
|
|
Loading…
Reference in a new issue