Merge pull request #9755 from colinux/dark-theme-icons

Thème sombre: adapte une bonne partie des icônes
This commit is contained in:
Colin Darie 2023-12-04 14:17:37 +00:00 committed by GitHub
commit 70ddced7e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 144 additions and 327 deletions

View file

@ -1 +0,0 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m0 0h24v24h-24z"/><g stroke="#15ad70" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m12 1c-6.072 0-11 4.928-11 11s4.928 11 11 11 11-4.928 11-11-4.928-11-11-11z"/><path d="m6 12.093 4.182 3.907 7.818-8"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 371 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><g stroke="#000091" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M20.54 4.23l-1.391-1.68A1.447 1.447 0 0 0 18 2H6c-.471 0-.88.21-1.16.55L3.46 4.23C3.17 4.57 3 5.02 3 5.5V18c0 1.1.899 2 2 2h14c1.1 0 2-.9 2-2V5.5c0-.48-.17-.93-.46-1.27z"/><path d="M12.088 7.333h3.438c0-2 2.562-2 2.562-2h2l.842-.38a1.933 1.933 0 0 0-.385-.723l-1.39-1.68a1.448 1.448 0 0 0-1.15-.55h-12c-.47 0-.88.21-1.16.55l-1.38 1.68a1.913 1.913 0 0 0-.395.763l.018.34h3s2.562 0 2.562 2h3.438M9 13.868l3 3 3-3M12 16v-5"/></g><path d="M0 0h24v24H0z"/></g></svg>

Before

Width:  |  Height:  |  Size: 672 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z" clip-rule="evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 296 B

View file

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 294 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path stroke="#000091" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"/><path d="M0 0h24v24H0z"/></g></svg>

Before

Width:  |  Height:  |  Size: 337 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path stroke="#000091" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3.5 21h18M18.878 8.871l1.829-1.829a.994.994 0 0 0 0-1.41l-2.339-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83-1.069 1.07L3 17.25V21h3.75L17.808 9.941l1.07-1.07zm-3.609-3.662l3.396 3.542"/><path d="M0 0h24v24H0z"/></g></svg>

Before

Width:  |  Height:  |  Size: 424 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><g fill="none" fill-rule="evenodd"><path d="M11 6L9 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-6" stroke="#000091" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M0 0h24v24H0z"/></g><g transform="translate(8 -8)" fill="#000091"><rect ry="1" y="12" x="6" height="2" width="10"/><rect width="2" height="10" x="10" y="8" ry="1"/></g></svg>

Before

Width:  |  Height:  |  Size: 446 B

View file

@ -1 +0,0 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m12 1c-6.072 0-11 4.928-11 11s4.928 11 11 11 11-4.928 11-11-4.928-11-11-11zm3.833 7-7.833 7.833zm0 7.833-7.833-7.833z" fill="none" stroke="#ed1c24" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></svg>

Before

Width:  |  Height:  |  Size: 311 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="M6 18.857C6 20.037 6.749 21 7.667 21h8.666C17.25 21 18 20.037 18 18.857V6H6v12.857zM4 6h16M9 11v5m3-5v5m3-5v5M8.5 4.889c0-.858.696-1.89 1.556-1.89h3.888c.86 0 1.556 1.032 1.556 1.89" stroke="#000091" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M0 0h24v24H0z"/></g></svg>

Before

Width:  |  Height:  |  Size: 427 B

View file

@ -1 +0,0 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m12 1c-6.072 0-11 4.928-11 11s4.928 11 11 11 11-4.928 11-11-4.928-11-11-11z" stroke="#333" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><g fill="#333" fill-rule="nonzero"><circle cx="8" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="16" cy="12" r="1"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 424 B

View file

@ -39,10 +39,6 @@
margin-right: 4px;
}
.autosave-icon.icon.accept {
vertical-align: -8px;
}
.autosave-retry {
&:disabled {
.autosave-retry-label {

View file

@ -31,12 +31,6 @@ form.form > .conditionnel {
.delete-column {
width: 50px;
button {
background: none;
border: none;
cursor: pointer;
}
}
}

View file

@ -15,10 +15,6 @@ $dossier-actions-bar-border-width: 1px;
h1 {
font-size: 2rem;
.icon.folder {
vertical-align: -3px;
}
}
.dossier-form-actions {

View file

@ -30,15 +30,6 @@
padding: (2 * $default-spacer) $default-spacer;
}
.icon.folder {
position: relative;
.notifications {
top: -3px;
right: -6px;
}
}
.notification-col {
a {
font-size: 16px;

View file

@ -73,9 +73,6 @@
}
.mandatory {
fill: currentColor;
}
label:not(.fr-label),
legend.form-label {
@ -650,6 +647,10 @@ textarea::placeholder {
background-color: var(--background-action-low-blue-france);
}
.mandatory {
fill: currentColor;
}
.fixed-footer {
border-top: 2px solid $blue-france-500;
position: fixed;

View file

@ -23,42 +23,14 @@
background-image: image-url("icons/standby.svg");
}
&.archive {
background-image: image-url("icons/archive.svg");
}
&.unarchive {
background-image: image-url("icons/unarchive.svg");
}
&.folder {
background-image: image-url("icons/folder.svg");
}
&.new-folder {
background-image: image-url("icons/new-folder.svg");
}
&.accept {
background-image: image-url("icons/accept.svg");
}
&.refuse {
background-image: image-url("icons/refuse.svg");
}
&.without-continuation {
background-image: image-url("icons/without-continuation.svg");
}
&.edit {
background-image: image-url("icons/edit-folder-blue.svg");
}
&.in-progress {
background-image: image-url("icons/in-progress-blue.svg");
}
&.bubble {
background-image: image-url("icons/bubble.svg");
}
@ -87,14 +59,6 @@
background-image: image-url("icons/lock.svg");
}
&.arrow-up {
background-image: image-url("icons/arrow-up.svg");
}
&.arrow-down {
background-image: image-url("icons/arrow-down.svg");
}
&.add {
background-image: image-url("icons/add.svg");
margin-left: -5px;
@ -113,10 +77,6 @@
background-image: image-url("icons/account-circle.svg");
}
&.person {
background-image: image-url("icons/blue-person.svg");
}
&.super-admin {
background-image: image-url("icons/super-admin.svg");
}
@ -166,11 +126,37 @@
background-image: image-url("icons/meh-regular.svg");
}
&.delete {
background-image: image-url("icons/trash.svg");
}
&.mandatory {
width: 10px;
}
}
// How to add a new remix icon and work with DSFR markup:
// 1. Find it on https://remixicon.com/
// 2. Take its DataURL (copy the url background-image value).
// 2b. No need to download the file !
// 3. Follow the first example : create the class then add the mask-image property with data url you copied
// 4. Keep this list alphabetic :)
.fr-icon {
&-calendar-close-fill {
&:before,
&:after {
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3V1H7V3H3C2.44772 3 2 3.44772 2 4V20C2 20.5523 2.44772 21 3 21H21C21.5523 21 22 20.5523 22 20V4C22 3.44772 21.5523 3 21 3H17V1H15V3H9ZM4 8H20V19H4V8ZM9.87852 9.9643L11.9999 12.0858L14.1211 9.96432L15.5354 11.3785L13.4141 13.5L15.5353 15.6211L14.1212 17.0354L11.9999 14.9142L9.87845 17.0354L8.46432 15.6211L10.5856 13.5L8.46426 11.3785L9.87852 9.9643Z'%3E%3C/path%3E%3C/svg%3E");
}
}
&-file-copy-line {
&:before,
&:after {
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z'%3E%3C/path%3E%3C/svg%3E");
}
}
&-intermediate-circle-fill {
&:before,
&:after {
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM7 11V13H17V11H7Z'%3E%3C/path%3E%3C/svg%3E");
}
}
}

View file

@ -1,31 +1,13 @@
@import "colors";
@import "constants";
[data-fr-theme="dark"] .message {
background: var(--background-action-low-blue-france);
&.inverted-background {
background: var(--background-action-low-blue-france);
}
}
.message {
display: flex;
align-items: flex-start;
margin-bottom: $default-padding;
padding: $default-padding;
background: $light-grey;
border-radius: 3px;
&.inverted-background {
background: $light-grey;
}
.person-icon {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}
@ -37,8 +19,4 @@
.date {
float: right;
}
.message-answer-button {
margin-left: auto;
}
}

View file

@ -47,10 +47,6 @@
h2 {
font-size: 110%;
}
.person-icon {
display: none;
}
}
}

View file

@ -26,11 +26,10 @@
}
.handle {
align-self: center;
cursor: grab;
&:hover {
opacity: 0.4;
background-color: var(--hover-tint);
}
}
@ -40,27 +39,6 @@
justify-content: flex-end;
}
.move-up,
.move-down {
@extend %outline;
display: inline-block;
width: 30px;
padding-bottom: 5px;
border-radius: 5px;
border: 1px solid $border-grey;
background-color: #FFFFFF;
color: $black;
text-align: center;
-webkit-appearance: none;
&:hover:not(:disabled) {
cursor: pointer;
background: $light-grey;
text-decoration: none;
}
}
&.first .move-up {
display: none;
}
@ -82,24 +60,22 @@
}
.flex {
&.section {
padding: $default-spacer $default-spacer 0;
margin-bottom: 8px;
&.flex-gap {
column-gap: $default-spacer * 2;
}
&.hr {
border-bottom: 1px solid $border-grey;
&.section {
margin-bottom: 8px;
padding: $default-spacer / 2 $default-spacer * 2;
}
&.head {
border-bottom: 1px solid var(--border-default-grey);
padding-bottom: 10px;
}
&.head {
border-bottom: 1px solid var(--border-default-grey);
padding: $default-spacer / 2 $default-spacer; // due to no-outline button horizontal padding, don't add twice the padding so it's aligned with section
}
}
.cell {
margin-right: $default-padding;
label {
margin-bottom: 8px;
text-transform: uppercase;

View file

@ -6,7 +6,7 @@
width: 100%;
tbody tr {
border-top: 1px solid $border-grey;
border-top: 1px solid var(--border-default-grey);
}
td,
@ -28,7 +28,7 @@
&.hoverable {
tbody tr:hover {
background-color: $light-grey;
background-color: var(--hover);
}
}
@ -56,22 +56,11 @@
width: calc(100vw);
}
[data-fr-theme="dark"] .fr-table--bordered {
.table {
&.hoverable {
tbody tr:hover {
background-color: var(--background-action-low-blue-france);
}
}
}
}
.fr-table--bordered {
.table {
&.hoverable {
tbody tr:hover {
background-color: $white;
background-color: var(--hover);
}
}
}

View file

@ -2,7 +2,7 @@ class ApplicationComponent < ViewComponent::Base
include ViewComponent::Translatable
include FlipperHelper
delegate :rich_text_area_tag, to: :helpers
delegate :rich_text_area_tag, :dsfr_icon, to: :helpers
def current_user
controller.current_user

View file

@ -176,7 +176,8 @@ class Conditions::ConditionsComponent < ApplicationComponent
def delete_condition_tag(row_index)
tag.button(
tag.span('', class: 'icon delete') + tag.span(t('.remove_a_row'), class: 'sr-only'),
class: "fr-btn fr-btn--sm fr-btn--tertiary fr-icon-delete-line",
title: t('.remove_a_row'),
formaction: delete_condition_path(row_index),
formmethod: 'delete',
formnovalidate: true

View file

@ -11,7 +11,7 @@
= link_to t('.more_information'), t("links.common.faq.autosave_url"), class: 'autosave-more-infos fr-link fr-link--sm', **external_link_attributes
%p.autosave-status.succeeded.fr-mb-0
%span.autosave-icon.icon.accept
= dsfr_icon('fr-icon-checkbox-circle-fill fr-text-default--success autosave-icon')
%span.autosave-label
- if annotation?
= t('.annotations.confirmation')

View file

@ -33,13 +33,13 @@ class Dossiers::MessageComponent < ApplicationComponent
end
end
def icon_path
def icon
if commentaire.sent_by_system?
'icons/mail.svg'
dsfr_icon('fr-icon-message-2-fill', :sm, :mr)
elsif commentaire.sent_by?(connected_user)
'icons/account-circle.svg'
dsfr_icon('fr-icon-user-fill', :sm, :mr)
else
'icons/blue-person.svg'
dsfr_icon('fr-icon-discuss-fill', :sm, :mr)
end
end

View file

@ -1,4 +1,4 @@
= image_tag(icon_path, class: 'person-icon', alt: '')
= icon
.width-100
%h2.fr-h6
@ -22,8 +22,7 @@
.message-extras.flex.justify-start
- if commentaire.soft_deletable?(connected_user)
= button_to instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire), method: :delete, class: 'button danger', form: { data: { turbo: true, turbo_confirm: t('.confirm') } } do
%span.icon.delete
= button_to instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire), method: :delete, class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-icon-delete-line fr-btn--icon-left fr-text-default--warning', form: { data: { turbo: true, turbo_confirm: t('.confirm') } } do
= t('.delete_button')
- if commentaire.piece_jointe.attached?
@ -31,6 +30,5 @@
= render Attachment::ShowComponent.new(attachment: commentaire.piece_jointe.attachment, new_tab: true)
- if show_reply_button?
= button_tag type: 'button', class: 'button small message-answer-button', onclick: 'document.querySelector("#commentaire_body").focus()' do
%span.icon.reply
= button_tag type: 'button', class: 'fr-btn fr-btn--sm fr-btn--secondary fr-icon-arrow-go-back-line fr-btn--icon-left', onclick: 'document.querySelector("#commentaire_body").focus()' do
= t('.reply')

View file

@ -4,7 +4,7 @@
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'accept');", role: 'menuitem') do
%span.icon.accept
= dsfr_icon('fr-icon-checkbox-circle-fill fr-text-default--success')
.dropdown-description
%h4 Accepter
Lusager sera informé que son dossier a été accepté
@ -14,7 +14,7 @@
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'without-continuation');", role: 'menuitem') do
%span.icon.without-continuation
= dsfr_icon('fr-icon-intermediate-circle-fill fr-text-mention--grey')
.dropdown-description
%h4 Classer sans suite
Lusager sera informé que son dossier a été classé sans suite
@ -24,7 +24,7 @@
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'refuse');", role: 'menuitem') do
%span.icon.refuse
= dsfr_icon('fr-icon-close-circle-fill fr-text-default--warning')
.dropdown-description
%h4 Refuser
Lusager sera informé que son dossier a été refusé

View file

@ -2,9 +2,7 @@
= link_to annotations_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.column.align-center.justify-between
- if error_messages.present?
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
%p.fr-badge.fr-badge--error À modifier
- elsif @count == 0
%p.fr-badge.fr-badge--info À configurer
- else

View file

@ -2,9 +2,7 @@
= link_to champs_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.column.align-center.justify-between
- if error_messages.present?
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
%p.fr-badge.fr-badge--error À modifier
- elsif @count == 0
%p.fr-badge.fr-badge--warning À faire
- else

View file

@ -27,7 +27,7 @@ class Procedure::ProcedureAdministrateurs::AdministrateurComponent < Application
button_to 'Retirer',
admin_procedure_administrateur_path(@procedure, @administrateur),
method: :delete,
class: 'button',
class: 'fr-btn fr-btn--tertiary fr-btn--sm',
form: { data: { turbo: true, turbo_confirm: "Retirer « #{@administrateur.email} » des administrateurs de « #{@procedure.libelle} » ?" } }
end
end

View file

@ -1,7 +1,9 @@
%li.type-de-champ.flex.column.justify-start{ html_options }
.type-de-champ-container
.flex.justify-between.section.head.hr
.handle.fr-icon-drag-move-2-line{ title: "Déplacer le champ vers le haut ou vers le bas" }
.flex.justify-between.section.head
.fr-btn.fr-btn--tertiary-no-outline.handle.fr-icon-drag-move-2-line{ title: "Déplacer le champ vers le haut ou vers le bas" }
%button.fr-btn.fr-btn--tertiary-no-outline.fr-icon-arrow-up-line.move-up{ move_button_options(:up) }
%button.fr-btn.fr-btn--tertiary-no-outline.fr-icon-arrow-down-line.move-down{ move_button_options(:down) }
- if coordinate.used_by_routing_rules?
.flex.align-center
@ -10,25 +12,17 @@
= link_to('le routage', admin_procedure_groupe_instructeurs_path(revision.procedure_id, anchor: 'routing-rules'))
- else
.flex.justify-start.delete
= button_to type_de_champ_path, class: 'fr-btn fr-btn--sm fr-btn--secondary fr-icon-delete-line', title: "Supprimer le champ", method: :delete, form: { data: { turbo_confirm: 'Êtes vous sûr de vouloir supprimer ce champ ?' } } do
.icon.delete
= button_to type_de_champ_path, class: 'fr-btn fr-btn--tertiary-no-outline fr-icon-delete-line', title: "Supprimer le champ", method: :delete, form: { data: { turbo_confirm: 'Êtes vous sûr de vouloir supprimer ce champ ?' } } do
%span.sr-only Supprimer
- if @errors.present?
.types-de-champ-errors
= @errors
.flex.justify-start.section.fr-ml-1w.fr-mb-2w
.flex.justify-start.section
= form_for(type_de_champ, form_options) do |form|
.flex.justify-start
.flex.justify-start.flex-gap
.flex.justify-start.width-33
.flex.justify-start.column
%button.move-up.cell.mb-1{ move_button_options(:up) }
.icon.arrow-up.small
%span.sr-only Déplacer le champ vers le haut
%button.move-down.cell{ move_button_options(:down) }
.icon.arrow-down.small
%span.sr-only Déplacer le champ vers le bas
.cell.flex.justify-start.column.flex-grow
= form.label :type_champ, "Type de champ", for: dom_id(type_de_champ, :type_champ)
= form.select :type_champ, grouped_options_for_select(types_of_type_de_champ, type_de_champ.type_champ), {}, class: 'fr-select small-margin small inline width-100', id: dom_id(type_de_champ, :type_champ), disabled: coordinate.used_by_routing_rules?

View file

@ -143,4 +143,12 @@ module ApplicationHelper
def download_details(attachment)
"#{attachment.filename.extension.upcase} #{number_to_human_size(attachment.byte_size)}"
end
def dsfr_icon(classes, *options)
sm = options.include?(:sm)
mr = options.include?(:mr)
tag.span(class: class_names(classes, 'fr-icon--sm': sm, 'fr-mr-1v': mr),
"aria-hidden" => true)
end
end

View file

@ -38,7 +38,7 @@ export function ImportFileInput({
{input.hasValue && (
<span
title="Supprimer le fichier"
className="icon refuse"
className="fr-icon-delete-line fr-text-default--error"
style={{
cursor: 'pointer'
}}

View file

@ -81,7 +81,7 @@
- @experts_procedure.each do |expert_procedure|
%tr
%td
%span.icon.person
= dsfr_icon('fr-icon-user-fill')
= expert_procedure.expert.email
%td.text-center
= expert_procedure.avis.count

View file

@ -28,7 +28,7 @@
- instructeurs.each do |instructeur|
%tr
%td
%span.icon.person
= dsfr_icon('fr-icon-user-fill')
#{instructeur.email}
- confirmation_message = procedure.routing_enabled? ? "Êtes-vous sûr de vouloir retirer linstructeur « #{instructeur.email} » du groupe « #{groupe_instructeur.label} » ?" : "Êtes-vous sûr de vouloir retirer linstructeur « #{instructeur.email} » de la démarche ?"

View file

@ -8,27 +8,23 @@
= link_to admin_procedure_api_particulier_jeton_path, class: 'card-admin', id: 'add-jeton' do
- if @procedure.api_particulier_token.blank?
%div
%span.icon.clock
%p.fr-text-default--info= t('.needs_configuration')
%p.fr-badge.fr-badge--info= t('.needs_configuration')
- else
%div
%span.icon.accept
%p.fr-text-default--success= t('.already_configured')
%p.fr-badge.fr-badge--success= t('.already_configured')
%div
%h3.fr-h6
= Procedure.human_attribute_name(:jeton_api_particulier)
%p.button= t('views.shared.actions.edit')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
- if @procedure.api_particulier_scopes.present?
= link_to admin_procedure_api_particulier_sources_path, class: 'card-admin' do
- if @procedure.api_particulier_token.blank?
%div
%span.icon.clock
%p.fr-text-default--info= t('.needs_configuration')
%p.fr-badge.fr-badge--info= t('.needs_configuration')
- else
%div
%span.icon.accept
%p.fr-text-default--success= t('.already_configured')
%p.fr-badge.fr-badge--success= t('.already_configured')
%div
%p.card-admin-title= t('administrateurs.sources_particulier.show.data_sources')
%p.button= t('views.shared.actions.edit')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -10,15 +10,17 @@
.container
%h1
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true, html: { class: 'form' } do |f|
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true do |f|
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
- c.body do
%p
= t('.api_particulier_description_html', app_name: APPLICATION_NAME)
= f.label :api_particulier_token
.desc.mb-2
%p= t('.token_description')
= f.password_field :api_particulier_token, class: 'form-control', required: :required
.text-right
= f.button t('views.shared.actions.save'), class: 'fr-btn send'
%fieldset.fr-fieldset
.fr-fieldset__element
= f.label :api_particulier_token, class: "fr-label"
%span.fr-hint-text= t('.token_description')
= f.password_field :api_particulier_token, class: 'fr-input', required: :required
.fr-fieldset__element
= f.button t('views.shared.actions.save'), class: 'fr-btn'

View file

@ -3,16 +3,18 @@
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Administrateurs']], preview: false }
.container
.fr-container
%h1 Gérer les administrateurs de « #{@procedure.libelle} »
%table.table
%thead
%th= 'Adresse email'
%th= 'Enregistré le'
%th= 'État'
%tbody#administrateurs
= render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
.fr-table.fr-table--bordered
%table
%thead
%th= 'Adresse email'
%th= 'Enregistré le'
%th= 'État'
%th= 'Action'
%tbody#administrateurs
= render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
.fr-mt-4w
= render 'add_admin_form', procedure: @procedure, disabled_as_super_admin: administrateur_as_manager?
.fr-mt-4w
= render 'add_admin_form', procedure: @procedure, disabled_as_super_admin: administrateur_as_manager?

View file

@ -43,14 +43,13 @@
= procedure.auto_archive_on.strftime('%d/%m/%Y')
%div
= dsfr_icon('fr-icon-team-fill')
- if procedure.routing_enabled?
%span.icon.person
%span.fr-badge= procedure.groupe_instructeurs.count
- else
%span.icon.person
%span.fr-badge= procedure.instructeurs.count
%span.icon.folder.fr-ml-1w
= dsfr_icon('fr-icon-file-text-fill fr-ml-1w')
%span.fr-badge= procedure.dossiers.state_not_brouillon.visible_by_administration.count
.text-right
@ -81,28 +80,28 @@
- if !procedure.close? && !procedure.discarded?
- menu.with_item do
= link_to commencer_url(path: procedure.path), target: :blank, rel: :noopener, role: 'menuitem' do
%span.icon.in-progress
= dsfr_icon('fr-icon-flashlight-line')
.dropdown-description
%h4= t('administrateurs.dropdown_actions.to_test')
- if !procedure.discarded?
- menu.with_item do
= link_to(admin_procedure_clone_path(procedure.id), role: 'menuitem', class: 'clone-btn', data: { method: :put }) do
%span.icon.new-folder
= dsfr_icon('fr-icon-file-copy-line')
.dropdown-description
%h4= t('administrateurs.dropdown_actions.to_clone')
- if procedure.publiee?
- menu.with_item do
= link_to(admin_procedure_close_path(procedure_id: procedure.id), role: 'menuitem') do
%span.icon.archive
= dsfr_icon('fr-icon-calendar-close-fill')
.dropdown-description
%h4= t('administrateurs.dropdown_actions.to_close')
- if procedure.can_be_deleted_by_administrateur? && !procedure.discarded?
- menu.with_item do
= link_to admin_procedure_path(procedure), role: 'menuitem', method: :delete, data: { confirm: "Voulez-vous vraiment supprimer la démarche ? \nToute suppression est définitive et s'appliquera aux éventuels autres administrateurs de cette démarche !" } do
%span.icon.refuse
= dsfr_icon('fr-icon-delete-line')
.dropdown-description
%h4= t('administrateurs.dropdown_actions.delete')

View file

@ -24,7 +24,7 @@
= link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'fr-btn fr-btn--primary fr-btn--icon-left fr-icon-success-line', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
- if @procedure.locked? && !@procedure.close?
= link_to 'Clore', admin_procedure_close_path(procedure_id: @procedure.id), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-archive-line', id: "close-procedure-link"
= link_to 'Clore', admin_procedure_close_path(procedure_id: @procedure.id), class: 'fr-btn fr-btn--tertiary fr-btn--icon-left fr-icon-calendar-close-fill', id: "close-procedure-link"
.fr-container
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)

View file

@ -37,7 +37,7 @@
%tr
%td.number-col
= link_to(expert_avis_path(avis.procedure, avis), class: 'cell-link') do
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
#{avis.dossier.id}
%td= link_to(avis.dossier.user_email_for(:display), expert_avis_path(avis.procedure, avis), class: 'cell-link')
%td= link_to(avis.procedure.libelle, expert_avis_path(avis.procedure, avis), class: 'cell-link')

View file

@ -1,56 +0,0 @@
- if dossier.en_instruction? || (dossier.en_construction? && dossier.may_flag_as_pending_correction?)
= render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: { data: { turbo_force: :server } }, button_options: { class: [button_or_label_class(dossier)]}, role: :region) do |menu|
- menu.with_button_inner_html do
= dossier.en_instruction? ? "Instruire le dossier" : "Demander une correction"
- if dossier.en_instruction?
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'accept');", role: 'menuitem') do
%span.icon.accept
.dropdown-description
%h4 Accepter
Lusager sera informé que son dossier a été accepté
- menu.with_item(class: "hidden inactive form-inside") do
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: placeholder, popup_class: 'accept', process_action: 'accepter', title: 'Accepter', confirm: "Confirmez-vous l'acceptation ce dossier ?" }
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'without-continuation');", role: 'menuitem') do
%span.icon.without-continuation
.dropdown-description
%h4 Classer sans suite
Lusager sera informé que son dossier a été classé sans suite
- menu.with_item(class: "hidden inactive form-inside") do
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: placeholder, popup_class: 'without-continuation', process_action: 'classer_sans_suite', title: 'Classer sans suite', confirm: 'Confirmez-vous le classement sans suite de ce dossier ?' }
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'refuse');", role: 'menuitem') do
%span.icon.refuse
.dropdown-description
%h4 Refuser
Lusager sera informé que son dossier a été refusé
- menu.with_item(class: "hidden inactive form-inside") do
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier, placeholder: placeholder, popup_class: 'refuse', process_action: 'refuser', title: 'Refuser', confirm: 'Confirmez-vous le refus de ce dossier ?' }
- if dossier.may_flag_as_pending_correction?
- menu.with_item do
= link_to('#', onclick: "DS.showMotivation(event, 'pending_correction');", role: 'menuitem') do
%span.fr-icon.fr-icon-error-warning-line.fr-text-default--info{ "aria-hidden": "true" }
.dropdown-description
%h4 Demander une correction
Lusager sera informé que des modifications sont attendues
- menu.with_item(class: class_names("inactive form-inside": true, hidden: dossier.en_instruction?)) do
= render partial: 'instructeurs/dossiers/instruction_button_motivation', locals: { dossier: dossier,
visible: !dossier.en_instruction?,
form_path: pending_correction_instructeur_dossier_path(dossier.procedure, dossier),
placeholder: 'Expliquez au demandeur quelle(s) correction(s) sont attendues',
popup_class: 'pending_correction',
button_justificatif_label: "Ajouter une pièce jointe (facultatif)",
process_button: dossier.en_construction? ? 'Valider' : 'Valider et repasser en construction',
process_action: nil,
title: 'Marquer en attente de corrections',
confirm: 'Envoyer la demande de corrections ?'}

View file

@ -46,7 +46,7 @@
- @deleted_dossiers.each do |deleted_dossier|
%tr
%td.text-center
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
%td.number-col
= deleted_dossier.dossier_id
%td

View file

@ -145,12 +145,12 @@
- else
- if p.hidden_by_administration_at.present?
%span.cell-link
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
- else
%a.cell-link{ href: path }
%span.icon.folder
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
%span.notifications{ 'aria-label': 'notifications' }
= dsfr_icon('fr-icon-file-text-line')
- if @not_archived_notifications_dossier_ids.include?(p.dossier_id)
%span.notifications{ 'aria-label': 'notifications' }
%td.number-col
- if p.hidden_by_administration_at.present?

View file

@ -1,7 +1,7 @@
- invites = dossier.invites.load
= render Dropdown::MenuComponent.new(wrapper: :span, wrapper_options: {class: 'invite-user-action'}, button_options: { class: ['fr-btn--secondary'] }, menu_options: { id: 'invite-content' }) do |menu|
- menu.with_button_inner_html do
%span.icon.person
= dsfr_icon('fr-icon-user-add-fill', :sm, :mr)
- if invites.present?
= t('views.invites.dropdown.view_invited_people')
%span.badge= invites.size

View file

@ -1,6 +1,6 @@
%td.text-center
%p.cell-link
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
%td.number-col
%p.cell-link= p.dossier_id

View file

@ -37,7 +37,7 @@
%tr{ class: [p.hidden_by_administration_at.present? && "file-hidden-by-user"] }
- if instructeur_and_expert_dossier
%td.text-center.cell-link
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
%td.number-col
.cell-link= p.dossier_id
%td
@ -54,7 +54,7 @@
%td.text-center
%a.cell-link{ href: path }
%span.icon.folder
= dsfr_icon('fr-icon-file-text-line')
%td.number-col
%a.cell-link{ href: path }= p.dossier_id
@ -77,13 +77,13 @@
- menu.with_item do
= link_to(instructeur_dossier_path(procedure_id, p.dossier_id), role: 'menuitem') do
%span.icon.in-progress>
= dsfr_icon('fr-icon-file-text-fill', :sm)
.dropdown-description
Voir le dossier
- menu.with_item do
= link_to(expert_avis_path(procedure_id, @dossier_avis_ids_h[p.dossier_id]), role: 'menuitem') do
%span.icon.in-progress>
= dsfr_icon('fr-icon-chat-3-fill', :sm)
.dropdown-description
Donner mon avis

View file

@ -4,15 +4,8 @@
%span.icon.follow
%span.icon.unfollow
%span.icon.archive
%span.icon.unarchive
%span.icon.folder
%span.icon.new-folder
%span.icon.accept
%span.icon.refuse
%span.icon.without-continuation
%span.icon.edit
%span.icon.in-progress
%span.icon.bubble
%span.icon.attached
%span.icon.lock
@ -20,14 +13,12 @@
%span.icon.justificatif
%span.icon.printer
%span.icon.account
%span.icon.person
%span.icon.super-admin
%span.icon.mail
%span.icon.reply
%span.icon.search
%span.icon.sign-out
%span.icon.info
%span.icon.delete
%span.icon.help
%span.icon.phone
%span.icon.clock

View file

@ -21,15 +21,12 @@
%td.center
- if matching_archive.present?
- if matching_archive.available?
= link_to url_for(matching_archive.file), class: 'button primary' do
%span.icon.download-white
= link_to url_for(matching_archive.file), class: 'fr-btn fr-btn--secondary fr-icon-download-line fr-btn--icon-left fr-btn--sm' do
= t(:archive_ready_html, scope: [:instructeurs, :procedure], generated_period: time_ago_in_words(matching_archive.updated_at))
- else
%span.icon.retry
= dsfr_icon("fr-icon-flashlight-line", :sm)
= t(:archive_pending_html, scope: [:instructeurs, :procedure], created_period: time_ago_in_words(matching_archive.created_at))
- elsif weight.nil? || weight < Archive::MAX_SIZE
= link_to create_archive_url(procedure, date), method: :post, class: "button" do
%span.icon.new-folder
Demander la création
= link_to "Demander la création", create_archive_url(procedure, date), method: :post, class: "fr-btn fr-btn--secondary fr-icon-download-line fr-btn--icon-left fr-btn--sm"
- else
Archive trop volumineuse

View file

@ -1,7 +1,7 @@
.messagerie.container
%ul.messages-list{ data: { controller: 'scroll-to' } }
- dossier.preloaded_commentaires.each do |commentaire|
%li.message{ class: commentaire_is_from_me_class(commentaire, connected_user), id: dom_id(commentaire) }
%li.message.fr-background-alt--grey{ class: commentaire_is_from_me_class(commentaire, connected_user), id: dom_id(commentaire) }
= render Dossiers::MessageComponent.new(commentaire: commentaire, connected_user: connected_user, messagerie_seen_at: messagerie_seen_at, show_reply_button: show_reply_button(commentaire, connected_user))
- if dossier.messagerie_available?

View file

@ -24,20 +24,20 @@
- if has_transfer_action
- menu.with_item do
= link_to(transferer_dossier_path(dossier), role: 'menuitem') do
%span.icon.person
= dsfr_icon('fr-icon-user-add-fill', :sm)
.dropdown-description
= t('views.users.dossiers.dossier_action.transfer_dossier')
- if has_new_dossier_action
- menu.with_item do
= link_to(commencer_url(dossier.procedure.path), role: 'menuitem') do
%span.icon.new-folder
= dsfr_icon('fr-icon-file-fill', :sm)
.dropdown-description
= t('views.users.dossiers.dossier_action.start_other_dossier')
- menu.with_item do
= link_to(clone_dossier_path(dossier), method: :post, role: 'menuitem') do
%span.icon.new-folder
= dsfr_icon('fr-icon-file-copy-line', :sm)
.dropdown-description
= t('views.users.dossiers.dossier_action.clone')
@ -45,6 +45,6 @@
- menu.with_item(class: 'danger') do
= link_to(dossier_path(dossier), role: 'menuitem', method: :delete, data: { disable: true, confirm: "En continuant, vous allez supprimer ce dossier ainsi que les informations quil contient. Toute suppression entraîne lannulation de la démarche en cours.\n\nConfirmer la suppression ?" }) do
%span.icon.delete
= dsfr_icon('fr-icon-delete-fill', :sm)
.dropdown-description
= t('views.users.dossiers.dossier_action.delete_dossier')

View file

@ -3,7 +3,7 @@
.latest-message-section
%h3.tab-title= t('views.users.dossiers.show.latest_message.latest_message')
.message.inverted-background
.message.fr-background-alt--grey
= render Dossiers::MessageComponent.new(commentaire: latest_message, connected_user: current_user)
= link_to messagerie_dossier_url(dossier, anchor: 'new_commentaire'), class: 'fr-btn fr-btn--icon-left fr-icon-discuss-line' do

View file

@ -27,7 +27,7 @@
- if dossier.en_construction?
.en-construction
- if dossier.pending_correction.present?
.message.inverted-background
.message.fr-background-alt--grey
= render Dossiers::MessageComponent.new(commentaire: dossier.pending_correction.commentaire, connected_user: current_user)
%p{ role: 'status' }
@ -58,7 +58,7 @@
- elsif dossier.accepte?
.accepte
%p.decision{ role: 'status' }
%span.icon.accept
= dsfr_icon('fr-icon-checkbox-circle-fill fr-text-default--success')
= t('views.users.dossiers.show.status_overview.acceptee_html')
- if dossier.motivation.present?
@ -77,7 +77,7 @@
- elsif dossier.refuse?
.refuse
%p.decision{ role: 'status' }
%span.icon.refuse
= dsfr_icon('fr-icon-close-circle-fill fr-text-default--error')
= t('views.users.dossiers.show.status_overview.refuse_html')
- if dossier.motivation.present?
@ -91,7 +91,7 @@
- elsif dossier.sans_suite?
.sans-suite
%p.decision{ role: 'status' }
%span.icon.without-continuation
= dsfr_icon('fr-icon-intermediate-circle-fill')
= t('views.users.dossiers.show.status_overview.sans_suite_html')
= render partial: 'users/dossiers/show/download_justificatif', locals: { dossier: dossier }

View file

@ -30,7 +30,7 @@ describe 'Creating a new procedure', js: true do
# check archive
expect {
page.first(".archive-table .button").click
page.first(".archive-table .fr-btn").click
}.to have_enqueued_job(ArchiveCreationJob).with(procedure, an_instance_of(Archive), administrateur)
expect(page).to have_content("Votre demande a été prise en compte. Selon le nombre de dossiers, cela peut prendre de quelques minutes à plusieurs heures. Vous recevrez un courriel lorsque le fichier sera disponible.")
expect(Archive.first.month).not_to be_nil

View file

@ -62,7 +62,7 @@ describe 'Creating a new procedure', js: true do
expect(page).to have_current_path(admin_procedure_path(procedure))
champs_card = find('.fr-tile', text: 'Champs du formulaire')
expect(champs_card).to have_selector('.icon.refuse')
expect(champs_card).to have_selector('.fr-badge--error')
expect(champs_card).to have_content('À modifier')
end
end

View file

@ -206,7 +206,7 @@ describe 'Instructing a dossier:', js: true do
end
scenario 'download' do
expect {
page.first(".archive-table .button").click
page.first(".archive-table .fr-btn").click
}.to have_enqueued_job(ArchiveCreationJob).with(procedure, an_instance_of(Archive), instructeur)
expect(Archive.first.month).not_to be_nil
end