diff --git a/CHANGELOG.md b/CHANGELOG.md index 07ca147a8..5be67840f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to * [template] do not list inactive templates (for doc generator) * [parcours] location cannot be removed if linked to a user (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/478) * [person] email added to twig personRenderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/490) +* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index 30eadc7b1..92542f178 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -37,57 +37,68 @@ div.banner { margin-right: 1em; } } + .household-link { + border: 1px solid white; + padding: .05rem .3rem; + border-radius: 5px; + color: white; + cursor: pointer; + &:hover { + background-color: white; + color: $chill-person-context + } + } } } div.person-view { - figure.person-details { - h2 { - font-family: 'Open Sans'; - font-weight: 600; - margin-bottom: 0.3em; - font-variant: small-caps; - } - dl { - margin-top: 0.3em; - } - dt { - font-family: 'Open Sans'; - font-weight: 600; - } - dd { - margin-left: 0; - } - /* - a.sc-button { background-color: $black; padding-top: 0.2em; padding-bottom: 0.2em; } - */ - } - /* custom fields on the home page */ - div.custom-fields { - figure.person-details { - display: flex; - flex-flow: row wrap; - div.cf_title_box:nth-child(4n+1) h2 { - @extend .chill-red !optional; - } - div.cf_title_box:nth-child(4n+2) h2 { - @extend .chill-green !optional; - } - div.cf_title_box:nth-child(4n+3) h2 { - @extend .chill-orange !optional; - } - div.cf_title_box:nth-child(4n+4) h2 { - @extend .chill-blue !optional; - } - div.cf_title_box:nth-child(2n+1) { - width: 50%; - margin-right: 40px; - } - div.cf_title_box:nth-child(2n+2) { - width: calc(50% - 40px); - } - } - } + figure.person-details { + h2 { + font-family: 'Open Sans'; + font-weight: 600; + margin-bottom: 0.3em; + font-variant: small-caps; + } + dl { + margin-top: 0.3em; + } + dt { + font-family: 'Open Sans'; + font-weight: 600; + } + dd { + margin-left: 0; + } + /* + a.sc-button { background-color: $black; padding-top: 0.2em; padding-bottom: 0.2em; } + */ + } + /* custom fields on the home page */ + div.custom-fields { + figure.person-details { + display: flex; + flex-flow: row wrap; + div.cf_title_box:nth-child(4n+1) h2 { + @extend .chill-red !optional; + } + div.cf_title_box:nth-child(4n+2) h2 { + @extend .chill-green !optional; + } + div.cf_title_box:nth-child(4n+3) h2 { + @extend .chill-orange !optional; + } + div.cf_title_box:nth-child(4n+4) h2 { + @extend .chill-blue !optional; + } + div.cf_title_box:nth-child(2n+1) { + width: 50%; + margin-right: 40px; + } + div.cf_title_box:nth-child(2n+2) { + width: calc(50% - 40px); + } + } + } } /* diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/banner.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/banner.html.twig index 0e051da2c..8f7d5cc20 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/banner.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/banner.html.twig @@ -58,6 +58,13 @@ }) }} {%- endif -%} + {% if person.getCurrentHousehold is not null %} + + + + + + {% endif %}