mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: rights on the action list in accompanying period main's page
Add is_granted check on the action: - if update action is allowed, open in update mode; - if see action is allowed, open in see mode; - fallback to an inactive link (should not happens)
This commit is contained in:
parent
27f797d736
commit
f19b939bd4
6
.changes/unreleased/Fixed-20230627-110233.yaml
Normal file
6
.changes/unreleased/Fixed-20230627-110233.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Fixed
|
||||
body: On the accompanying course page, open the action on view mode if the user does
|
||||
not have right to update them (i.e. if the accompanying period is closed)
|
||||
time: 2023-06-27T11:02:33.027807027+02:00
|
||||
custom:
|
||||
Issue: "116"
|
@ -1,9 +1,11 @@
|
||||
<div class="accompanying-course-work">
|
||||
<div class="accompanying-course-work">
|
||||
{% for w in works | slice(0,5) %}
|
||||
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
class="dashboard-link" title="{{ 'crud.social_action.title_link'|trans }}">
|
||||
|
||||
<a href="{%- if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) -%}
|
||||
{{- chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) -}}
|
||||
{%- elseif is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', w) -%}
|
||||
{{- chill_path_add_return_path('chill_person_accompanying_period_work_show', { 'id': w.id }) -}}
|
||||
{%- else %}#{% endif -%}" class="dashboard-link" title="{{ 'crud.social_action.title_link'|trans }}">
|
||||
<div class="dashboard">
|
||||
<span class="title_label"></span>
|
||||
<span class="title_action"><span class="like-h3">{{ w.socialAction|chill_entity_render_string }}</span>
|
||||
@ -14,7 +16,7 @@
|
||||
<b>{{ w.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if w.endDate %}
|
||||
<li>
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ w.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
@ -23,20 +25,20 @@
|
||||
|
||||
<ul class="small_in_title">
|
||||
{% if w.handlingThierParty %}
|
||||
<li>
|
||||
<li>
|
||||
<span class="item-key">{{ 'Thirdparty handling'|trans ~ ' : ' }}</span>
|
||||
<span class="badge-thirdparty">{{ w.handlingThierParty|chill_entity_render_box }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if w.referrers %}
|
||||
<li>
|
||||
<li>
|
||||
<span class="item-key">{{ 'Referrers'|trans ~ ' : ' }}</span>
|
||||
{% for u in w.referrers %}
|
||||
<span class="badge-user">{{ u|chill_entity_render_box }}</span>
|
||||
{% endfor %}
|
||||
{% if w.referrers|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% if w.referrers|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="associated-persons">
|
||||
@ -65,8 +67,8 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user