diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/activity-badge-title.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/activity-badge-title.html.twig new file mode 100644 index 000000000..1e1d65d91 --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/activity-badge-title.html.twig @@ -0,0 +1,88 @@ +

+ + + {% if activity.date %} +

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

+ {% endif %} + +
+ {% if activity.durationTime and t.durationTimeVisible %} +

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

+ {% endif %} + + {% if activity.travelTime and t.travelTimeVisible %} +

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

+ {% endif %} +
+ +
+ + + {{ activity.type.name | localize_translatable_string }} + + + + + + +

+ +{# +{% if context == 'person' and activity.accompanyingPeriod is not empty %} +
+ + +
+{% endif %} +#} diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig index c719f5bb7..fef381527 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list.html.twig @@ -12,91 +12,9 @@ {% set t = activity.type %}
- -

- - {% if activity.date %} -

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

- {% endif %} -
- {% if activity.durationTime and t.durationTimeVisible %} -

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

- {% endif %} - {% if activity.travelTime and t.travelTimeVisible %} -

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

- {% endif %} -
-
- - - {{ activity.type.name | localize_translatable_string }} - -
    -
  • - {{ 'location'|trans ~ ': ' }} - {# TODO {% if activity.location %}{{ activity.location }}{% endif %} #} - Domicile de l'usager -
  • - {% if activity.user and t.userVisible %} -
  • - {{ 'Referrer'|trans ~ ': ' }} - {{ activity.user.usernameCanonical }} -
  • - {% endif %} -
-
    - {%- if t.reasonsVisible -%} - {%- if activity.reasons is not empty -%} -
  • - {% for r in activity.reasons %} - {{ r|chill_entity_render_box }} - {% endfor %} -
  • - {%- endif -%} - {% endif %} - {%- if t.socialIssuesVisible %} - {%- if activity.socialIssues is not empty -%} - - {%- endif -%} - {% endif %} - {%- if t.socialActionsVisible -%} - {%- if activity.socialActions is not empty -%} - - {%- endif -%} - {% endif %} -
-
-

- {# - {% if context == 'person' and activity.accompanyingPeriod is not empty %} -
- - -
- {% endif %} - #} + {% include '@ChillActivity/Activity/activity-badge-title.html.twig' %}
- {% if activity.comment.comment is not empty or activity.persons|length > 0 or activity.thirdParties|length > 0 diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig index f62271bb5..567c0b132 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/list_recent.html.twig @@ -4,43 +4,7 @@ -

- - {% if activity.date %} -

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

- {% endif %} -
- {% if activity.durationTime and t.durationTimeVisible %} -

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

- {% endif %} - {% if activity.travelTime and t.travelTimeVisible %} -

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

- {% endif %} -
-
- - {{ activity.type.name | localize_translatable_string }} -
    -
  • - {{ 'location'|trans ~ ': ' }} - {# TODO {% if activity.location %}{{ activity.location }}{% endif %} #} - Domicile de l'usager -
  • - {% if activity.user and t.userVisible %} -
  • - {{ 'Referrer'|trans ~ ': ' }} - {{ activity.user.usernameCanonical }} -
  • - {% endif %} -
-
-

+ {% include '@ChillActivity/Activity/activity-badge-title.html.twig' %} {% endfor %}