From 58de9f9bf336827989e1769239fda36e555b11e5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 17 Feb 2022 15:16:21 +0100 Subject: [PATCH] Rights added to links in twig templates --- .../_workflow.html.twig | 28 ++++++----- .../AccompanyingCourseDocument/edit.html.twig | 8 +-- .../AccompanyingCourseDocument/show.html.twig | 2 +- .../views/PersonDocument/edit.html.twig | 8 +-- .../views/PersonDocument/new.html.twig | 8 +-- .../UserAccompanyingPeriodController.php | 2 +- .../Comment/index.html.twig | 4 +- .../_join_household.html.twig | 4 +- .../_warning_address.html.twig | 6 +-- .../views/AccompanyingCourse/close.html.twig | 8 +-- .../AccompanyingCourse/re_open.html.twig | 1 + .../AccompanyingCourseWork/_item.html.twig | 18 ++++--- .../AccompanyingCourseWork/index.html.twig | 24 +++++---- .../views/AccompanyingPeriod/_list.html.twig | 20 +++++--- .../views/AccompanyingPeriod/form.html.twig | 2 +- .../views/AccompanyingPeriod/list.html.twig | 26 ++++++---- .../AccompanyingPeriod/re_open.html.twig | 1 + .../user_draft_periods_list.html.twig | 10 ++-- .../user_periods_list.html.twig | 10 ++-- .../views/Household/_render_member.html.twig | 14 +++--- .../Household/accompanying_period.html.twig | 12 +++-- .../views/Household/addresses.html.twig | 2 + .../Household/edit_member_metadata.html.twig | 12 +++-- .../views/Household/summary.html.twig | 50 ++++++++++++------- .../HouseholdComposition/index.html.twig | 18 ++++--- .../Resources/views/Person/create.html.twig | 33 ++++++------ .../Resources/views/Person/edit.html.twig | 12 +++-- .../views/Person/household_history.html.twig | 16 ++++-- .../Resources/views/Person/list.html.twig | 4 +- .../Person/list_by_phonenumber.html.twig | 6 ++- .../views/Person/list_with_period.html.twig | 14 +++--- .../PersonDuplicate/find_manually.html.twig | 34 +++++++------ .../views/PersonDuplicate/view.html.twig | 18 ++++--- .../views/PersonResource/form.html.twig | 14 +++--- .../views/ResidentialAddress/edit.html.twig | 8 +-- .../views/ResidentialAddress/list.html.twig | 12 ++--- .../new_pick_kind.html.twig | 20 ++++---- .../SocialWork/Evaluation/index.html.twig | 2 + .../views/SocialWork/Goal/index.html.twig | 2 + .../views/SocialWork/Result/index.html.twig | 12 +++-- .../SocialWork/SocialAction/index.html.twig | 2 + .../SocialWork/SocialIssue/index.html.twig | 2 + .../views/Timeline/closing_period.html.twig | 10 ++-- .../Resources/views/Timeline/index.html.twig | 14 +++--- .../views/Timeline/opening_period.html.twig | 10 ++-- .../_accompanying_period_work.html.twig | 18 ++++--- .../views/Workflow/_evaluation.html.twig | 17 ++++--- .../translations/messages.fr.yml | 6 +-- .../views/SingleTask/_edit.html.twig | 8 +-- 49 files changed, 345 insertions(+), 247 deletions(-) diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig index e9147ed4a..e9f9400ea 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig @@ -41,24 +41,28 @@ {% endif %} -
  • - {{ m.download_button(document.object, document.title) }} -
  • -
  • - {% if chill_document_is_editable(document.object) %} - {% if not freezed %} - {{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }} - {% else %} - - {{ 'Update document'|trans }} - + {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %} +
  • + {{ m.download_button(document.object, document.title) }} +
  • + {% endif %} + {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %} +
  • + {% if chill_document_is_editable(document.object) %} + {% if not freezed %} + {{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }} + {% else %} + + {{ 'Update document'|trans }} + + {% endif %} {% endif %} +
  • {% endif %} {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
  • {% endif %} - {% endif %} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig index d7a5325cf..c5669e342 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig @@ -25,9 +25,11 @@ {{ 'Back to the list' | trans }} -
  • - -
  • + {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig index 1e4fdb8e6..5a60b9867 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig @@ -60,7 +60,7 @@ {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
  • + class="btn btn-edit" title="{{ 'Edit attributes' | trans }}">
  • {% endif %} {% set workflows_frame = chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) %} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig index 7533f1120..4c81240bb 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig @@ -42,9 +42,11 @@ {{ 'Back to the list' | trans }} -
  • - -
  • + {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %} +
  • + +
  • + {% endif %} {# {% if is_granted('CHILL_PERSON_DOCUMENT_DELETE', document) %}
  • {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/new.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/new.html.twig index ad4fcfc81..039d1b622 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/new.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/new.html.twig @@ -46,9 +46,11 @@ {{ 'Back to the list' | trans }}
  • -
  • - -
  • + {% if is_granted ('CHILL_PERSON_DOCUMENT_CREATE', person) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php index 51c8a32c0..4bbf72b7d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -44,7 +44,7 @@ class UserAccompanyingPeriodController extends AbstractController ); return $this->render('@ChillPerson/AccompanyingPeriod/user_periods_list.html.twig', [ - 'accompanyingds' => $accompanyingPeriods, + 'accompanyingPeriods' => $accompanyingPeriods, 'pagination' => $pagination, ]); } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig index a8a5d78b8..438934ba6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig @@ -46,7 +46,9 @@ {% if type == 'new' %} {% elseif type == 'edit' %} - + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_COMMENT_EDIT', comment) %} + + {% endif %} {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_join_household.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_join_household.html.twig index fda36da85..1feadc068 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_join_household.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_join_household.html.twig @@ -4,13 +4,13 @@ - {{ '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 }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_warning_address.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_warning_address.html.twig index 1f9c09845..33e979db9 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_warning_address.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_warning_address.html.twig @@ -7,7 +7,7 @@

    - {{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}

    + {{ 'This course is located at a temporary address. You should link this course to a user'|trans }}

    {% if not hasPersonLocation %}

    - {{ 'Associate at least one member with an household, and set an address to this household'|trans }}

    + {{ 'Associate at least one member with a household, and set an address to this household'|trans }}

    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/close.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/close.html.twig index 64c2dd86b..dbc5587e0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/close.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/close.html.twig @@ -21,9 +21,11 @@ {{ 'Return'|trans }} -
  • - -
  • + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', accompanyingCourse) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/re_open.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/re_open.html.twig index 4cf6bfb24..feb92afa2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/re_open.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/re_open.html.twig @@ -20,6 +20,7 @@ {{ 'Return'|trans }} + {# TODO: add a right here? Use 'CHILL_ACCOMPANYING_PERIOD_CREATE'? #}
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig index b153329b7..1029c9b39 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig @@ -101,25 +101,27 @@ {% if notif_counter.total > 0 %} {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }} {% endif %} - + {% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %} {{ macro.updatedBy(w) }} - + {% if displayAction is defined and displayAction == true %}
    + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %} + {% endif %}
    {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig index d8125ef3e..d9d93716c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig @@ -9,10 +9,12 @@ {% if works|length == 0 %}

    {{ 'accompanying_course_work.Any work'|trans }} - + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_CREATE', accompanyingCourse) %} + + {% endif %}

    {% else %} @@ -26,12 +28,14 @@ {{ chill_pagination(paginator) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index 307c462e2..3e8da5671 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -5,17 +5,21 @@ {% macro recordAction(period, contextEntity) %} {# TODO if enable_accompanying_course_with_multiple_persons is true ... #} -
  • - {# {{ 'See this period'|trans }} #} -
  • - {% if period.step == 'DRAFT' and contextEntity.type == 'person' %} - {% set person = contextEntity.entity %} + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_DETAILS', period) %}
  • - {# {{ 'Delete this period'|trans }} #} + {# {{ 'See this period'|trans }} #}
  • {% endif %} + {% if period.step == 'DRAFT' and contextEntity.type == 'person' %} + {% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_DELETE', period) %} + {% set person = contextEntity.entity %} +
  • + {# {{ 'Delete this period'|trans }} #} +
  • + {% endif %} + {% endif %} {# DISABLED if new accompanying course, this is not necessary {% if person is defined %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/form.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/form.html.twig index 1fb97c0b6..9f725499b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/form.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/form.html.twig @@ -50,7 +50,7 @@ {{ form_end(form) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig index a00c8df36..106168775 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig @@ -64,12 +64,14 @@ {{ 'household_composition.Since'|trans({'startDate': currentComposition.startDate}) }}

    {% else %} @@ -78,12 +80,14 @@ {{ 'household_composition.Currently no composition'|trans }}

    {% endif %} @@ -105,15 +109,19 @@ {% endif %} {% if not household.commentMembers.isEmpty() %} - - {{ 'household.Edit comment and expecting birth'|trans }} - + {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %} + + {{ 'household.Edit comment and expecting birth'|trans }} + + {% endif %} {% else %} - - {{ 'household.New comment and expecting birth'|trans }} - + {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %} + + {{ 'household.New comment and expecting birth'|trans }} + + {% endif %} {% endif %} {% else %} @@ -129,11 +137,13 @@ {{ form_widget(form.commentMembers) }} {{ form_end(form) }} {% endif %} @@ -245,12 +255,14 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig index 7ff72b2cd..a1bdaa74f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/HouseholdComposition/index.html.twig @@ -63,9 +63,11 @@
  • {{ 'Cancel'|trans }}
  • -
  • - -
  • + {% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', c.household) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} {% endif %} @@ -79,20 +81,24 @@ {{ form_widget(form) }} {{ form_end(form) }} {% if editId == -1 %} {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index 3a9083310..639ea7406 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -107,21 +107,24 @@ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig index dc71d9981..70f461e37 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/edit.html.twig @@ -136,11 +136,13 @@ {{ 'Return'|trans }} -
  • - -
  • + {% if is_granted('CHILL_PERSON_UPDATE', person) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig index ed3b3020b..dcd0ae808 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig @@ -113,14 +113,18 @@
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig index 0c257c0ea..9ef5be279 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig @@ -8,24 +8,26 @@ {% block personcontent %}
    - -

    {{ 'Désigner un dossier doublon'|trans }}

    - - {{ form_start(form) }} - {{ form_rest(form) }} - +

    {{ 'Désigner un dossier doublon'|trans }}

    - {{ form_end(form) }} + {{ form_start(form) }} + {{ form_rest(form) }} + + + + {{ form_end(form) }}
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/view.html.twig index 5cef17c13..d6e87d0dd 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/view.html.twig @@ -56,9 +56,11 @@ {% else %} {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/edit.html.twig index b84bd2543..6886db4cd 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/edit.html.twig @@ -38,9 +38,11 @@ {{ 'Cancel'|trans|chill_return_path_label }} -
  • - -
  • + {% if is_granted('CHILL_PERSON_UPDATE', person) %} +
  • + +
  • + {% endif %} {{ form_end(form) }} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig index 69e12f36d..47df9f6cc 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/list.html.twig @@ -104,12 +104,12 @@ {% if is_granted('CHILL_PERSON_UPDATE', person) %} -
  • - - {{ 'Add a residential address'|trans }} - -
  • +
  • + + {{ 'Add a residential address'|trans }} + +
  • {% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new_pick_kind.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new_pick_kind.html.twig index 3cc4af6c9..43bad7665 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new_pick_kind.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/ResidentialAddress/new_pick_kind.html.twig @@ -8,16 +8,16 @@
    - -
    -

    {{ 'residential_address_person_explanation'|trans }}

    -
    + +
    +

    {{ 'residential_address_person_explanation'|trans }}

    +
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig index 186b2f3ec..e00f06e86 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig @@ -14,11 +14,13 @@ {{ entity.id }} {{ entity.title|localize_translatable_string }} + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
    + {% endif %} {% endfor %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig index aa7c239ba..f84b06caa 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig @@ -14,11 +14,13 @@ {{ entity.id }} {{ entity.title|localize_translatable_string }} + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
    + {% endif %} {% endfor %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig index f1081aebe..25c83fc4b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig @@ -14,11 +14,13 @@ {{ entity.id }} {{ entity.title|localize_translatable_string }} -
      -
    • - -
    • -
    + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %} +
      +
    • + +
    • +
    + {% endif %} {% endfor %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig index 4c1d5a59d..157c9ac6e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig @@ -14,11 +14,13 @@ {{ entity.id }} {{ entity.title|localize_translatable_string }} + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
    + {% endif %} {% endfor %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig index 44627852e..4b6cc51f1 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig @@ -14,11 +14,13 @@ {{ entity.id }} {{ entity.title|localize_translatable_string }} + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', entity) %}
    + {% endif %} {% endfor %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/closing_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/closing_period.html.twig index 6c92a481a..36e799c01 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/closing_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/closing_period.html.twig @@ -14,11 +14,11 @@
    {{ 'Participants'|trans }} :
    -
      - {% for p in period.participations %} -
    • {{ 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") }) }}
    • - {% endfor %} -
    +
      + {% for p in period.participations %} +
    • {{ 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") }) }}
    • + {% endfor %} +
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/index.html.twig index a154972c0..9b3e37958 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/index.html.twig @@ -28,12 +28,10 @@ This view should receive those arguments: {% block personcontent %}
    - - {{ timeline|raw }} - - {% if nb_items > paginator.getItemsPerPage %} - {{ chill_pagination(paginator) }} - {% endif %} - -
    + {{ timeline|raw }} + + {% if nb_items > paginator.getItemsPerPage %} + {{ chill_pagination(paginator) }} + {% endif %} +
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/opening_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/opening_period.html.twig index e3df6b720..f10a01653 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Timeline/opening_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Timeline/opening_period.html.twig @@ -14,11 +14,11 @@
    {{ 'Participants'|trans }} :
    -
      - {% for p in period.participations %} -
    • {{ 'Since %date%'|trans( {'%date%': p.startDate|format_date("long") } ) }} : {{ p.person|chill_entity_render_box({ 'addLink': true }) }}
    • - {% endfor %} -
    +
      + {% for p in period.participations %} +
    • {{ 'Since %date%'|trans( {'%date%': p.startDate|format_date("long") } ) }} : {{ p.person|chill_entity_render_box({ 'addLink': true }) }}
    • + {% endfor %} +
    diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig index 57cf503b8..3d9868578 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig @@ -6,12 +6,14 @@ {% if display_action is defined and display_action == true %} - + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %} + + {% endif %} {% endif %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig index 989052a0a..c37f35a0a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig @@ -88,12 +88,13 @@ {% if display_action is defined and display_action == true %} - {# TODO add acl #} - + {% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_SEE', evaluation.accompanyingPeriodWork) %} + + {% endif %} {% endif %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 52b53553e..6e0d65be0 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -213,7 +213,7 @@ No requestor: Pas de demandeur No resources: "Pas d'interlocuteurs privilégiés" Persons associated: Usagers concernés 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 Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours course.draft: Brouillon @@ -451,12 +451,12 @@ Edit Accompanying Course: Modifier le parcours Close Accompanying Course: Clôturer le parcours Create Accompanying Course: Créer un nouveau 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 This course is located by: Localisé auprès de This course has a temporarily location: Localisation temporaire 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 fix it: Compléter accompanying_course: diff --git a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/_edit.html.twig b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/_edit.html.twig index d0a906c9c..9fc609185 100644 --- a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/_edit.html.twig +++ b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/_edit.html.twig @@ -19,9 +19,11 @@ {{ 'Cancel'|trans }} -
  • - {{ form_widget(form.submit, { 'label': 'Save task', 'attr': {'class' : 'btn btn-update'}})}} -
  • + {% if is_granted('CHILL_TASK_TASK_UPDATE', task) %} +
  • + {{ form_widget(form.submit, { 'label': 'Save task', 'attr': {'class' : 'btn btn-update'}})}} +
  • + {% endif %} {{ form_end(form) }}