remove specific tabs css and use DSFR tabs
This commit is contained in:
parent
a0998ab709
commit
11c8e408ef
18 changed files with 35 additions and 91 deletions
|
@ -1,57 +0,0 @@
|
||||||
@import "colors";
|
|
||||||
@import "mixins";
|
|
||||||
|
|
||||||
.tabs {
|
|
||||||
ul {
|
|
||||||
margin-bottom: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 36px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
border-radius: 3px 3px 0 0;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
padding-left: 20px;
|
|
||||||
padding-right: 20px;
|
|
||||||
color: $black;
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
border-top: 2px solid $blue-france-500;
|
|
||||||
border-left: 1px solid $border-grey;
|
|
||||||
border-right: 1px solid $border-grey;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: $blue-france-500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
color: $blue-france-500;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
a {
|
|
||||||
color: $blue-france-500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge {
|
|
||||||
color: $blue-france-500;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.notifications {
|
|
||||||
top: 3px;
|
|
||||||
right: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -37,3 +37,4 @@
|
||||||
@import '@gouvfr/dsfr/dist/component/skiplink/skiplink.css';
|
@import '@gouvfr/dsfr/dist/component/skiplink/skiplink.css';
|
||||||
@import '@gouvfr/dsfr/dist/component/password/password.css';
|
@import '@gouvfr/dsfr/dist/component/password/password.css';
|
||||||
@import '@gouvfr/dsfr/dist/component/accordion/accordion.css';
|
@import '@gouvfr/dsfr/dist/component/accordion/accordion.css';
|
||||||
|
@import '@gouvfr/dsfr/dist/component/tab/tab.css';
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
.fr-container
|
.fr-container
|
||||||
%h1.page-title Prévisualisation de la démarche « #{@dossier.procedure.libelle} »
|
%h1.page-title Prévisualisation de la démarche « #{@dossier.procedure.libelle} »
|
||||||
|
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item('le dossier',
|
= tab_item('le dossier',
|
||||||
apercu_admin_procedure_path(@dossier.procedure, tab: 'dossier'),
|
apercu_admin_procedure_path(@dossier.procedure, tab: 'dossier'),
|
||||||
active: @tab == 'dossier')
|
active: @tab == 'dossier')
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
= link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'fr-btn'
|
= link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'fr-btn'
|
||||||
.fr-container
|
.fr-container
|
||||||
|
|
||||||
%nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
%nav.fr-tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item(t('pluralize.published', count: @procedures_publiees_count), admin_procedures_path(statut: 'publiees'), active: @statut == 'publiees', badge: number_with_html_delimiter(@procedures_publiees_count))
|
= tab_item(t('pluralize.published', count: @procedures_publiees_count), admin_procedures_path(statut: 'publiees'), active: @statut == 'publiees', badge: number_with_html_delimiter(@procedures_publiees_count))
|
||||||
= tab_item('En test', admin_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
= tab_item('En test', admin_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
||||||
= tab_item(t('pluralize.closed', count: @procedures_closed_count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count))
|
= tab_item(t('pluralize.closed', count: @procedures_closed_count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count))
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
%span.fr-download__detail
|
%span.fr-download__detail
|
||||||
ZIP
|
ZIP
|
||||||
|
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= dynamic_tab_item('Demande', expert_avis_path(avis.procedure, avis))
|
= dynamic_tab_item('Demande', expert_avis_path(avis.procedure, avis))
|
||||||
= dynamic_tab_item('Avis', instruction_expert_avis_path(avis.procedure, avis), notification: avis.answer.blank?)
|
= dynamic_tab_item('Avis', instruction_expert_avis_path(avis.procedure, avis), notification: avis.answer.blank?)
|
||||||
- if avis.procedure.allow_expert_messaging
|
- if avis.procedure.allow_expert_messaging
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
.procedure-header
|
.procedure-header
|
||||||
%h1.fr-h3= procedure_libelle @procedure
|
%h1.fr-h3= procedure_libelle @procedure
|
||||||
|
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item('avis à donner',
|
= tab_item('avis à donner',
|
||||||
procedure_expert_avis_index_path(statut: Instructeurs::AvisController::A_DONNER_STATUS),
|
procedure_expert_avis_index_path(statut: Instructeurs::AvisController::A_DONNER_STATUS),
|
||||||
active: @statut == Instructeurs::AvisController::A_DONNER_STATUS,
|
active: @statut == Instructeurs::AvisController::A_DONNER_STATUS,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#header-bottom.fr-container
|
#header-bottom.fr-container
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
||||||
|
|
||||||
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%nav.tabs.mt-3
|
%nav.fr-tabs.mt-3
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item(t(tab_i18n_key_from_status('a-suivre')),
|
= tab_item(t(tab_i18n_key_from_status('a-suivre')),
|
||||||
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
||||||
active: statut == 'a-suivre',
|
active: statut == 'a-suivre',
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
%h1.fr-h3.fr-mb-0 Démarches
|
%h1.fr-h3.fr-mb-0 Démarches
|
||||||
= render partial: 'instructeurs/procedures/synthese', locals: { procedures: @procedures, all_dossiers_counts: @all_dossiers_counts }
|
= render partial: 'instructeurs/procedures/synthese', locals: { procedures: @procedures, all_dossiers_counts: @all_dossiers_counts }
|
||||||
|
|
||||||
%nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
%nav.fr-tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item(t('pluralize.en_cours', count: @procedures_en_cours_count), instructeur_procedures_path(statut: 'en-cours'), active: @statut == 'en-cours', badge: number_with_html_delimiter(@procedures_en_cours_count))
|
= tab_item(t('pluralize.en_cours', count: @procedures_en_cours_count), instructeur_procedures_path(statut: 'en-cours'), active: @statut == 'en-cours', badge: number_with_html_delimiter(@procedures_en_cours_count))
|
||||||
= tab_item(t('pluralize.en_test', count: @procedures_draft_count), instructeur_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
= tab_item(t('pluralize.en_test', count: @procedures_draft_count), instructeur_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
||||||
= tab_item(t('pluralize.closed', count: @procedures_closes_count), instructeur_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closes_count))
|
= tab_item(t('pluralize.closed', count: @procedures_closes_count), instructeur_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closes_count))
|
||||||
|
|
|
@ -231,8 +231,8 @@
|
||||||
.sub-header
|
.sub-header
|
||||||
.container
|
.container
|
||||||
Titre
|
Titre
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= tab_item("Onglet actif", "#", active: true)
|
= tab_item("Onglet actif", "#", active: true)
|
||||||
= tab_item("Onglet inactif", "#")
|
= tab_item("Onglet inactif", "#")
|
||||||
= tab_item("Onglet avec badge", "#", badge: 2)
|
= tab_item("Onglet avec badge", "#", badge: 2)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%li{ class: (active ? 'active' : nil) }
|
%li{ class: (active ? 'active' : nil) }
|
||||||
- if notification
|
- if notification
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%span.notifications{ 'aria-label': 'notifications' }
|
||||||
= link_to(url, 'aria-current': active ? 'page' : nil) do
|
= link_to(url, 'aria-selected': active ? true : nil, class: 'fr-tabs__tab' ) do
|
||||||
- if badge.present?
|
- if badge.present?
|
||||||
%span.badge= badge
|
%span.badge.fr-mr-1w= badge
|
||||||
= label
|
= label
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
= render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select)
|
= render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select)
|
||||||
|
|
||||||
- if @search_terms.blank?
|
- if @search_terms.blank?
|
||||||
%nav.tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
%nav.fr-tabs{ role: 'navigation', 'aria-label': t('views.users.dossiers.secondary_menu') }
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
- if @user_dossiers.present?
|
- if @user_dossiers.present?
|
||||||
= tab_item(t('pluralize.en_cours', count: @user_dossiers.count),
|
= tab_item(t('pluralize.en_cours', count: @user_dossiers.count),
|
||||||
dossiers_path(statut: 'en-cours', procedure_id: params[:procedure_id]),
|
dossiers_path(statut: 'en-cours', procedure_id: params[:procedure_id]),
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
title: t('views.users.dossiers.demande.edit_dossier_title')
|
title: t('views.users.dossiers.demande.edit_dossier_title')
|
||||||
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
||||||
|
|
||||||
%nav.tabs
|
%nav.fr-tabs
|
||||||
%ul
|
%ul.fr-tabs__list
|
||||||
= dynamic_tab_item(t('views.users.dossiers.show.header.summary'), dossier_path(dossier))
|
= dynamic_tab_item(t('views.users.dossiers.show.header.summary'), dossier_path(dossier))
|
||||||
= dynamic_tab_item(t('views.users.dossiers.show.header.request'), [demande_dossier_path(dossier), modifier_dossier_path(dossier)])
|
= dynamic_tab_item(t('views.users.dossiers.show.header.request'), [demande_dossier_path(dossier), modifier_dossier_path(dossier)])
|
||||||
= dynamic_tab_item(t('views.users.dossiers.show.header.mailbox'), messagerie_dossier_path(dossier))
|
= dynamic_tab_item(t('views.users.dossiers.show.header.mailbox'), messagerie_dossier_path(dossier))
|
||||||
|
|
|
@ -72,7 +72,7 @@ describe 'Inviting an expert:' do
|
||||||
|
|
||||||
click_on '1 avis à donner'
|
click_on '1 avis à donner'
|
||||||
click_on avis.dossier.user.email
|
click_on avis.dossier.user.email
|
||||||
within('.tabs') { click_on 'Avis' }
|
within('.fr-tabs') { click_on 'Avis' }
|
||||||
expect(page).to have_text("Demandeur : #{avis.claimant.email}")
|
expect(page).to have_text("Demandeur : #{avis.claimant.email}")
|
||||||
expect(page).to have_text('Cet avis est confidentiel')
|
expect(page).to have_text('Cet avis est confidentiel')
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ describe 'Inviting an expert:' do
|
||||||
|
|
||||||
click_on '1 avis à donner'
|
click_on '1 avis à donner'
|
||||||
click_on avis.dossier.user.email
|
click_on avis.dossier.user.email
|
||||||
within('.tabs') { click_on 'Avis' }
|
within('.fr-tabs') { click_on 'Avis' }
|
||||||
expect(page).to have_text("Demandeur : #{avis.claimant.email}")
|
expect(page).to have_text("Demandeur : #{avis.claimant.email}")
|
||||||
expect(page).to have_text('Question ?')
|
expect(page).to have_text('Question ?')
|
||||||
expect(page).to have_text('Cet avis est confidentiel')
|
expect(page).to have_text('Cet avis est confidentiel')
|
||||||
|
@ -200,7 +200,7 @@ describe 'Inviting an expert:' do
|
||||||
|
|
||||||
click_on '1 avis à donner'
|
click_on '1 avis à donner'
|
||||||
click_on avis_1.dossier.user.email
|
click_on avis_1.dossier.user.email
|
||||||
within('.tabs') { click_on 'Avis' }
|
within('.fr-tabs') { click_on 'Avis' }
|
||||||
expect(page).to have_text("Demandeur : #{avis_1.claimant.email}")
|
expect(page).to have_text("Demandeur : #{avis_1.claimant.email}")
|
||||||
click_on 'Voir les avis'
|
click_on 'Voir les avis'
|
||||||
expect(page).to have_text("Vous")
|
expect(page).to have_text("Vous")
|
||||||
|
@ -216,7 +216,7 @@ describe 'Inviting an expert:' do
|
||||||
|
|
||||||
click_on '1 avis à donner'
|
click_on '1 avis à donner'
|
||||||
click_on avis_2.dossier.user.email
|
click_on avis_2.dossier.user.email
|
||||||
within('.tabs') { click_on 'Avis' }
|
within('.fr-tabs') { click_on 'Avis' }
|
||||||
expect(page).to have_text("Demandeur : #{avis_2.claimant.email}")
|
expect(page).to have_text("Demandeur : #{avis_2.claimant.email}")
|
||||||
click_on 'Voir les avis'
|
click_on 'Voir les avis'
|
||||||
expect(page).to have_text("Vous")
|
expect(page).to have_text("Vous")
|
||||||
|
|
|
@ -204,14 +204,14 @@ describe 'The routing with rules', js: true do
|
||||||
## on the dossiers list
|
## on the dossiers list
|
||||||
click_on procedure.libelle
|
click_on procedure.libelle
|
||||||
expect(page).to have_current_path(instructeur_procedure_path(procedure))
|
expect(page).to have_current_path(instructeur_procedure_path(procedure))
|
||||||
expect(find('.tabs')).to have_css('span.notifications')
|
expect(find('.fr-tabs')).to have_css('span.notifications')
|
||||||
|
|
||||||
## on the dossier itself
|
## on the dossier itself
|
||||||
click_on 'suivi'
|
click_on 'suivi'
|
||||||
click_on litteraire_user.email
|
click_on litteraire_user.email
|
||||||
expect(page).to have_current_path(instructeur_dossier_path(procedure, litteraire_user.dossiers.first))
|
expect(page).to have_current_path(instructeur_dossier_path(procedure, litteraire_user.dossiers.first))
|
||||||
expect(page).to have_text('Annotations privées')
|
expect(page).to have_text('Annotations privées')
|
||||||
expect(find('.tabs')).to have_css('span.notifications')
|
expect(find('.fr-tabs')).to have_css('span.notifications')
|
||||||
log_out
|
log_out
|
||||||
|
|
||||||
# the scientifiques instructeurs should not have a notification
|
# the scientifiques instructeurs should not have a notification
|
||||||
|
|
|
@ -231,7 +231,7 @@ describe 'user access to the list of their dossiers', js: true do
|
||||||
it "appears in the result list" do
|
it "appears in the result list" do
|
||||||
expect(current_path).to eq(dossiers_path)
|
expect(current_path).to eq(dossiers_path)
|
||||||
expect(page).to have_content("Résultat de la recherche pour « #{dossier_en_construction.id} »")
|
expect(page).to have_content("Résultat de la recherche pour « #{dossier_en_construction.id} »")
|
||||||
expect(page).not_to have_css('.tabs')
|
expect(page).not_to have_css('.fr-tabs')
|
||||||
expect(page).to have_content(dossier_en_construction.id)
|
expect(page).to have_content(dossier_en_construction.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe 'users/dossiers/index', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'n’affiche la barre d’onglets' do
|
it 'n’affiche la barre d’onglets' do
|
||||||
expect(rendered).to have_selector('nav.tabs')
|
expect(rendered).to have_selector('nav.fr-tabs')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -88,9 +88,9 @@ describe 'users/dossiers/index', type: :view do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'affiche la barre d’onglets' do
|
it 'affiche la barre d’onglets' do
|
||||||
expect(rendered).to have_selector('nav.tabs')
|
expect(rendered).to have_selector('nav.fr-tabs')
|
||||||
expect(rendered).to have_selector('nav.tabs li', count: 5)
|
expect(rendered).to have_selector('nav.fr-tabs li', count: 5)
|
||||||
expect(rendered).to have_selector('nav.tabs li.active', count: 1)
|
expect(rendered).to have_selector('nav.fr-tabs li.active', count: 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe 'users/dossiers/show/header', type: :view do
|
||||||
expect(rendered).to have_text("Dossier nº #{dossier.id}")
|
expect(rendered).to have_text("Dossier nº #{dossier.id}")
|
||||||
expect(rendered).to have_text("en construction")
|
expect(rendered).to have_text("en construction")
|
||||||
|
|
||||||
expect(rendered).to have_selector("nav.tabs")
|
expect(rendered).to have_selector("nav.fr-tabs")
|
||||||
expect(rendered).to have_link("Résumé", href: dossier_path(dossier))
|
expect(rendered).to have_link("Résumé", href: dossier_path(dossier))
|
||||||
expect(rendered).to have_link("Demande", href: demande_dossier_path(dossier))
|
expect(rendered).to have_link("Demande", href: demande_dossier_path(dossier))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue