diff --git a/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss b/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss index 7d61483db..2f0e5de55 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/sass/person_with_period.scss @@ -1,68 +1,67 @@ -.person-list--with-period { - .person-list--with-period__item { - margin-bottom: 0; - padding: 1em 1em 2em 1em; - &:nth-last-of-type { - padding-bottom: 1em; - } - - .chill-entity__person { - .chill-entity__person__first-name, - .chill-entity__person__last-name { - font-size: 1.3em; - font-weight: 700; +/// complete and overwrite flex-table in chillmain.scss +div.list-with-period { // .flex-table + + div.item-bloc { + margin-bottom: 0; + + &:nth-last-of-type { + padding-bottom: 1em; } - } - - & > div { - display: flex; - } - @media screen and (min-width: 720px) { + + flex-direction: column; // !! & > div { - flex-direction: row; - - .person-list--with-period__item__box-where { - align-self: flex-end; - margin-left: auto; - width: 33%; - - text-align: right; - } + display: flex; + flex-direction: row; + + &.person { + div.box-person { + flex-grow: 0; + flex-shrink: 0; + flex-basis: 33%; + } + div.box-where { + flex-grow: 1; + flex-shrink: 0; + flex-basis: 40%; + } + ul.record_actions { + flex-grow: 0; + flex-shrink: 0; + flex-basis: 25%; + li { + margin-right: 0; + } + } + @media only screen and (max-width: 768px) { + flex-direction: column; + } + } + + &.periods { + list-style-type: none; + padding: 0; + margin: 0; + display: flex; + flex-direction: column; + div.header { + abbr.referrer { + font-size: 70%; + } + span.user {} + } + span.more { + font-style: italic; + } + } } - } - - @media screen and (max-width: 720px) { - & > div { - flex-direction: column; - } - } - - @media screen and (max-width: 460px) { - .person-list--with-period__item__box-where__center { - display: none; - } - .chill_address { - .street { - display: none; - } - - .country { - display: none; - } - } - } - - ul.person-list--with-period__item__periods { - list-style-type: none; - padding: 0; - margin: 0; - - li { - - } - } - } - .person-list--with-period__item:hover { - background-color: var(--chill-llight-gray); - } + } +} + + +.chill-entity__person { + .chill-entity__person__first-name, + .chill-entity__person__last-name { + font-size: 1.3em; + font-weight: 700; + } } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index cf35e89ac..1bfb60037 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -11,7 +11,7 @@
{{ 'This accompanying course is still a draft'|trans }} - + {{ 'Edit & activate accompanying course'|trans }} @@ -51,7 +51,7 @@ {%- if p.person.lastAddress is not empty -%} {{ address._render(p.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }} {%- else -%} -
+ {{ 'No address given'|trans }} {%- endif -%} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index da571d173..c935a73f9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -3,206 +3,168 @@

{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} - {{ pattern }} + {{ pattern }}

{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}

- + {% if persons|length > 0 %} -
- {% for person in persons %} -
-
-
-
- {{ person|chill_entity_render_box({'addLink': true}) }} - {{ 'Born the %date%'|transchoice(person.genderNumeric, { '%date%': person.birthdate|format_date("medium") }) }} -
- -
-
- {{ person.center }} - {% if person.getLastAddress is not null %} - {{ person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} - {% else %} - {{ 'No address'|trans }} - {% endif %} - {% if person.mobilenumber is not empty %} - {{ person.mobilenumber|chill_format_phonenumber }} - {% endif %} - {% if person.phonenumber is not empty %} - {{ person.phonenumber|chill_format_phonenumber }} - {% endif %} - -
-
- - {#- 'apps' is for AccompanyingPeriodParticipationS #} - {#- filter using acl -#} - {%- set apps = [] %} - {%- for app in person.openedParticipations %} - {%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', app.accompanyingPeriod) %} - {%- set apps = apps|merge([app]) %} - {%- endif %} - {%- endfor %} - {% if apps|length > 0 %} - - {% endif %} - -
- {% endfor %} -
- - {# - - - - - - - - - - - {% for person in persons %} - - - - - - - {% endfor %} - -
{% trans %}Name{% endtrans %}{% trans %}Date of birth{% endtrans %}{% trans %}Nationality{% endtrans %} 
- {% set is_open = person.isOpen() %} - - {{ person|chill_entity_render_box }} - {% apply spaceless %} - {% if chill_person.fields.accompanying_period == 'visible' %} - {% if is_open == false %} - - {% else %} - - {% endif %} + - {% if person.birthdate is not null %} - {{ person.birthdate|format_date('long') }} - {% else %}{{ 'Unknown date of birth'|trans }}{% endif %} - - {% if person.nationality is not null %} - {{person.nationality.name | localize_translatable_string }} - {% else %} - {{ 'Without nationality'|trans }} - {% endif %} - -
    -
  • - {% if is_granted('CHILL_PERSON_UPDATE', person) %} -
  • {% endif %} -
-
+ + +
+
+ {% if person.getLastAddress is not null %} + {{ person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }} + {% else %} + {{ 'No address'|trans }} + {% endif %} + + + +
+ + + - #} + {#- 'apps' is for AccompanyingPeriodParticipationS #} + {#- filter using acl -#} + {%- set apps = [] %} + {%- for app in person.openedParticipations %} + {%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', app.accompanyingPeriod) %} + {%- set apps = apps|merge([app]) %} + {%- endif %} + {%- endfor %} + + {% if apps|length > 0 %} +
+ {% for app in apps %} +
+ + + {% for issue in app.accompanyingPeriod.socialIssues|slice(0,2) %} + {{ issue|chill_entity_render_box }} + {% endfor %} + + {% if app.accompanyingPeriod.socialIssues|length > 2 %} + {{ 'and %number% other'|transchoice(app.accompanyingPeriod.socialIssues|length-2) }} + {% endif %} +
+ {% endfor %} +
+ {% endif %} - + {% endfor %} + + + + {% else %} {% endif %} {% if preview == false %} -{{ chill_pagination(paginator) }} + {{ chill_pagination(paginator) }} {% endif %} - diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ebb62b6ad..c2f56d7f8 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -125,7 +125,7 @@ Reset: 'Remise à zéro' 'Person search results': 'Recherche de personnes' Person search results by phonenumber: Recherche de personnes par numéro de téléphone 'Search within persons': 'Recherche parmi les personnes' -Open person file: Ouvrir le dossier +Open person file: Ouvrir and %number% other: '{0} et aucun autre| {1} et une autre |]1, Inf] et %number% autres' '%total% persons matching the search pattern:': '{0} Aucune personne ne correspond aux termes de recherche : | {1} Une personne a été trouvée par la recherche : | ]1,Inf] %total% personnes correspondent aux termes de recherche :' 'Last opening since %last_opening%': 'Dernière ouverture le %last_opening%.' @@ -172,6 +172,8 @@ Resources: Interlocuteurs privilégiés Social actions: Actions d'accompagnement Last events on accompanying course: Dernières actions de suivi Edit & activate accompanying course: Modifier et valider +See accompanying periods: Voir les périodes d'accompagnement +Referrer: Référent # pickAPersonType Pick a person: Choisir une personne