accompanying period work: can delete the work

This commit is contained in:
nobohan
2021-11-08 14:47:50 +01:00
parent 6afd8ae3cd
commit d94c367e3d
4 changed files with 42 additions and 48 deletions

View File

@@ -1,16 +1,16 @@
{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %}
{% set activeRouteKey = 'chill_activity_activity_list' %}
{% set activeRouteKey = 'chill_person_accompanying_period_work_list' %}
{% block title 'Remove activity'|trans %}
{% block title 'accompanying_course_work.remove'|trans %}
{% block content %}
{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove activity'|trans,
'confirm_question' : 'Are you sure you want to remove the activity about "%name%" ?'|trans({ '%name%' : work.id } ),
'cancel_route' : 'chill_activity_activity_list',
'cancel_parameters' : { 'accompanying_period_id' : work.id},
'title' : 'accompanying_course_work.remove'|trans,
'confirm_question' : 'Are you sure you want to remove the work of the accompanying period %name% ?'|trans({ '%name%' : accompanyingCourse.id } ),
'cancel_route' : 'chill_person_accompanying_period_work_list',
'cancel_parameters' : {'id' : accompanyingCourse.id},
'form' : delete_form
} ) }}
{% endblock %}

View File

@@ -103,6 +103,11 @@
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
>{% if buttonText is not defined or buttonText == true %}{{ 'Edit'|trans }}{% endif %}</a>
</li>
<li>
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
>{% if buttonText is not defined or buttonText == true %}{{ 'Delete'|trans }}{% endif %}</a>
</li>
</ul>
</div>