diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index 906a28d78..07b59c7e7 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -47,68 +47,12 @@
- -
+ + diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss index 1d7cd5db8..436f764dd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss @@ -206,8 +206,8 @@ footer.footer { /// titles h1, h2, -.h1, .h2 { - font-weight: $headings-font-weight + 200; +.h1, .h2 { + font-weight: $headings-font-weight + 100; } /// typography @@ -276,6 +276,20 @@ div.metadata { } } +/// chill help tooltip + +.chill-help-tooltip { + &::before { + content: '\f05a'; + color: $chill-pink; + font-family: ForkAwesome; + font-style: normal; + font-size: 120%; + cursor: pointer; + margin: auto 0.3em; + } +} + /// display definition list // with dt and dd on same line diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss index 6b54172c7..14c22685b 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/buttons.scss @@ -19,7 +19,8 @@ $chill-theme-buttons: ( "view": $chill-blue, "misc": $gray-300, "cancel": $gray-300, - "choose": $gray-300 + "choose": $gray-300, + "unlink": $chill-red, ); @each $button, $color in $chill-theme-buttons { @@ -45,6 +46,7 @@ $chill-theme-buttons: ( &.btn-delete, &.btn-danger, &.btn-remove, + &.btn-unlink, &.btn-action, &.btn-edit, &.btn-update { @@ -67,6 +69,7 @@ $chill-theme-buttons: ( // &.btn-submit::before, // &.btn-reset::before, // &.btn-action::before, + &.btn-unlink::before, &.btn-delete::before, &.btn-remove::before, &.btn-choose::before, @@ -94,6 +97,7 @@ $chill-theme-buttons: ( &.btn-remove::before { content: "\f00d"; } // fa-times &.btn-cancel::before { content: "\f060"; } // fa-arrow-left &.btn-choose::before { content: "\f00c"; } // fa-check // f046 fa-check-square-o + &.btn-unlink::before { content: "\f127"; } // fa-chain-broken } diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index a939b17f8..21ecde267 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -1,3 +1,6 @@ +// See Assets Album page: +// http://localhost:8001/_dev/assets + /* * __FLEX-TABLE_________ * FLEX RESPONSIVE TABLE/BLOCK PRESENTATION @@ -175,13 +178,13 @@ div.wrap-list { border: 1px solid $black; div.wl-col.title { - background-color: $yellow; + background-color: yellow; } div.wl-col.list { - background-color: $green; + background-color: cyan; p.wl-item { - background-color: $orange; + background-color: orange; } } } @@ -256,3 +259,53 @@ div.wrap-header { } } } + + +/* +* FLOATBUTTON +* p-ê pas convaincant: cet asset est toujours en observation +*/ + +div.float-button { + width: 100%; + + div.box { + width: 100%; + + div.action { + float: right; + } + } + &.top { + div.action { + padding: 0 0 1em 1em; + } + + // avoid a position relative that make links unclickable + .fa-ul > li { + position: initial; + } + } + &.bottom { + display: flex; + overflow: hidden; + div.action { + height: calc(100% - 0em); + shape-outside: inset(calc(100% - 2em) 0 0); + display: flex; + align-items: flex-end; + padding: 0 0 0 1em; + * { + align-self: flex-end !important; + } + } + } + &.debug { + padding: 1em; + border: 1px solid black; + background-color: yellow; + div.action { + background-color: transparentize(#00ffff, 0.4); + } + } +} diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss index 9e8d3031c..f9cd33f5f 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/module/bootstrap/custom/_variables.scss @@ -479,7 +479,7 @@ $font-sizes: ( $headings-margin-bottom: $spacer / 2 !default; $headings-font-family: null !default; $headings-font-style: null !default; -$headings-font-weight: 500 !default; +$headings-font-weight: 600 !default; $headings-line-height: 1.2 !default; $headings-color: null !default; // scss-docs-end headings-variables diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue index 0ae6fc578..249b53588 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/App.vue @@ -1,9 +1,4 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 3d6d5b124..0f397211e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -44,47 +44,67 @@
- +
+ @@ -119,7 +139,7 @@ export default { components: { AddressRenderBox }, - props: ['person', 'options', 'render'], + props: ['person', 'options', 'render', 'returnPath'], computed: { getGenderTranslation: function() { return this.person.gender == 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man'; @@ -155,12 +175,12 @@ export default { return ""; } }, - altNameLabel: function(){ + altNameLabel: function() { for(let i = 0; i < this.person.altNames.length; i++){ return this.person.altNames[i].label } }, - altNameKey: function(){ + altNameKey: function() { for(let i = 0; i < this.person.altNames.length; i++){ return this.person.altNames[i].key } @@ -168,7 +188,7 @@ export default { getUrl: function() { return `/fr/person/${this.person.id}/general`; }, - getAge: function(){ + getAge: function() { if(this.person.birthdate && !this.person.deathdate){ const birthday = new Date(this.person.birthdate.datetime) const now = new Date() @@ -184,6 +204,10 @@ export default { // todo: change this return "Age unknown" } + }, + getCurrentHouseholdUrl: function() { + let returnPath = this.returnPath ? `?returnPath=${this.returnPath}` : ``; + return `/fr/person/household/${this.person.current_household_id}/summary${returnPath}` } } } @@ -191,17 +215,6 @@ export default { +
+
+

+ +

+
+
+ {% for m in members %} + {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} + {% endfor %} +
-
- {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} -
-
-
- - -
- {% if m.comment is not empty %} -
-
- {{ m.comment|chill_markdown_to_html }} -
-
- {% endif %} - - {% endfor %} - + + {% endif %} + + {% endfor %} - {% endif %} -{% endfor %} - - + {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonNormalizer.php index 3dabb43cb..2b82780c2 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonNormalizer.php @@ -19,6 +19,7 @@ namespace Chill\PersonBundle\Serializer\Normalizer; use Chill\MainBundle\Entity\Center; +use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Person; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; @@ -61,6 +62,9 @@ class PersonNormalizer implements public function normalize($person, string $format = null, array $context = array()) { + /** @var Household $household */ + $household = $person->getCurrentHousehold(); + /** @var Person $person */ return [ 'type' => 'person', @@ -77,6 +81,7 @@ class PersonNormalizer implements 'gender' => $person->getGender(), 'gender_numeric' => $person->getGenderNumeric(), 'current_household_address' => $this->normalizer->normalize($person->getCurrentHouseholdAddress()), + 'current_household_id' => $household ? $this->normalizer->normalize($household->getId()) : null, ]; } @@ -90,7 +95,7 @@ class PersonNormalizer implements return $r; } - + public function supportsNormalization($data, string $format = null): bool { diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 55890c4b0..fc112a1e7 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -62,6 +62,7 @@ class PersonRender extends AbstractChillEntityRender 'address_multiline' => $options['address_multiline'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, 'customButtons' => $options['customButtons'] ?? [], + 'customArea' => $options['customArea'] ?? [], ]; return diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index 05738effb..cea908ccf 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -19,10 +19,13 @@ household: many {Montrer # anciennes ou futures appartenances} other {Montrer # anciennes ou futures appartenances} } + Hide memberships: Masquer Those members does not share address: Ces usagers ne partagent pas l'adresse du ménage. Any persons into this position: Aucune personne n'appartient au ménage à cette position. Leave household: Quitter le ménage - Leave: Quitter + Leave: Détacher + person: + leave: L'usager quitte le ménage Join: Rejoindre un ménage Change position: Repositionner Household file: Dossier ménage @@ -36,10 +39,11 @@ household: is not holder: N'est pas titulaire holder: Titulaire Edit member household: Modifier l'appartenance au ménage + Edit his household: Modifier son appartenance au ménage Current household members: Membres actuels Household summary: Résumé du ménage Accompanying period: Parcours d'accompagnement - Addresses: Adresses + Addresses: Historique adresse Current address: Adresse actuelle Household does not have any address currently: Le ménage n'a pas d'adresse renseignée actuellement Edit household members: Modifier l'appartenance au ménage @@ -52,7 +56,8 @@ household: Expecting for birth on date: Naissance attendue pour le {date} Expecting for birth: Naissance attendue (date inconnue) Any expecting birth: Aucune naissance proche n'a été renseignée. - Comment and expecting birth: Commentaire et naissance attendue + New comment and expecting birth: Écrire un commentaire + Edit comment and expecting birth: Mettre à jour le commentaire Edit member metadata: Données supplémentaires comment_membership: Commentaire général sur les membres expecting_birth: Naissance attendue ? diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue index da2dd150e..720d9903b 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue +++ b/src/Bundle/ChillThirdPartyBundle/Resources/public/vuejs/_components/Entity/ThirdPartyRenderBox.vue @@ -32,24 +32,29 @@
- - - +
+
+
+ +
+ +
+
+ diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 689c98ecb..7768d2913 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -13,6 +13,10 @@ 'replace' Twig\Markup, 'after' Twig\Markup ] + * customArea [ + 'beforeLabel' Twig\Markup, + 'afterLabel' Twig\Markup, + ] #} {% macro raw(thirdparty, options) %} @@ -23,13 +27,25 @@
+ {%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} - {{ _self.raw(thirdparty, options) }} - - {%- else -%} - {{ _self.raw(thirdparty, options) }} {%- endif -%} + + {% if options['customArea']['beforeLabel'] is defined %} + {{ options['customArea']['beforeLabel'] }} + {% endif %} + + {{ _self.raw(thirdparty, options) }} + + {% if options['customArea']['afterLabel'] is defined %} + {{ options['customArea']['afterLabel'] }} + {% endif %} + + {%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} + + {%- endif -%} + {%- if options['addEntity'] -%} {{ 'Third party'|trans }} {%- endif -%} diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index 07f6e1668..80450f7bb 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -54,6 +54,7 @@ class ThirdPartyRender extends AbstractChillEntityRender 'addInfo' => $options['addInfo'] ?? false, 'hLevel' => $options['hLevel'] ?? 3, 'customButtons' => $options['customButtons'] ?? [], + 'customArea' => $options['customArea'] ?? [], ]; return