activity list: an option disable edit and delete button (for resume page)

This commit is contained in:
Mathieu Jaumotte 2021-08-22 15:17:17 +02:00
parent 73a1d42ee7
commit d1344d6d54
3 changed files with 22 additions and 21 deletions

View File

@ -113,24 +113,26 @@
<a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" <a href="{{ path('chill_activity_activity_show', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
class="btn btn-sm btn-show "></a> class="btn btn-sm btn-show "></a>
</li> </li>
{# TOOD {% if no_action is not defined or no_action == false %}
{% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %} {# TODO
#} {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
<li> #}
<a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}" <li>
class="btn btn-sm btn-update "></a> <a href="{{ path('chill_activity_activity_edit', { 'id': activity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}"
</li> class="btn btn-sm btn-update "></a>
{# TOOD </li>
{% endif %} {# TODO
{% if is_granted('CHILL_ACTIVITY_DELETE', activity) %} {% endif %}
#} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
<li> #}
<a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}" <li>
class="btn btn-sm btn-delete "></a> <a href="{{ path('chill_activity_activity_delete', { 'id': activity.id, 'person_id' : person_id, 'accompanying_period_id': accompanying_course_id } ) }}"
</li> class="btn btn-sm btn-delete "></a>
{# </li>
{# TODO
{% endif %}
#}
{% endif %} {% endif %}
#}
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -169,7 +169,7 @@
<h2>{{ 'Activity list' |trans }}</h2> <h2>{{ 'Activity list' |trans }}</h2>
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %} {% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -18,13 +18,13 @@
</a> </a>
</li> </li>
<li> <li>
<a class="btn btn-create change-icon" <a class="btn btn-create"
href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button"> href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button">
{{ 'Create an accompanying period'|trans }} {{ 'Create an accompanying period'|trans }}
</a> </a>
</li> </li>
{# disable dropdown {# Disabled dropdown
<li class="dropdown"> <li class="dropdown">
<a class="btn btn-create change-icon dropdown-toggle" <a class="btn btn-create change-icon dropdown-toggle"
href="#" role="button" id="newAccompanyingPeriod" data-bs-toggle="dropdown" aria-expanded="false"> href="#" role="button" id="newAccompanyingPeriod" data-bs-toggle="dropdown" aria-expanded="false">
@ -51,7 +51,6 @@
</ul> </ul>
</li> </li>
#} #}
</ul> </ul>
</div> </div>