Merge pull request #794 from sgmap/button-fixes

Button fixes
This commit is contained in:
gregoirenovel 2017-10-06 10:55:30 +02:00 committed by GitHub
commit df699336d9
3 changed files with 7 additions and 7 deletions

View file

@ -7,8 +7,8 @@
%li
= "Dossier nº #{dossier.id}"
%div
= render partial: "state_button", locals: { dossier: dossier }
= render partial: "new_gestionnaire/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_gestionnaire&.follow?(dossier) }
= render partial: "state_button", locals: { dossier: dossier }
%ul.tabs
- notifications_summary = dossier.notifications_summary
%li{ class: current_page?(dossier_path(dossier.procedure, dossier)) ? 'active' : nil }

View file

@ -2,18 +2,18 @@
- if dossier_is_followed
= link_to unfollow_dossier_path(procedure, dossier), method: :patch, class: 'button' do
%i.unfollow>
ne plus suivre
Ne plus suivre
- else
= link_to follow_dossier_path(procedure, dossier), method: :patch, class: 'button' do
%i.follow>
suivre le dossier
Suivre le dossier
- elsif dossier.termine?
- if dossier.archived
= link_to unarchive_dossier_path(procedure, dossier), method: :patch, class: 'button' do
%i.unarchive>
désarchiver le dossier
Désarchiver le dossier
- else
= link_to archive_dossier_path(procedure, dossier), method: :patch, class: 'button' do
%i.archive>
archiver le dossier
Archiver le dossier

View file

@ -40,7 +40,7 @@ feature 'The gestionnaire part' do
test_statut_bar(a_suivre: 1, tous_les_dossiers: 1)
dossier_present?(dossier.id, 'en construction')
click_on 'suivre le dossier'
click_on 'Suivre le dossier'
expect(page).to have_current_path(procedure_path(procedure))
test_statut_bar(suivi: 1, tous_les_dossiers: 1)
expect(page).to have_text('Aucun dossier')
@ -49,7 +49,7 @@ feature 'The gestionnaire part' do
expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis'))
dossier_present?(dossier.id, 'en construction')
click_on 'ne plus suivre'
click_on 'Ne plus suivre'
expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis'))
test_statut_bar(a_suivre: 1, tous_les_dossiers: 1)
expect(page).to have_text('Aucun dossier')