improve activity

This commit is contained in:
2021-06-29 20:51:08 +02:00
parent 7dc70baf57
commit d9c1f52894
7 changed files with 60 additions and 29 deletions

View File

@@ -99,7 +99,7 @@
</a>
</li>
<li>
<button class="sc-button bt-update" type="submit">{{ 'Save activity'|trans }}</button>
<button class="sc-button bt-update" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(edit_form) }}

View File

@@ -17,7 +17,7 @@
</p>
{% else %}
<div class="flex-table list-records {{ context }}">
<div class="flex-table list-records context-{{ context }}">
<!--
<thead>
<tr>
@@ -54,6 +54,20 @@
</p>
{% endif %}
</div>
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
<div class="accompanyingPeriodLink" style="margin-top: 1rem">
<a
href="{{ chill_path_add_return_path(
"chill_person_accompanying_course_index",
{ 'accompanying_period_id': activity.accompanyingPeriod.id }
) }}"
>
<i class="fa fa-random"></i>
{{ activity.accompanyingPeriod.id }}
</a>
</div>
{% endif %}
</div>
<div class="item-col">
@@ -147,13 +161,14 @@
</div>
{%
if activity.comment.comment is not empty
if activity.comment.comment is not empty
or activity.persons|length > 0
or activity.thirdParties|length > 0
or activity.users|length > 0
%}
<div class="item-row details">
<div class="item-col">
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'row', 'entity': activity } %}
</div>
@@ -170,10 +185,13 @@
</div>
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="sc-button bt-create">
{{ 'Add a new activity' | trans }}
</a>
</li>
</ul>
{% if context != 'person' %}
{# TODO set this condition in configuration #}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person_id, 'accompanying_period_id': accompanying_course_id}) }}" class="sc-button bt-create">
{{ 'Add a new activity' | trans }}
</a>
</li>
</ul>
{% endif %}

View File

@@ -98,7 +98,7 @@
</li>
<li>
<button class="sc-button bt-create" type="submit">
{{ 'Add a new activity'|trans }}
{{ 'Create'|trans }}
</button>
</li>
</ul>

View File

@@ -117,7 +117,7 @@
</li>
<li>
<a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
{{ 'Edit the activity'|trans }}
{{ 'Edit'|trans }}
</a>
</li>
{# TODO