dossier: add details header

This commit is contained in:
Pierre de La Morinerie 2018-08-08 15:09:02 +00:00
parent 97960369db
commit 18d13d76d8
4 changed files with 44 additions and 4 deletions

View file

@ -0,0 +1,25 @@
@import "colors";
@import "constants";
#dossier-show {
h1 {
color: $black;
font-size: 22px;
margin-bottom: 0;
.icon.folder {
vertical-align: -3px;
}
}
h2 {
margin-left: 31px;
margin-bottom: $default-padding;
color: $grey;
font-weight: bold;
}
.sub-header .label {
flex-shrink: 0;
}
}

View file

@ -1,3 +1,2 @@
%h1
Dossier
= @dossier.id
#dossier-show
= render partial: 'new_user/dossiers/show/header', locals: { dossier: @dossier }

View file

@ -0,0 +1,15 @@
.sub-header
.container
.flex.justify-between.align-baseline
.title-container
%h1
%span.icon.folder
= dossier.procedure.libelle
%h2
Dossier nº #{dossier.id}
= render partial: 'shared/dossiers/status', locals: { dossier: dossier }
%ul.tabs
%li.active
= link_to "Résumé", dossier_path(dossier)

View file

@ -11,6 +11,7 @@ describe 'new_user/dossiers/show.html.haml', type: :view do
subject! { render }
it 'affiche les informations du dossier' do
expect(rendered).to have_text("Dossier #{dossier.id}")
expect(rendered).to have_text(dossier.procedure.libelle)
expect(rendered).to have_text("Dossier nº #{dossier.id}")
end
end