Rights added to links in twig templates

This commit is contained in:
Julie Lenaerts 2022-02-17 15:16:21 +01:00
parent b32ecf98f2
commit 58de9f9bf3
49 changed files with 345 additions and 247 deletions

View File

@ -41,24 +41,28 @@
</a> </a>
</li> </li>
{% endif %} {% endif %}
<li> {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
{{ m.download_button(document.object, document.title) }} <li>
</li> {{ m.download_button(document.object, document.title) }}
<li> </li>
{% if chill_document_is_editable(document.object) %} {% endif %}
{% if not freezed %} {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
{{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }} <li>
{% else %} {% if chill_document_is_editable(document.object) %}
<a class="btn btn-wopilink disabled" href="#" title="{{ 'workflow.freezed document'|trans }}"> {% if not freezed %}
{{ 'Update document'|trans }} {{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }}
</a> {% else %}
<a class="btn btn-wopilink disabled" href="#" title="{{ 'workflow.freezed document'|trans }}">
{{ 'Update document'|trans }}
</a>
{% endif %}
{% endif %} {% endif %}
</li>
{% endif %} {% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %} {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
<li> <li>
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': document.course.id, 'id': document.id}) }}" class="btn btn-show"></a> <a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': document.course.id, 'id': document.id}) }}" class="btn btn-show"></a>
</li> </li>
{% endif %} {% endif %}
</li>
</ul> </ul>
{% endif %} {% endif %}

View File

@ -25,9 +25,11 @@
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="edit"> {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<button class="btn btn-edit">{{ 'Edit'|trans }}</button> <li class="edit">
</li> <button class="btn btn-edit">{{ 'Edit'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -60,7 +60,7 @@
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %} {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
<li> <li>
<a href="{{ path('accompanying_course_document_edit', {'id': document.id, 'course': accompanyingCourse.id}) }}" <a href="{{ path('accompanying_course_document_edit', {'id': document.id, 'course': accompanyingCourse.id}) }}"
class="btn btn-edit" title="{{ 'Edit attributes' | trans }}"></a> class="btn btn-edit" title="{{ 'Edit attributes' | trans }}"></a>
</li> </li>
{% endif %} {% endif %}
{% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %} {% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %}

View File

@ -42,9 +42,11 @@
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="edit"> {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<button class="btn btn-edit">{{ 'Edit'|trans }}</button> <li class="edit">
</li> <button class="btn btn-edit">{{ 'Edit'|trans }}</button>
</li>
{% endif %}
{# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %} {# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %}
<li class="delete"> <li class="delete">
{{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }}

View File

@ -46,9 +46,11 @@
{{ 'Back to the list' | trans }} {{ 'Back to the list' | trans }}
</a> </a>
</li> </li>
<li class="create"> {% if is_granted ('CHILL_PERSON_DOCUMENT_CREATE', person) %}
<button class="btn btn-create">{{ 'Create'|trans }}</button> <li class="create">
</li> <button class="btn btn-create">{{ 'Create'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
{% endblock %} {% endblock %}

View File

@ -44,7 +44,7 @@ class UserAccompanyingPeriodController extends AbstractController
); );
return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [ return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [
'accompanyingds' => $accompanyingPeriods, 'accompanyingPeriods' => $accompanyingPeriods,
'pagination' => $pagination, 'pagination' => $pagination,
]); ]);
} }

View File

@ -46,7 +46,9 @@
{% if type == 'new' %} {% if type == 'new' %}
<button class="btn btn-create" type="submit">{{ 'Post a new comment'|trans }}</button> <button class="btn btn-create" type="submit">{{ 'Post a new comment'|trans }}</button>
{% elseif type == 'edit' %} {% elseif type == 'edit' %}
<button class="btn btn-save" type="submit">{{ 'Save'|trans }}</button> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_COMMENT_EDIT', comment) %}
<button class="btn btn-save" type="submit">{{ 'Save'|trans }}</button>
{% endif %}
{% endif %} {% endif %}
</li> </li>
</ul> </ul>

View File

@ -4,13 +4,13 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="btn btn-sm btn-update change-icon" <a class="btn btn-sm btn-update change-icon"
href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-10' }) }}"> href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-10' }) }}">
<i class="fa fa-fw fa-crosshairs"></i> <i class="fa fa-fw fa-crosshairs"></i>
{{ 'fix it'|trans }} {{ 'fix it'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
</div> </div>
{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }} {{ 'Some people currently do not belong to any household. Add them to a household soon'|trans }}
</div></div> </div></div>
</div> </div>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="btn btn-sm btn-update change-icon" <a class="btn btn-sm btn-update change-icon"
href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-20' }) }}"> href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-20' }) }}">
<i class="fa fa-fw fa-crosshairs"></i> <i class="fa fa-fw fa-crosshairs"></i>
{{ 'fix it'|trans }} {{ 'fix it'|trans }}
</a> </a>
@ -15,10 +15,10 @@
</ul> </ul>
</div> </div>
<p> <p>
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}</p> {{ 'This course is located at a temporary address. You should link this course to a user'|trans }}</p>
{% if not hasPersonLocation %} {% if not hasPersonLocation %}
<p> <p>
{{ 'Associate at least one member with an household, and set an address to this household'|trans }}</p> {{ 'Associate at least one member with a household, and set an address to this household'|trans }}</p>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -21,9 +21,11 @@
{{ 'Return'|trans }} {{ 'Return'|trans }}
</a> </a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', accompanyingCourse) %}
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button> <li>
</li> <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -20,6 +20,7 @@
{{ 'Return'|trans }} {{ 'Return'|trans }}
</a> </a>
</li> </li>
{# TODO: add a right here? Use 'CHILL_ACCOMPANYING_PERIOD_CREATE'? #}
<li> <li>
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button> <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li> </li>

View File

@ -108,18 +108,20 @@
{% if displayAction is defined and displayAction == true %} {% if displayAction is defined and displayAction == true %}
<div class="item-col"> <div class="item-col">
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="btn btn-edit" title="{{ 'Edit'|trans }}" <a class="btn btn-edit" title="{{ 'Edit'|trans }}"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}" href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
></a> ></a>
</li> </li>
<li> <li>
<a class="btn btn-delete" title="{{ 'Delete'|trans }}" <a class="btn btn-delete" title="{{ 'Delete'|trans }}"
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}" href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
></a> ></a>
</li> </li>
</ul> </ul>
{% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

View File

@ -9,10 +9,12 @@
{% if works|length == 0 %} {% if works|length == 0 %}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }} <p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}
<a class="btn btn-sm btn-create" {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE', accompanyingCourse) %}
title="{{ 'accompanying_course_work.create'|trans }}" <a class="btn btn-sm btn-create"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}" title="{{ 'accompanying_course_work.create'|trans }}"
></a> href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
></a>
{% endif %}
</p> </p>
{% else %} {% else %}
@ -26,12 +28,14 @@
{{ chill_pagination(paginator) }} {{ chill_pagination(paginator) }}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li> {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE', accompanyingCourse) %}
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}" <li>
class="btn btn-new"> <a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
{{ 'accompanying_course_work.create'|trans }} class="btn btn-new">
</a> {{ 'accompanying_course_work.create'|trans }}
</li> </a>
</li>
{% endif %}
</ul> </ul>
</div> </div>

View File

@ -5,17 +5,21 @@
{% macro recordAction(period, contextEntity) %} {% macro recordAction(period, contextEntity) %}
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #} {# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
<li> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_DETAILS', period) %}
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
class="btn btn-show" title="{{ 'See accompanying period'|trans }}">{# {{ 'See this period'|trans }} #}</a>
</li>
{% if period.step == 'DRAFT' and contextEntity.type == 'person' %}
{% set person = contextEntity.entity %}
<li> <li>
<a href="{{ path('chill_person_accompanying_course_delete', { 'accompanying_period_id': period.id, 'person_id' : person.id }) }}" <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
class="btn btn-delete" title="{{ 'Delete accompanying period'|trans }}">{# {{ 'Delete this period'|trans }} #}</a> class="btn btn-show" title="{{ 'See accompanying period'|trans }}">{# {{ 'See this period'|trans }} #}</a>
</li> </li>
{% endif %} {% endif %}
{% if period.step == 'DRAFT' and contextEntity.type == 'person' %}
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_DELETE', period) %}
{% set person = contextEntity.entity %}
<li>
<a href="{{ path('chill_person_accompanying_course_delete', { 'accompanying_period_id': period.id, 'person_id' : person.id }) }}"
class="btn btn-delete" title="{{ 'Delete accompanying period'|trans }}">{# {{ 'Delete this period'|trans }} #}</a>
</li>
{% endif %}
{% endif %}
{# DISABLED if new accompanying course, this is not necessary {# DISABLED if new accompanying course, this is not necessary
{% if person is defined %} {% if person is defined %}

View File

@ -50,7 +50,7 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id } ) }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a> <a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id } ) }}" class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
</li> </li>
<li> <li>
<button type="submit" class="btn btn-save"> <button type="submit" class="btn btn-save">

View File

@ -12,18 +12,22 @@
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %} {% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> {% if is_granted('CHILL_PERSON_SEE', person) %}
<a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" <li class="cancel">
class="btn btn-cancel">{{ 'Person details'|trans }} <a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}"
</a> class="btn btn-cancel">{{ 'Person details'|trans }}
</li> </a>
<li> </li>
<a class="btn btn-create" {% endif %}
href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button"> {# TODO: which right to add here? #}
{{ 'Create an accompanying period'|trans }} <li>
</a> <a class="btn btn-create"
</li> href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button">
{{ 'Create an accompanying period'|trans }}
</a>
</li>
{# TODO: should this commented section be deleted? #}
{# Disabled 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"

View File

@ -16,6 +16,7 @@
{{ 'Cancel'|trans }} {{ 'Cancel'|trans }}
</a> </a>
</li> </li>
{# TODO: add a right here? Use 'CHILL_ACCOMPANYING_PERIOD_CREATE'? #}
<li> <li>
<a href="{{ path('chill_person_accompanying_period_re_open', {'confirm' : true, 'person_id' : person.id, 'period_id' : period.id } ) }}" class="btn btn-create"> <a href="{{ path('chill_person_accompanying_period_re_open', {'confirm' : true, 'person_id' : person.id, 'period_id' : period.id } ) }}" class="btn btn-create">
{{'Confirm'|trans }} {{'Confirm'|trans }}

View File

@ -5,10 +5,12 @@
{% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %} {% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %}
{% macro recordAction(period) %} {% macro recordAction(period) %}
<li> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_DETAILS', period) %}
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}" <li>
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a> <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
</li> class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
</li>
{% endif %}
{% endmacro %} {% endmacro %}

View File

@ -5,10 +5,12 @@
{% block title %}{{ 'My accompanying periods'|trans }}{% endblock title %} {% block title %}{{ 'My accompanying periods'|trans }}{% endblock title %}
{% macro recordAction(period) %} {% macro recordAction(period) %}
<li> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}" <li>
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a> <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
</li> class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
</li>
{% endif %}
{% endmacro %} {% endmacro %}

View File

@ -29,13 +29,13 @@
{% if customButtons['before'] is defined %} {% if customButtons['before'] is defined %}
{{ customButtons['before'] }} {{ customButtons['before'] }}
{% endif %} {% endif %}
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', member.household) %}
<li> <li>
<a class="btn btn-sm btn-edit" <a class="btn btn-sm btn-edit"
title="{{ 'household.Edit member household'|trans }}" title="{{ 'household.Edit member household'|trans }}"
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': member.id }) }}"></a> href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': member.id }) }}"></a>
</li> </li>
{% endif %}
{% if customButtons['after'] is defined %} {% if customButtons['after'] is defined %}
{{ customButtons['after'] }} {{ customButtons['after'] }}
{% endif %} {% endif %}

View File

@ -41,11 +41,13 @@
{% endif %} {% endif %}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> {% if is_granted('CHILL_PERSON_HOUSEHOLD_SEE', household) %}
<a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="btn btn-cancel"> <li class="cancel">
{{ 'Household summary'|trans }} <a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="btn btn-cancel">
</a> {{ 'Household summary'|trans }}
</li> </a>
</li>
{% endif %}
{# {#
<li> <li>
<a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="btn btn-create"> <a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="btn btn-create">

View File

@ -63,11 +63,13 @@
'has_no_address': true 'has_no_address': true
}) }} }) }}
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<li> <li>
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" <a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
class="btn btn-edit"></a> class="btn btn-edit"></a>
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>

View File

@ -26,11 +26,13 @@
{{ 'Cancel'|trans }} {{ 'Cancel'|trans }}
</a> </a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<button type="submit" class="btn btn-save"> <li>
{{ 'Save'|trans }} <button type="submit" class="btn btn-save">
</button> {{ 'Save'|trans }}
</li> </button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -64,12 +64,14 @@
{{ 'household_composition.Since'|trans({'startDate': currentComposition.startDate}) }} {{ 'household_composition.Since'|trans({'startDate': currentComposition.startDate}) }}
</p> </p>
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<li> <li>
<a class="btn btn-sm btn-update change-icon" <a class="btn btn-sm btn-update change-icon"
href="{{ path('chill_person_household_composition_index', {'id': household.id}) }}"> href="{{ path('chill_person_household_composition_index', {'id': household.id}) }}">
{{ 'household_composition.Update composition'|trans }} {{ 'household_composition.Update composition'|trans }}
</a> </a>
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>
{% else %} {% else %}
@ -78,12 +80,14 @@
{{ 'household_composition.Currently no composition'|trans }} {{ 'household_composition.Currently no composition'|trans }}
</p> </p>
<ul class="record_actions" style="margin-bottom: 0"> <ul class="record_actions" style="margin-bottom: 0">
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<li> <li>
<a class="btn btn-sm btn-update change-icon" <a class="btn btn-sm btn-update change-icon"
href="{{ path('chill_person_household_composition_index', {'id': household.id}) }}"> href="{{ path('chill_person_household_composition_index', {'id': household.id}) }}">
{{ 'household_composition.Add a composition'|trans }} {{ 'household_composition.Add a composition'|trans }}
</a> </a>
</li> </li>
{% endif %}
</ul> </ul>
</div> </div>
{% endif %} {% endif %}
@ -105,15 +109,19 @@
{% endif %} {% endif %}
{% if not household.commentMembers.isEmpty() %} {% if not household.commentMembers.isEmpty() %}
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}" {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
class="btn btn-edit btn-block"> <a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
{{ 'household.Edit comment and expecting birth'|trans }} class="btn btn-edit btn-block">
</a> {{ 'household.Edit comment and expecting birth'|trans }}
</a>
{% endif %}
{% else %} {% else %}
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}" {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
class="btn btn-create btn-block"> <a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
{{ 'household.New comment and expecting birth'|trans }} class="btn btn-create btn-block">
</a> {{ 'household.New comment and expecting birth'|trans }}
</a>
{% endif %}
{% endif %} {% endif %}
{% else %} {% else %}
@ -129,11 +137,13 @@
{{ form_widget(form.commentMembers) }} {{ form_widget(form.commentMembers) }}
</div> </div>
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<button type="submit" class="btn btn-save" id="form_household_comment_confirm"> <li>
{{ 'Save'|trans }} <button type="submit" class="btn btn-save" id="form_household_comment_confirm">
</button> {{ 'Save'|trans }}
</li> </button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
{% endif %} {% endif %}
@ -245,12 +255,14 @@
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}" <li>
class="btn btn-create"> <a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
{{ 'household.Add a member'|trans }} class="btn btn-create">
</a> {{ 'household.Add a member'|trans }}
</li> </a>
</li>
{% endif %}
</ul> </ul>
</div> </div>

View File

@ -63,9 +63,11 @@
<li class="cancel" style="margin-right: auto;"> <li class="cancel" style="margin-right: auto;">
<a class="btn btn-cancel" href="{{ path('chill_person_household_composition_index', {'id': c.household.id}) }}">{{ 'Cancel'|trans }}</a> <a class="btn btn-cancel" href="{{ path('chill_person_household_composition_index', {'id': c.household.id}) }}">{{ 'Cancel'|trans }}</a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', c.household) %}
<button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button> <li>
</li> <button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
{% endif %} {% endif %}
@ -79,20 +81,24 @@
{{ form_widget(form) }} {{ form_widget(form) }}
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button> <li>
</li> <button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
{% if editId == -1 %} {% if editId == -1 %}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<li> <li>
<button class="btn btn-primary btn-create change-icon" type="button" data-bs-toggle="collapse" data-bs-target="#collapseForm" aria-expanded="false" aria-controls="collapseForm"> <button class="btn btn-primary btn-create change-icon" type="button" data-bs-toggle="collapse" data-bs-target="#collapseForm" aria-expanded="false" aria-controls="collapseForm">
{{ 'Create'|trans }} {{ 'Create'|trans }}
</button> </button>
</li> </li>
{% endif %}
</ul> </ul>
{% endif %} {% endif %}
</div> </div>

View File

@ -107,21 +107,24 @@
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="dropdown"> <li class="dropdown">
<a class="btn btn-create dropdown-toggle" {% if is_granted('CHILL_PERSON_CREATE') %}
href="#" role="button" id="newPersonMore" data-bs-toggle="dropdown" aria-expanded="false"> <a class="btn btn-create dropdown-toggle"
{{ 'Add the person'|trans }} href="#" role="button" id="newPersonMore" data-bs-toggle="dropdown" aria-expanded="false">
</a> {{ 'Add the person'|trans }}
<ul class="dropdown-menu" aria-labelledby="newPersonMore"> </a>
<li> {% endif %}
{{ form_widget(form.editPerson, { 'attr': { 'class': 'dropdown-item' }}) }} <ul class="dropdown-menu" aria-labelledby="newPersonMore">
</li> <li>
<li> {{ form_widget(form.editPerson, { 'attr': { 'class': 'dropdown-item' }}) }}
{{ form_widget(form.createHousehold, { 'attr': { 'class': 'dropdown-item' }}) }} </li>
</li> <li>
<li> {{ form_widget(form.createHousehold, { 'attr': { 'class': 'dropdown-item' }}) }}
{{ form_widget(form.createPeriod, { 'attr': { 'class': 'dropdown-item' }}) }} </li>
</li> <li>
</ul> {{ form_widget(form.createPeriod, { 'attr': { 'class': 'dropdown-item' }}) }}
</li>
</ul>
{# {% endif %} #}
</li> </li>
</ul> </ul>

View File

@ -136,11 +136,13 @@
{{ 'Return'|trans }} {{ 'Return'|trans }}
</a> </a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<button class="btn btn-save" type="submit"> <li>
{{ 'Save'|trans }} <button class="btn btn-save" type="submit">
</button> {{ 'Save'|trans }}
</li> </button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -113,14 +113,18 @@
<div class="item-row separator"> <div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_PERSON_HOUSEHOLD_SEE', p.household) %}
<li> <li>
<a href="{{ chill_path_add_return_path('chill_person_household_summary',{ 'household_id': p.household.id }) }}" <a href="{{ chill_path_add_return_path('chill_person_household_summary',{ 'household_id': p.household.id }) }}"
class="btn btn-show" title="{{ 'Show'|trans }}"></a> class="btn btn-show" title="{{ 'Show'|trans }}"></a>
</li> </li>
{% endif %}
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', p.household) %}
<li> <li>
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}" <a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
class="btn btn-edit" title="{{ 'Edit'|trans }}"></a> class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
</li> </li>
{% endif %}
{% if p.isCurrent() %} {% if p.isCurrent() %}
<li> <li>
<a class="btn btn-misc" href="{{ chill_path_add_return_path( 'chill_person_household_members_editor', { 'persons': [ person.id ], 'allow_leave_without_household': true }) }}"> <a class="btn btn-misc" href="{{ chill_path_add_return_path( 'chill_person_household_members_editor', { 'persons': [ person.id ], 'allow_leave_without_household': true }) }}">
@ -164,10 +168,12 @@
<div class="item-row separator"> <div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', p.household) %}
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}" <li>
class="btn btn-edit" title="{{ 'Edit'|trans }}"></a> <a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
</li> class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
</li>
{% endif %}
</ul> </ul>
</div> </div>

View File

@ -69,7 +69,9 @@
</td> </td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li> {% if is_granted('CHILL_PERSON_SEE', person) %}
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
{% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %} {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li> <li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
{% endif %} {% endif %}

View File

@ -74,9 +74,11 @@
</td> </td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li> {% if is_granted('CHILL_PERSON_SEE', person) %}
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
{% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %} {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li> <li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
{% endif %} {% endif %}
</ul> </ul>
</td> </td>

View File

@ -214,12 +214,14 @@
{% endif %} {% endif %}
<ul class="record_actions record_actions_column"> <ul class="record_actions record_actions_column">
<li> {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', acp) %}
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}" <li>
class="btn btn-sm btn-outline-primary" title="{{ 'See accompanying period'|trans }}"> <a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
<i class="fa fa-random fa-fw"></i> class="btn btn-sm btn-outline-primary" title="{{ 'See accompanying period'|trans }}">
</a> <i class="fa fa-random fa-fw"></i>
</li> </a>
</li>
{% endif %}
</ul> </ul>
</div> </div>

View File

@ -9,23 +9,25 @@
{% block personcontent %} {% block personcontent %}
<div class="person-duplicate"> <div class="person-duplicate">
<h1>{{ 'Désigner un dossier doublon'|trans }}</h1> <h1>{{ 'Désigner un dossier doublon'|trans }}</h1>
{{ form_start(form) }} {{ form_start(form) }}
{{ form_rest(form) }} {{ form_rest(form) }}
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel"> <li class="cancel">
<a href="{{ path('chill_person_duplicate_view', {'person_id' : person.id}) }}" class="btn btn-cancel"> <a href="{{ path('chill_person_duplicate_view', {'person_id' : person.id}) }}" class="btn btn-cancel">
{{ 'Return'|trans }} {{ 'Return'|trans }}
</a> </a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_CREATE') %}
<button class="btn btn-save" type="submit">{{ 'Next'|trans }}</button> <li>
</li> <button class="btn btn-save" type="submit">{{ 'Next'|trans }}</button>
</ul> </li>
{% endif %}
</ul>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -56,9 +56,11 @@
</td> </td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_SEE', duplicatePerson) %}
<a class="btn btn-show" target="_blank" href="{{ path('chill_person_view', { person_id : duplicatePerson.id }) }}"></a> <li>
</li> <a class="btn btn-show" target="_blank" href="{{ path('chill_person_view', { person_id : duplicatePerson.id }) }}"></a>
</li>
{% endif %}
<li> <li>
<a class="btn btn-action" href="{{ path('chill_person_duplicate_confirm', { person1_id : person.id, person2_id : duplicatePerson.id }) }}"> <a class="btn btn-action" href="{{ path('chill_person_duplicate_confirm', { person1_id : person.id, person2_id : duplicatePerson.id }) }}">
<i class="fa fa-cog fa-fw"></i>{{ 'Merge'|trans }}</a> <i class="fa fa-cog fa-fw"></i>{{ 'Merge'|trans }}</a>
@ -124,15 +126,17 @@
</td> </td>
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_PERSON_SEE', notDuplicatePerson) %}
<li> <li>
<a class="btn btn-show" target="_blank" href="{{ path('chill_person_view', { person_id : notDuplicatePerson.id }) }}"></a> <a class="btn btn-show" target="_blank" href="{{ path('chill_person_view', { person_id : notDuplicatePerson.id }) }}"></a>
</li> </li>
{% endif %}
<li> <li>
<a class="btn btn-misc" title="{{ 'Switch to duplicate'|trans }}" <a class="btn btn-misc" title="{{ 'Switch to duplicate'|trans }}"
href="{{ path('chill_person_remove_duplicate_not_duplicate', {person1_id : person.id, person2_id : notDuplicatePerson.id}) }}"> href="{{ path('chill_person_remove_duplicate_not_duplicate', {person1_id : person.id, person2_id : notDuplicatePerson.id}) }}">
<i class="fa fa-toggle-off fa-fw"></i> <i class="fa fa-toggle-off fa-fw"></i>
{{ 'not-duplicate'|trans }} {{ 'not-duplicate'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
</td> </td>

View File

@ -65,12 +65,14 @@
</ul> </ul>
{% else %} {% else %}
<ul class="record_actions"> <ul class="record_actions">
<li> {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<button class="btn btn-create" <li>
type="submit" id="newPersonResource"> <button class="btn btn-create"
{{ 'Save'|trans }} type="submit" id="newPersonResource">
</button> {{ 'Save'|trans }}
</li> </button>
</li>
{% endif %}
</ul> </ul>
{% endif %} {% endif %}

View File

@ -38,9 +38,11 @@
{{ 'Cancel'|trans|chill_return_path_label }} {{ 'Cancel'|trans|chill_return_path_label }}
</a> </a>
</li> </li>
<li> {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button> <li>
</li> <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}

View File

@ -104,12 +104,12 @@
</a> </a>
</li> </li>
{% if is_granted('CHILL_PERSON_UPDATE', person) %} {% if is_granted('CHILL_PERSON_UPDATE', person) %}
<li> <li>
<a class="btn btn-create" <a class="btn btn-create"
href="{{ path('chill_person_residential_address_new', { 'id' : person.id } ) }}"> href="{{ path('chill_person_residential_address_new', { 'id' : person.id } ) }}">
{{ 'Add a residential address'|trans }} {{ 'Add a residential address'|trans }}
</a> </a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>

View File

@ -8,16 +8,16 @@
<div class="container" style="margin-top: 2rem;"> <div class="container" style="margin-top: 2rem;">
<div class="row"> <div class="row">
<div class="col-md-4 mb-4"> <div class="col-md-4 mb-4">
<a <a
href="{{ chill_path_forward_return_path('chill_person_residential_address_new', {'id': person.id, 'kind': 'person'}) }}" href="{{ chill_path_forward_return_path('chill_person_residential_address_new', {'id': person.id, 'kind': 'person'}) }}"
class="btn btn-outline-chill-green-dark"> class="btn btn-outline-chill-green-dark">
{{ 'The address of another person'|trans }} {{ 'The address of another person'|trans }}
</a> </a>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<p>{{ 'residential_address_person_explanation'|trans }}</p> <p>{{ 'residential_address_person_explanation'|trans }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4 mb-4"> <div class="col-md-4 mb-4">

View File

@ -14,11 +14,13 @@
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.title|localize_translatable_string }}</td> <td>{{ entity.title|localize_translatable_string }}</td>
<td> <td>
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_crud_social_evaluation_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <a href="{{ chill_path_add_return_path('chill_crud_social_evaluation_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li> </li>
</ul> </ul>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -14,11 +14,13 @@
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.title|localize_translatable_string }}</td> <td>{{ entity.title|localize_translatable_string }}</td>
<td> <td>
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_crud_social_goal_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <a href="{{ chill_path_add_return_path('chill_crud_social_goal_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li> </li>
</ul> </ul>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -14,11 +14,13 @@
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.title|localize_translatable_string }}</td> <td>{{ entity.title|localize_translatable_string }}</td>
<td> <td>
<ul class="record_actions"> {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
<li> <ul class="record_actions">
<a href="{{ chill_path_add_return_path('chill_crud_social_result_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <li>
</li> <a href="{{ chill_path_add_return_path('chill_crud_social_result_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</ul> </li>
</ul>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -14,11 +14,13 @@
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.title|localize_translatable_string }}</td> <td>{{ entity.title|localize_translatable_string }}</td>
<td> <td>
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_crud_social_action_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <a href="{{ chill_path_add_return_path('chill_crud_social_action_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li> </li>
</ul> </ul>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -14,11 +14,13 @@
<td>{{ entity.id }}</td> <td>{{ entity.id }}</td>
<td>{{ entity.title|localize_translatable_string }}</td> <td>{{ entity.title|localize_translatable_string }}</td>
<td> <td>
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_crud_social_issue_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <a href="{{ chill_path_add_return_path('chill_crud_social_issue_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a>
</li> </li>
</ul> </ul>
{% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@ -14,11 +14,11 @@
<dl class="chill_view_data"> <dl class="chill_view_data">
<dd>{{ 'Participants'|trans }}&nbsp;:</dd> <dd>{{ 'Participants'|trans }}&nbsp;:</dd>
<dt> <dt>
<ul> <ul>
{% for p in period.participations %} {% for p in period.participations %}
<li>{{ p.person|chill_entity_render_box({ 'addLink': true }) }}: {{ 'since %date%'|trans({'%date%': p.startDate|format_date("long") } ) }}, {{ 'until %date%'|trans({'%date%': (p.endDate is not null ? p.endDate : period.closingDate)|format_date("long") }) }}</li> <li>{{ p.person|chill_entity_render_box({ 'addLink': true }) }}: {{ 'since %date%'|trans({'%date%': p.startDate|format_date("long") } ) }}, {{ 'until %date%'|trans({'%date%': (p.endDate is not null ? p.endDate : period.closingDate)|format_date("long") }) }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</dt> </dt>
</div> </div>
</div> </div>

View File

@ -28,12 +28,10 @@ This view should receive those arguments:
{% block personcontent %} {% block personcontent %}
<div class="timeline"> <div class="timeline">
{{ timeline|raw }}
{{ timeline|raw }} {% if nb_items > paginator.getItemsPerPage %}
{{ chill_pagination(paginator) }}
{% if nb_items > paginator.getItemsPerPage %} {% endif %}
{{ chill_pagination(paginator) }}
{% endif %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -14,11 +14,11 @@
<dl class="chill_view_data"> <dl class="chill_view_data">
<dd>{{ 'Participants'|trans }}&nbsp;:</dd> <dd>{{ 'Participants'|trans }}&nbsp;:</dd>
<dt> <dt>
<ul> <ul>
{% for p in period.participations %} {% for p in period.participations %}
<li>{{ 'Since %date%'|trans( {'%date%': p.startDate|format_date("long") } ) }}&nbsp;: {{ p.person|chill_entity_render_box({ 'addLink': true }) }}</li> <li>{{ 'Since %date%'|trans( {'%date%': p.startDate|format_date("long") } ) }}&nbsp;: {{ p.person|chill_entity_render_box({ 'addLink': true }) }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</dt> </dt>
</div> </div>
</div> </div>

View File

@ -6,12 +6,14 @@
</div> </div>
{% if display_action is defined and display_action == true %} {% if display_action is defined and display_action == true %}
<ul class="record_actions"> {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %}
<li> <ul class="record_actions">
<a class="btn btn-update" <li>
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': work.id }) }}"> <a class="btn btn-update"
{{ 'Edit'|trans }} href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': work.id }) }}">
</a> {{ 'Edit'|trans }}
</li> </a>
</ul> </li>
</ul>
{% endif %}
{% endif %} {% endif %}

View File

@ -88,12 +88,13 @@
</div> </div>
{% if display_action is defined and display_action == true %} {% if display_action is defined and display_action == true %}
{# TODO add acl #} {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', evaluation.accompanyingPeriodWork) %}
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="btn btn-show" href="{{ path('chill_person_accompanying_period_work_edit', {'id': evaluation.accompanyingPeriodWork.id}) }}"> <a class="btn btn-show" href="{{ path('chill_person_accompanying_period_work_edit', {'id': evaluation.accompanyingPeriodWork.id}) }}">
{{ 'Show'|trans }} {{ 'Show'|trans }}
</a> </a>
</li> </li>
</ul> </ul>
{% endif %}
{% endif %} {% endif %}

View File

@ -213,7 +213,7 @@ No requestor: Pas de demandeur
No resources: "Pas d'interlocuteurs privilégiés" No resources: "Pas d'interlocuteurs privilégiés"
Persons associated: Usagers concernés Persons associated: Usagers concernés
Referrer: Référent Referrer: Référent
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur ménage dès que possible. Some people currently do not belong to any household. Add them to a household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur ménage dès que possible.
Add to household now: Ajouter à un ménage Add to household now: Ajouter à un ménage
Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours
course.draft: Brouillon course.draft: Brouillon
@ -451,12 +451,12 @@ Edit Accompanying Course: Modifier le parcours
Close Accompanying Course: Clôturer le parcours Close Accompanying Course: Clôturer le parcours
Create Accompanying Course: Créer un nouveau parcours Create Accompanying Course: Créer un nouveau parcours
Drop Accompanying Course: Supprimer le parcours Drop Accompanying Course: Supprimer le parcours
This course is located at a temporarily address. You should locate this course to an user: Le parcours est localisé à une adresse temporaire. Il devrait être localisé auprès d'une personne concernée. This course is located at a temporary address. You should link this course to a user: Le parcours est localisé à une adresse temporaire. Il devrait être localisé auprès d'une personne concernée.
Accompanying course location: Localisation du parcours Accompanying course location: Localisation du parcours
This course is located by: Localisé auprès de This course is located by: Localisé auprès de
This course has a temporarily location: Localisation temporaire This course has a temporarily location: Localisation temporaire
Choose a person to locate by: Localiser auprès d'un usager concerné Choose a person to locate by: Localiser auprès d'un usager concerné
Associate at least one member with an household, and set an address to this household: Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage. Associate at least one member with a household, and set an address to this household: Associez au moins un membre du parcours à un ménage, et indiquez une adresse à ce ménage.
Locate by: Localiser auprès de Locate by: Localiser auprès de
fix it: Compléter fix it: Compléter
accompanying_course: accompanying_course:

View File

@ -19,9 +19,11 @@
<a class="btn btn-cancel" href={% if task.person is not null %}"{{ chill_return_path_or('chill_task_singletask_list', { 'person_id': task.person.id } ) }}"{% else %}"{{ chill_return_path_or('chill_task_singletask_courselist', {'course_id': task.course.id}) }}" {% endif %}> <a class="btn btn-cancel" href={% if task.person is not null %}"{{ chill_return_path_or('chill_task_singletask_list', { 'person_id': task.person.id } ) }}"{% else %}"{{ chill_return_path_or('chill_task_singletask_courselist', {'course_id': task.course.id}) }}" {% endif %}>
{{ 'Cancel'|trans }}</a> {{ 'Cancel'|trans }}</a>
</li> </li>
<li> {% if is_granted('CHILL_TASK_TASK_UPDATE', task) %}
{{ form_widget(form.submit, { 'label': 'Save task', 'attr': {'class' : 'btn btn-update'}})}} <li>
</li> {{ form_widget(form.submit, { 'label': 'Save task', 'attr': {'class' : 'btn btn-update'}})}}
</li>
{% endif %}
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
</div> </div>