From 6d3b88aee923abf71e626c16839143da6f3e69d4 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 3 Mar 2022 21:09:50 +0100 Subject: [PATCH 1/2] Add current household link in person banner --- .../Resources/public/chill/chillperson.scss | 105 ++++++++++-------- .../Resources/views/Person/banner.html.twig | 7 ++ 2 files changed, 65 insertions(+), 47 deletions(-) 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 %} From 9265a1542739c9bfe5a8bb12a3bd5c8845fddce5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 3 Mar 2022 21:12:00 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a38f2ea47..6cf2f8ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to * [confidential] Fix position of toggle button so it does not cover text nor fall outside of box (no issue) * [parcours] Fix edit of both thirdparty and contact name (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/474) * [template] do not list inactive templates (for doc generator) +* [person] Add link to current household in person banner (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/484) ## Test releases