style: replace new-folder icon with remix/dsfr icon
This commit is contained in:
parent
38bee3639d
commit
adfeac02e7
8 changed files with 24 additions and 17 deletions
|
@ -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 |
|
@ -35,10 +35,6 @@
|
|||
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");
|
||||
}
|
||||
|
@ -170,3 +166,19 @@
|
|||
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
|
||||
// - add the mask-image property with data url you copied
|
||||
.fr-icon {
|
||||
&-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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
- 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')
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
%span.icon.archive
|
||||
%span.icon.unarchive
|
||||
%span.icon.folder
|
||||
%span.icon.new-folder
|
||||
%span.icon.accept
|
||||
%span.icon.refuse
|
||||
%span.icon.without-continuation
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
- 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')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue