diff --git a/src/Bundle/ChillActivityBundle/Resources/public/scss/chillactivity.scss b/src/Bundle/ChillActivityBundle/Resources/public/scss/chillactivity.scss index 92a84cfbb..a18037cbd 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/scss/chillactivity.scss +++ b/src/Bundle/ChillActivityBundle/Resources/public/scss/chillactivity.scss @@ -33,3 +33,64 @@ div.flex-bloc.concerned-groups { flex-basis: 33%; //3 blocs } } + +// 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%; + } + } + 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; + } +} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig index f39eafd08..a7acc7491 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig @@ -46,14 +46,27 @@ ] %} {% endif %} -
+{% set level1 = (with_display == 'bloc') ? context ~ ' flex-bloc ' : '' %} +{% set level2 = (with_display == 'bloc') ? 'item-bloc ' : '' %} +{% set level3 = (with_display == 'bloc') ? 'item-row ' : '' %} +{% set level4 = (with_display == 'bloc') ? 'item-col ' : '' %} + +
+ {% for bloc in blocs %} -
-
-
-

{{ bloc.title }}

+
+
+
+ + {% if with_display == 'bloc' or bloc.items|length > 0 %} +

{{ bloc.title }}

+ {% endif %} + + {% if with_display == 'bloc' %}
-
+
+ {% endif %} +
    {% for item in bloc.items %}
  • @@ -69,4 +82,5 @@
{% endfor %} +
diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index de30d5366..dbe84a771 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -16,7 +16,9 @@

{% else %} - + +
+ {% for activity in activities %} -
- - - - - - + + {% endif %} + + {% endfor %} - -
{% if activity.date %}{{ activity.date|format_date('long') }}{% endif %}{{ activity.durationTime|date('H:i') }} +
+
+
+ + {% if activity.date %} +

{{ activity.date|format_date('long') }}

+ {% endif %} + +
+

+ + {{ activity.durationTime|date('H:i') }} +

+ + {% if activity.travelTime %} +

+ + {{ activity.travelTime|date('H:i') }} +

+ {% endif %} +
+ +
+
+
    + + {% if activity.user %} +
  • + {{ 'by'|trans }}{{ activity.user.usernameCanonical }} +
  • + {% endif %} + +
  • + {{ activity.type.name | localize_translatable_string }} + + {% if activity.attendee is not null %} + {% if activity.attendee %} + {{ '→ ' ~ 'present'|trans|capitalize }} + {% else %} + {{ '→ ' ~ 'not present'|trans|capitalize }} + {% endif %} + {% endif %} +
  • + +
  • + {{ 'location'|trans ~ ': ' }} + Domicile de l'usager + {# + {% if activity.location %}{{ activity.location }}{% endif %} + #} +
  • + + {%- if activity.reasons is defined -%} +
  • + {%- if activity.reasons is empty -%} + {{ 'No reason associated'|trans }} + {%- else -%} + {% for r in activity.reasons %} + {{ r|chill_entity_render_box }} + {% endfor %} + {%- endif -%} +
  • + {% endif %} + + {%- if activity.socialIssues is defined -%} + + {% endif %} + + {%- if activity.socialActions is defined -%} + + {% endif %} + + +
+
    +
  • + +
  • + {# TOOD + {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} + #} +
  • + +
  • + {# TOOD + {% endif %} + {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} + #} +
  • + +
  • + {# + {% endif %} + #} +
+
+
+ + {% + if activity.comment.comment is not empty + or activity.persons|length > 0 + or activity.thirdParties|length > 0 + or activity.users|length > 0 + %} +
+
+ {% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %} +
+ {% if activity.comment.comment is not empty %} - {{ activity.comment|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }} +
+ {{ activity.comment|chill_entity_render_box( { 'limit_lines': 3, 'metadata': false } ) }} +
{% endif %} - {%- if activity.reasons is empty -%} - {{ 'No reason associated'|trans }} - {%- else -%} - {% for r in activity.reasons %}{{ r|chill_entity_render_box }} {% endfor %} - {%- endif -%} -
{{ activity.type.name | localize_translatable_string }} -
    -
  • - -
  • - {# TOOD - {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} - #} -
  • - -
  • - {# TOOD - {% endif %} - {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} - #} -
  • - -
  • - {# - {% endif %} - #} -
+
{% endif %}
    @@ -77,3 +180,4 @@
+{{ dump()}} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listAccompanyingCourse.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listAccompanyingCourse.html.twig index 7607ac79a..53e7ec86e 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listAccompanyingCourse.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listAccompanyingCourse.html.twig @@ -5,5 +5,5 @@ {% block title %}{{ 'Activity list' |trans }}{% endblock title %} {% block content %} - {% include 'ChillActivityBundle:Activity:list.html.twig' %} + {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse'} %} {% endblock %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig index db441ee69..6856459c6 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/listPerson.html.twig @@ -21,5 +21,5 @@ {% block title %}{{ 'Activity list' |trans }}{% endblock title %} {% block personcontent %} - {% include 'ChillActivityBundle:Activity:list.html.twig' %} + {% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %} {% endblock %} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index 0a4f86bf3..9999e5cee 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -10,7 +10,7 @@

{{ 'Concerned groups'|trans }}

-{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context } %} +{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}

{{ 'Activity data'|trans }}

diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml index 532f25cf4..f7bdff7e6 100644 --- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml @@ -24,6 +24,8 @@ Update activity: Modifier l'activité Scope: Cercle Activity data: Données de l'activité No reason associated: Aucun sujet +No social issues associated: Aucune problématique sociale +No social actions associated: Aucune action d'accompagnement There isn't any activities.: Aucune activité enregistrée. type_name: type de l'activité person_firstname: prénom @@ -39,6 +41,8 @@ Emergency: Urgent Sent received: Envoyer / Recevoir Sent: Envoyer Received: Recevoir +by: 'Par ' +location: Lieu #forms diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index 38bc19cf7..105425c46 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -75,6 +75,6 @@ export default {