diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index 1fd958e5a..dcb808e50 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -1,141 +1,145 @@ {% block content %} -
- {% for accompanying_period in accompanying_periods %} -
-
+
+ {% for accompanying_period in accompanying_periods %} +
+
-
- #{{ accompanying_period.id }} - {% if accompanying_period.emergency %} - {{- 'Emergency'|trans|upper -}} - {% endif %} - {% if accompanying_period.confidential %} - {{- 'Confidential'|trans|upper -}} - {% endif %} - {% if accompanying_period.step == 'DRAFT' %} - {{- 'Draft'|trans|upper -}} - {% else %} - {{- 'Confirmed'|trans|upper -}} +
+ #{{ accompanying_period.id }} + {% if accompanying_period.emergency %} + {{- 'Emergency'|trans|upper -}} + {% endif %} + {% if accompanying_period.confidential %} + {{- 'Confidential'|trans|upper -}} + {% endif %} + {% if accompanying_period.step == 'DRAFT' %} + {{- 'Draft'|trans|upper -}} + {% else %} + {{- 'Confirmed'|trans|upper -}} + {% endif %} +
+ +
+ {% if chill_accompanying_periods.fields.user == 'visible' %} + {% if accompanying_period.user %} + {{ accompanying_period.user.username }} + {% else %} + {{ 'No accompanying user'|trans }} + {% endif %} {% endif %} +
+
+
-
- {% if chill_accompanying_periods.fields.user == 'visible' %} - {% if accompanying_period.user %} - {{ accompanying_period.user.username }} + {% if accompanying_period.closingDate == null %} + {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }} {% else %} - {{ 'No accompanying user'|trans }} + {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ + '%opening_date%': accompanying_period.openingDate|format_date('long'), + '%closing_date%': accompanying_period.closingDate|format_date('long')} + ) }} + {% if accompanying_period.isOpen == false %} +
+
{{ 'Closing motive'|trans }} :
+
{{ accompanying_period.closingMotive|chill_entity_render_box }}
+
+ {% endif %} {% endif %} - {% endif %} +
+
-
-
+

{{ 'Participants'|trans }}

+
+ {% if accompanying_period.participations.count > 0 %} + {% for p in accompanying_period.participations %} +

+ + {{ p.person.firstname ~ ' ' ~ p.person.lastname }} + +

+ {% endfor %} + {% else %} + {{ 'No data given'|trans }} + {% endif %} +
- {% if accompanying_period.closingDate == null %} - {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }} - {% else %} - {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ - '%opening_date%': accompanying_period.openingDate|format_date('long'), - '%closing_date%': accompanying_period.closingDate|format_date('long')} - ) }} - {% if accompanying_period.isOpen == false %} -
-
{{ 'Closing motive'|trans }} :
-
{{ accompanying_period.closingMotive|chill_entity_render_box }}
-
- {% endif %} - {% endif %} +
+
-
-
+

{{ 'Requestor'|trans }}

+
+ {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} + {% if accompanying_period.requestorPerson is not null %} +

+ {{ 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 %} +
-

{{ 'Participants'|trans }}

-
- {% if accompanying_period.participations.count > 0 %} - {% for p in accompanying_period.participations %} -

- - {{ p.person.firstname ~ ' ' ~ p.person.lastname }} - -

+
+
+ +

{{ 'Social issues'|trans }}

+ {% if accompanying_period.socialIssues.count > 0 %} + {% for si in accompanying_period.socialIssues %} +

{{ si.title|localize_translatable_string }}

{% endfor %} {% else %} {{ 'No data given'|trans }} {% endif %} +
+
-
-
+
    -

    {{ 'Requestor'|trans }}

    -
    - {% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %} - {% if accompanying_period.requestorPerson is not null %} -

    - {{ 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 %} -
    - -
-
- -

{{ 'Social issues'|trans }}

- {% if accompanying_period.socialIssues.count > 0 %} - {% for si in accompanying_period.socialIssues %} -

{{ si.title|localize_translatable_string }}

- {% endfor %} - {% else %} - {{ 'No data given'|trans }} - {% endif %} - -
-
- - + {# TODO cause error in household context. only works in person context +
  • + +
  • + {% if accompanying_period.isOpen == true %} +
  • + + + {{'Close accompanying period'|trans }} + +
  • + {% endif %} + {% if accompanying_period.canBeReOpened(person) == true %} +
  • + + + {{'Re-open accompanying period'|trans }} + +
  • + {% endif %} + #} + + +
    -
    - {% endfor %} + {% endfor %}
    {% endblock content %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig index b060087d8..4377391e1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/accompanying_period.html.twig @@ -5,24 +5,24 @@ {% block content %}
    -

    {{ block('title') }}

    +

    {{ block('title') }}

    - {% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %} + {% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %} - +
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig index 2f66447f8..0938a642b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig @@ -7,22 +7,22 @@

    {{ block('title') }}

    - + {% if household.addresses|length == 0 %} + {{ 'No address given'|trans }} + {% else %} -
    + - {% if household.addresses|length == 0 %} - {{ 'No address given'|trans }} - {% else %} -
    - {% endif %} +
    + +
    {% set row = 0 %} {% set previousRowFrom = null %} @@ -68,6 +68,7 @@ {% set previousRowFrom = address.validFrom %} {% endfor %}
    + {% endif %}