Merge pull request #7900 from colinux/fix-avis-ui

style(avis): fix font-size & font-weight
This commit is contained in:
Colin Darie 2022-10-12 14:50:59 +02:00 committed by GitHub
commit 61337c1dd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 20 deletions

View file

@ -48,7 +48,7 @@
font-size: 18px;
}
.bold-weight-bold {
.font-weight-bold {
font-weight: bold !important;
}

View file

@ -8,6 +8,7 @@
h2 {
margin-bottom: $default-padding;
font-size: 16px;
.email {
font-weight: bold;
@ -74,6 +75,10 @@
}
.list-avis {
ul {
padding-inline-start: 0;
}
.one-avis {
border-top: 1px solid $grey;
padding: $default-padding 0;
@ -84,6 +89,7 @@
h2 {
margin-bottom: $default-spacer;
font-size: 16px;
.email {
font-weight: bold;

View file

@ -7,30 +7,30 @@
- avis.each do |avis|
%li.one-avis.flex.align-start
.width-100
%h2.claimant.fr-h6
%h2.claimant.fr-font--md.font-weight-normal
= "#{t('claimant', scope: 'activerecord.attributes.avis')} :"
%span.fr-text--xs.fr-text-mention--grey.font-weight-normal= (safe_claimant_email(avis.claimant) == current_expert.email) ? 'Vous' : safe_claimant_email(avis.claimant)
%span.font-weight-bold= (safe_claimant_email(avis.claimant) == current_expert.email) ? 'Vous' : safe_claimant_email(avis.claimant)
- if avis.confidentiel?
%span.confidentiel.font-weight-normal
%span.confidentiel
= t('confidentiel', scope: 'activerecord.attributes.avis')
%span.icon.lock{ title: t('confidentiel', scope: 'helpers.hint') }
%span.date.fr-text--xs.fr-text-mention--grey.font-weight-normal{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
= t('demande_envoyee_le', scope: 'views.shared.avis', date: l(avis.created_at, format: '%d/%m/%y à %H:%M'))
%p= avis.introduction
.answer.flex.align-start
%span.icon.bubble.avis-icon
.width-100
%h2.instructeur.fr-h6
%h2.instructeur.fr-font--md.font-weight-normal
= (avis.expert.email == current_expert.email) ? 'Vous' : avis.expert.email
- if avis.answer.present?
- if avis.revoked?
%span.waiting.font-weight-normal{ class: highlight_if_unseen_class(avis_seen_at, avis.revoked_at) }
%span.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.revoked_at) }
= t('demande_revoquee_le', scope: 'views.shared.avis', date: l(avis.revoked_at, format: '%d/%m/%y à %H:%M'))
%span.date.fr-text--xs.fr-text-mention--grey.font-weight-normal{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
= t('reponse_donnee_le', scope: 'views.shared.avis', date: l(avis.updated_at, format: '%d/%m/%y à %H:%M'))
- else
%span.waiting.font-weight-normal
%span.fr-text--xs.fr-text-mention--grey
= t('en_attente', scope: 'views.shared.avis')
- if avis.piece_justificative_file.attached?
= render Attachment::ShowComponent.new(attachment: avis.piece_justificative_file.attachment)

View file

@ -29,7 +29,7 @@
%span
Cet avis est partagé avec les autres experts
.send-wrapper
= f.submit 'Envoyer votre avis', class: 'button send'
= f.submit 'Envoyer votre avis', class: 'fr-btn'
- if !@dossier.termine? && !@avis.procedure.feature_enabled?(:expert_not_allowed_to_invite)
= render partial: "instructeurs/shared/avis/form", locals: { url: avis_instructeur_avis_path(@avis.procedure, @avis), linked_dossiers: @dossier.linked_dossiers_for(current_instructeur), must_be_confidentiel: @avis.confidentiel?, avis: @new_avis }

View file

@ -41,4 +41,4 @@
.confidentiel-explanation.hidden
Il ne sera pas affiché aux autres experts consultés, mais sera visible par les instructeurs.
= f.submit 'Demander un avis', class: 'button primary send'
= f.submit 'Demander un avis', class: 'fr-btn'

View file

@ -7,36 +7,36 @@
- avis.each do |avis|
%li.one-avis.flex.align-start
.width-100
%h2.claimant
%h2.claimant.fr-font--md.font-weight-normal
= "#{t('claimant', scope: 'activerecord.attributes.avis')} :"
%span.email= (avis.claimant.email == current_instructeur.email) ? 'Vous' : avis.claimant.email
%span.font-weight-bold= (avis.claimant.email == current_instructeur.email) ? 'Vous' : avis.claimant.email
- if avis.confidentiel?
%span.confidentiel
= t('confidentiel', scope: 'activerecord.attributes.avis')
%span.icon.lock{ title: t('confidentiel', scope: 'helpers.hint') }
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.created_at) }
= t('demande_envoyee_le', scope: 'views.shared.avis', date: l(avis.created_at, format: '%d/%m/%y à %H:%M'))
%p= avis.introduction
.answer.flex.align-start
%span.icon.bubble.avis-icon
.width-100
%h2.instructeur
%h2.instructeur.fr-font--md.font-weight-normal
= (avis.expert.email == current_instructeur.email) ? 'Vous' : avis.expert.email
- if avis.answer.present?
- if avis.revoked?
%span.waiting{ class: highlight_if_unseen_class(avis_seen_at, avis.revoked_at) }
%span.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.revoked_at) }
= t('demande_revoquee_le', scope: 'views.shared.avis', date: l(avis.revoked_at, format: '%d/%m/%y à %H:%M'))
- else
- if avis.revokable_by?(current_instructeur)
%span.waiting= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
%span.date{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
%span.fr-text--xs.fr-text-mention--grey= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)
%span.date.fr-text--xs.fr-text-mention--grey{ class: highlight_if_unseen_class(avis_seen_at, avis.updated_at) }
= t('reponse_donnee_le', scope: 'views.shared.avis', date: l(avis.updated_at, format: '%d/%m/%y à %H:%M'))
- else
%span.waiting
%span.fr-text--xs.fr-text-mention--grey
= t('en_attente', scope: 'views.shared.avis')
|
%span.waiting= link_to(t('revive', scope: 'helpers.label'), revive_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revive', scope: 'helpers.confirmation', email: avis.expert.email) })
%span= link_to(t('revive', scope: 'helpers.label'), revive_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revive', scope: 'helpers.confirmation', email: avis.expert.email) })
- if avis.revokable_by?(current_instructeur)
|
= link_to(t('revoke', scope: 'helpers.label'), revoquer_instructeur_avis_path(avis.procedure, avis), data: { confirm: t('revoke', scope: 'helpers.confirmation', email: avis.expert.email) }, method: :patch)