diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86e65c390..295eb3e0e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,11 +5,13 @@ image: registry.gitlab.com/chill-projet/chill-app/php-base-image:7.4 cache: paths: - tests/app/vendor/ + - .composer before_script: # add extensions to postgres - PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -h db -c "CREATE EXTENSION IF NOT EXISTS unaccent; CREATE EXTENSION IF NOT EXISTS pg_trgm;" # Install and run Composer + - mkdir -p $COMPOSER_HOME - curl -sS https://getcomposer.org/installer | php - php -d memory_limit=2G composer.phar install - php tests/app/bin/console doctrine:migrations:migrate -n @@ -34,6 +36,10 @@ variables: REDIS_HOST: redis REDIS_PORT: 6379 REDIS_URL: redis://redis:6379 + # change vendor dir to make the app install into tests/apps + COMPOSER_VENDOR_DIR: tests/app/vendor + # cache some composer data + COMPOSER_HOME: .composer # Run our tests diff --git a/composer.json b/composer.json index 64d9dca22..f5f1a2806 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "Chill\\ReportBundle\\": "src/Bundle/ChillReportBundle", "Chill\\TaskBundle\\": "src/Bundle/ChillTaskBundle", "Chill\\ThirdPartyBundle\\": "src/Bundle/ChillThirdPartyBundle", - "Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle/src" + "Chill\\AsideActivityBundle\\": "src/Bundle/ChillAsideActivityBundle/src", + "Chill\\DocGeneratorBundle\\": "src/Bundle/ChillDocGeneratorBundle" } }, "autoload-dev": { @@ -90,4 +91,4 @@ "config": { "bin-dir": "bin" } -} \ No newline at end of file +} diff --git a/docs/source/development/pagination.rst b/docs/source/development/pagination.rst index c0cec9639..1a2c91ff0 100644 --- a/docs/source/development/pagination.rst +++ b/docs/source/development/pagination.rst @@ -28,7 +28,7 @@ Then, render the pagination using the dedicated twig function. .. code-block:: html+twig - {% extends "ChillPersonBundle::layout.html.twig" %} + {% extends "@ChillPerson/Person/layout.html.twig" %} {% block title 'Item list'|trans %} diff --git a/docs/source/development/user-interface/layout-template-usage.rst b/docs/source/development/user-interface/layout-template-usage.rst index 2b7a7764c..69848c650 100644 --- a/docs/source/development/user-interface/layout-template-usage.rst +++ b/docs/source/development/user-interface/layout-template-usage.rst @@ -149,7 +149,7 @@ It proposes a new block : * where to display the admin content -ChillPersonBundle::layout.html.twig +@ChillPersonBundle/Person/layout.html.twig ----------------------------------- This layout extend `ChillMainBundle::layoutWithVerticalMenu.html.twig` add the person details in the block `top_banner`, set the menu `person` as the vertical menu. diff --git a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss index 1d271abfe..fc492c7bc 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss +++ b/src/Bundle/ChillActivityBundle/Resources/public/chill/chillactivity.scss @@ -1,14 +1,105 @@ // Access to Bootstrap variables and mixins @import '~ChillMainAssets/module/bootstrap/shared'; -//@import '~ChillMainSass/custom/mixins/entity'; +// activity creation first step: select type page +div.new-activity-select-type { + div.activity-row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + gap: 12px; -//.chill-entity.chill-entity__activity-reason { -// @include entity($chill-pink, white); -//} + div.bloc { + width: 200px; + align-self: flex-end; + height: 140px; + display: flex; + justify-content: center; + align-items: center; + } + } +} -.activity { - //color: $chill-green; +// exceptions for flex-table in list-records +div.activity-list { + div.flex-table { + div.item-bloc { + div.item-row.main { + div.item-col { + &:first-child { + flex-basis: 27%; + } + ul.list-content { + li.social-issues, li.social-actions { + .badge-primary { + font-variant: small-caps; + font-weight: bold; + font-size: 88%; + margin-bottom: 0.2em; + } + } + li.social-issues .badge-primary { + background-color: $orange; + } + li.social-actions .badge-primary { + background-color: $green; + } + } + } + } + div.item-row.details { + flex-direction: row; + & > div.item-col { + justify-content: flex-start; + align-self: center; + &:nth-child(1) { + flex-grow: 1; flex-shrink: 0; flex-basis: 30%; + } + &:nth-child(2) { + flex-grow: 0; flex-shrink: 1; flex-basis: 70%; + } + + &:only-child { + flex-grow: 0; flex-shrink: 0; flex-basis: 100%; + & > div.concerned-groups { + flex-grow: 0; flex-shrink: 0; flex-basis: 100%; + display: flex; + flex-direction: column; // TODO pas fini + div.group { + flex-grow: 1; flex-shrink: 0; flex-basis: 30%; + h4 {} + ul.list-content { + li { + display: inline; + } + } + } + } + } + } + div.concerned-groups { + font-size: 85%; + h4 { + text-transform: uppercase; + } + } + } + ul.list-content { + list-style-type: none; + padding-left: 1em; + margin: 0 0; + li { + margin-bottom: 0.2em; + } + } + } + div.duration { + font-size: smaller; + padding-left: 1em; + margin-top: 1em; + } + } } // exceptions for flex-bloc in concerned-groups @@ -22,7 +113,7 @@ div.flex-bloc.concerned-groups { li { margin-bottom: 0.2em; a { - color: white; + color: $white; cursor: pointer; &:hover { color: #ffffffab; @@ -36,97 +127,3 @@ div.flex-bloc.concerned-groups { } } -// exceptions for flex-table in list-records -div.flex-table.list-records { - div.item-bloc { - div.item-row.main { - div.item-col { - &:first-child { - flex-basis: 27%; - } - ul.list-content { - li.social-issues, li.social-actions { - .badge-primary { - font-variant: small-caps; - font-weight: bold; - font-size: 88%; - margin-bottom: 0.2em; - } - } - li.social-issues .badge-primary { - background-color: var(--chill-orange); - } - li.social-actions .badge-primary { - background-color: var(--chill-green); - } - } - } - } - div.item-row.details { - flex-direction: row; - & > div.item-col { - justify-content: flex-start; - align-self: center; - &:nth-child(1) { - flex-grow: 1; flex-shrink: 0; flex-basis: 30%; - } - &:nth-child(2) { - flex-grow: 0; flex-shrink: 1; flex-basis: 70%; - } - - &:only-child { - flex-grow: 0; flex-shrink: 0; flex-basis: 100%; - & > div.concerned-groups { - flex-grow: 0; flex-shrink: 0; flex-basis: 100%; - display: flex; - flex-direction: column; // TODO pas fini - div.group { - flex-grow: 1; flex-shrink: 0; flex-basis: 30%; - h4 {} - ul.list-content { - li { - display: inline; - } - } - } - } - } - } - div.concerned-groups { - font-size: 85%; - h4 { - text-transform: uppercase; - } - } - } - ul.list-content { - list-style-type: none; - padding-left: 1em; - margin: 0 0; - li { - margin-bottom: 0.2em; - } - } - } - div.duration { - font-size: smaller; - padding-left: 1em; - margin-top: 1em; - } -} - -div.activity-row { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - gap: 12px; - div.bloc { - width: 200px; - align-self: flex-end; - height: 140px; - display: flex; - justify-content: center; - align-items: center; - } -} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig index 92b1b3ff4..2ee9eeba0 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig @@ -60,7 +60,10 @@
+ {{ "There isn't any activities."|trans }} + +
-- {{ "There isn't any activities."|trans }} - -
-{% else %} - -- - {{ activity.durationTime|date('H:i') }} -
- {% endif %} - {% if activity.travelTime and t.travelTimeVisible %} -- - {{ activity.travelTime|date('H:i') }} -
- {% endif %} -+ + {{ activity.durationTime|date('H:i') }} +
+ {% endif %} + {% if activity.travelTime and t.travelTimeVisible %} ++ + {{ activity.travelTime|date('H:i') }} +
+ {% endif %} +- {{ address.text }} -
-- {{ address.postcode.name }} -
-- {{ address.country.name.fr }} -
- -+ {{ address.text }} +
++ {{ address.postcode.code }} {{ address.postcode.name }} +
++ {{ address.country.name.fr }} +
+ {{ error.sta }} {{ error.txt }}
+ {{ $t(error.msg) }}
+
{{ $t('courselocation.sure_description') }}
+ + +- {{ $t('confirm.text_draft') }} - {{ $t('course.step.draft') }} -
-- {{ $t('confirm.text_active') }} - {{ $t('course.step.active') }} -
- -{{ $t('courselocation.temporary_address_must_be_changed') }}
+{{ work.socialAction.text }}
-{{ work.socialAction.text }}
Motifs, objectifs et dispositifs disponibles pour ajout :
+{{ $t('available_goals_text') }}
+ +{{ $t('available_evaluations_text') }}
+- Aucun tiers traitant -
- -{{ handlingThirdParty.text }}
-Aucun tiers intervenant
- -{{ t.text }}
-+ {{ $t('no_handling_thirdparty') }} +
{{ handlingThirdParty.text }}
+Veuillez corriger les erreurs suivantes:
-{{ $t('no_thirdparty_intervener') }}
+{{ t.text }}
+{{ $t('fix_these_errors') }}
+- Aucun résultat associé -
-+ Aucun résultat associé +
+{{ $t('household_members_editor.household_for_participants_accompanying_period') }}:
-
- - {{ p.person.firstname ~ ' ' ~ p.person.lastname }} - -
- {% endfor %} - {% else %} - {{ 'No data given'|trans }} - {% endif %} -{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
+{{ accompanying_period.requestorThirdParty.name }}
+ {% if accompanying_period.emergency %} + {{- 'Emergency'|trans|upper -}} {% endif %} - {% else %} - {{ 'No data given'|trans }} - {% endif %} + {% if accompanying_period.confidential %} + {{- 'Confidential'|trans|upper -}} + {% endif %} ++ + {{ p.person.firstname ~ ' ' ~ p.person.lastname }} + +
+ {% endfor %} + {% else %} + {{ 'No data given'|trans }} + {% endif %} ++ {{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }} +
+ {% endif %} + {% if accompanying_period.requestorThirdParty is not null %} ++ {{ accompanying_period.requestorThirdParty.name }} +
+ {% endif %} + {% else %} + {{ 'No data given'|trans }} + {% endif %} +- {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} - - {{ pattern }} - -
++ {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} + + {{ pattern }} + +
-{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
+{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
-{% if persons|length > 0 %} + {% if persons|length > 0 %} -| {% 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 %} - {% endif %} - {% endapply %} - - | -- {% 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 %} - | -- |
| + {% 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 %} + {% endif %} + {% endapply %} + + | ++ {% 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 %} - - | -
- {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} - - {{ pattern }} - -
++ {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} + + {{ pattern }} + +
-{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
+{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
-{% if persons|length > 0 %} + {% if persons|length > 0 %} -| {% trans %}Name{% endtrans %} | -{% trans %}Date of birth{% endtrans %} | -{% trans %}Phonenumber{% endtrans %} | -- |
|---|
| - {% set is_open = person.isOpen() %} - - {{person.firstName}} {{person.lastName}} - {% apply spaceless %} - {% if chill_person.fields.accompanying_period == 'visible' %} - {% if is_open == false %} - - {% else %} - - {% endif %} + | {% trans %}Name{% endtrans %} | +{% trans %}Date of birth{% endtrans %} | +{% trans %}Phonenumber{% endtrans %} | ++ | |
|---|---|---|---|---|---|
| + {% set is_open = person.isOpen() %} + + {{person.firstName}} {{person.lastName}} + {% apply spaceless %} + {% if chill_person.fields.accompanying_period == 'visible' %} + {% if is_open == false %} + + {% else %} + + {% endif %} + {% endif %} + {% endapply %} + + | ++ {% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %} + | +
+
|
- - {% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %} - | -
-
|
- - - | -
{{ person.mobilenumber|chill_format_phonenumber }}
+ - {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} - - {{ pattern }} - -
+{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
++ {{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }} + + {{ pattern }} + +
- -{% if persons|length > 0 %} - -{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}
+ {{ person.maritalStatusComment.comment|chill_markdown_to_html }} ++ {% else %} + {{ 'No data given'|trans }} + {% endif %} +
{{ person.email|nl2br }}{% else %}{{ 'No data given'|trans }}{% endif %}
{{ person.phonenumber|chill_format_phonenumber }}{% else %}{{ 'No data given'|trans }}{% endif %}{{ person.mobilenumber|chill_format_phonenumber }}{% else %}{{ 'No data given'|trans }}{% endif %}+ {{ person.contactInfo|chill_markdown_to_html }} ++ {% else %} + {{ 'No data given'|trans }} + {% endif %} +
{{ 'No third parties'|trans }}
- {% else %} - - -| - | {{ 'Name'|trans }} | -{{ 'Category'|trans }} | -- |
|---|---|---|---|
| {{ (tp.active ? '' : '')|raw }} | -{{ tp.name }} | - {% set types = [] %} - {% for t in tp.type %} - {% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %} - {% endfor %} -{{ types|join(', ') }} | -- - | -
{{ 'No third parties'|trans }}
+ {% else %} - {% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %} -| + | {{ 'Name'|trans }} + + | +{{ 'Category'|trans }} + + | +{{ 'Address'|trans }} + + | +{{ 'thirdparty.UpdatedAt.short'|trans }} + + | ++ |
|---|---|---|---|---|---|
| {{ (tp.active ? '' : '')|raw }} | +{{ tp.name }} | + {% set types = [] %} + {% for t in tp.type %} + {% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %} + {% endfor %} +{{ types|join(', ') }} | ++ {{ tp.address|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }} + | ++ {% if tp.updatedAt != null %} + {{ tp.updatedAt|format_date('short') }} + {% else %} + {{ tp.createdAt|format_date('short') }} + {% endif %} + | ++ + | +
+ {{ thirdParty.comment|chill_markdown_to_html }} ++ {% endif %} +