add links between document in workflow and course

This commit is contained in:
Julien Fastré 2022-02-03 13:49:52 +01:00
parent 3f83c323be
commit 2343a4a334

View File

@ -31,6 +31,13 @@
{% if display_action is defined and display_action == true %} {% if display_action is defined and display_action == true %}
<ul class="record_actions"> <ul class="record_actions">
{% if document.course != null and is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', document.course) %}
<li>
<a href="{{ path('chill_person_accompanying_course_index', {'accompanying_period_id': document.course.id}) }}" class="btn btn-show change-icon">
<i class="fa fa-random"></i> {{ 'Course number'|trans }} {{ document.course.id }}
</a>
</li>
{% endif %}
<li> <li>
{{ m.download_button(document.object, document.title) }} {{ m.download_button(document.object, document.title) }}
</li> </li>
@ -56,6 +63,11 @@
<i class="fa fa-lock me-2"></i>{{ 'Update document'|trans }} <i class="fa fa-lock me-2"></i>{{ 'Update document'|trans }}
</a> </a>
{% endif %} {% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
<li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': document.course.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li>
{% endif %}
</li> </li>
</ul> </ul>
{% endif %} {% endif %}