mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Update path to twig template with new syntax
This commit is contained in:
@@ -127,7 +127,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:AccompanyingPeriod:form.html.twig', [
|
||||
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'person' => $person,
|
||||
'accompanying_period' => $current,
|
||||
@@ -190,7 +190,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:AccompanyingPeriod:form.html.twig', [
|
||||
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'person' => $person,
|
||||
'accompanying_period' => $accompanyingPeriod,
|
||||
@@ -299,7 +299,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:AccompanyingPeriod:form.html.twig', [
|
||||
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'person' => $person,
|
||||
'accompanying_period' => $accompanyingPeriod,
|
||||
@@ -340,7 +340,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
}
|
||||
|
||||
if (false === $confirm && $period->canBeReOpened($person)) {
|
||||
return $this->render('ChillPersonBundle:AccompanyingPeriod:re_open.html.twig', [
|
||||
return $this->render('@ChillPerson/AccompanyingPeriod/re_open.html.twig', [
|
||||
'period' => $period,
|
||||
'person' => $person,
|
||||
]);
|
||||
@@ -417,7 +417,7 @@ class AccompanyingPeriodController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:AccompanyingPeriod:form.html.twig', [
|
||||
return $this->render('@ChillPerson/AccompanyingPeriod/form.html.twig', [
|
||||
'form' => $form->createView(),
|
||||
'person' => $person,
|
||||
'accompanying_period' => $accompanyingPeriod,
|
||||
|
@@ -24,7 +24,7 @@ class AdminController extends AbstractController
|
||||
*/
|
||||
public function indexAccompanyingCourseAdminAction()
|
||||
{
|
||||
return $this->render('ChillPersonBundle:Admin:indexAccompanyingCourse.html.twig');
|
||||
return $this->render('@ChillPerson/Admin/indexAccompanyingCourse.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -32,7 +32,7 @@ class AdminController extends AbstractController
|
||||
*/
|
||||
public function indexHouseholdAdminAction()
|
||||
{
|
||||
return $this->render('ChillPersonBundle:Admin:indexHousehold.html.twig');
|
||||
return $this->render('@ChillPerson/Admin/indexHousehold.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,7 +40,7 @@ class AdminController extends AbstractController
|
||||
*/
|
||||
public function indexPersonAdminAction()
|
||||
{
|
||||
return $this->render('ChillPersonBundle:Admin:indexPerson.html.twig');
|
||||
return $this->render('@ChillPerson/Admin/indexPerson.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ class AdminController extends AbstractController
|
||||
*/
|
||||
public function indexSocialWorkAdminAction()
|
||||
{
|
||||
return $this->render('ChillPersonBundle:Admin:indexSocialWork.html.twig');
|
||||
return $this->render('@ChillPerson/Admin/indexSocialWork.html.twig');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -80,7 +80,7 @@ class HouseholdCompositionController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:HouseholdComposition:delete.html.twig',
|
||||
'@ChillPerson/HouseholdComposition/delete.html.twig',
|
||||
[
|
||||
'household' => $household,
|
||||
'composition' => $composition,
|
||||
|
@@ -89,7 +89,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:Address:new.html.twig', [
|
||||
return $this->render('@ChillPerson/Address/new.html.twig', [
|
||||
'person' => $person,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
@@ -116,7 +116,7 @@ class PersonAddressController extends AbstractController
|
||||
|
||||
$form = $this->createEditForm($person, $address);
|
||||
|
||||
return $this->render('ChillPersonBundle:Address:edit.html.twig', [
|
||||
return $this->render('@ChillPerson/Address/edit.html.twig', [
|
||||
'person' => $person,
|
||||
'address' => $address,
|
||||
'form' => $form->createView(),
|
||||
@@ -140,7 +140,7 @@ class PersonAddressController extends AbstractController
|
||||
'You are not allowed to edit this person.'
|
||||
);
|
||||
|
||||
return $this->render('ChillPersonBundle:Address:list.html.twig', [
|
||||
return $this->render('@ChillPerson/Address/list.html.twig', [
|
||||
'person' => $person,
|
||||
]);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class PersonAddressController extends AbstractController
|
||||
|
||||
$form = $this->createCreateForm($person, $address);
|
||||
|
||||
return $this->render('ChillPersonBundle:Address:new.html.twig', [
|
||||
return $this->render('@ChillPerson/Address/new.html.twig', [
|
||||
'person' => $person,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
@@ -218,7 +218,7 @@ class PersonAddressController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:Address:edit.html.twig', [
|
||||
return $this->render('@ChillPerson/Address/edit.html.twig', [
|
||||
'person' => $person,
|
||||
'address' => $address,
|
||||
'form' => $form->createView(),
|
||||
|
@@ -107,7 +107,7 @@ final class PersonController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:Person:edit.html.twig',
|
||||
'@ChillPerson/Person/edit.html.twig',
|
||||
['person' => $person, 'form' => $form->createView()]
|
||||
);
|
||||
}
|
||||
@@ -275,7 +275,7 @@ final class PersonController extends AbstractController
|
||||
$this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT);
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:Person:view.html.twig',
|
||||
'@ChillPerson/Person/view.html.twig',
|
||||
[
|
||||
'person' => $person,
|
||||
'cFGroup' => $this->getCFGroup(),
|
||||
|
@@ -92,7 +92,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
return $this->redirectToRoute('chill_person_duplicate_view', ['person_id' => $person1->getId()]);
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:PersonDuplicate:confirm.html.twig', [
|
||||
return $this->render('@ChillPerson/PersonDuplicate/confirm.html.twig', [
|
||||
'person' => $person1,
|
||||
'person2' => $person2,
|
||||
'form' => $form->createView(),
|
||||
@@ -143,7 +143,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
return $this->redirectToRoute('chill_person_duplicate_confirm', $params);
|
||||
}
|
||||
|
||||
return $this->render('ChillPersonBundle:PersonDuplicate:find_manually.html.twig', [
|
||||
return $this->render('@ChillPerson/PersonDuplicate/find_manually.html.twig', [
|
||||
'person' => $person,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
@@ -216,7 +216,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
|
||||
|
||||
$notDuplicatePersons = $personNotDuplicateRepository->findNotDuplicatePerson($person);
|
||||
|
||||
return $this->render('ChillPersonBundle:PersonDuplicate:view.html.twig', [
|
||||
return $this->render('@ChillPerson/PersonDuplicate/view.html.twig', [
|
||||
'person' => $person,
|
||||
'duplicatePersons' => $duplicatePersons,
|
||||
'notDuplicatePersons' => $notDuplicatePersons,
|
||||
|
@@ -66,7 +66,7 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:delete.html.twig',
|
||||
'@ChillPerson/PersonResource/delete.html.twig',
|
||||
[
|
||||
'person' => $personOwner,
|
||||
'resource' => $resource,
|
||||
@@ -99,7 +99,7 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:edit.html.twig',
|
||||
'@ChillPerson/PersonResource/edit.html.twig',
|
||||
[
|
||||
'person' => $personOwner,
|
||||
'resource' => $resource,
|
||||
@@ -118,7 +118,7 @@ final class PersonResourceController extends AbstractController
|
||||
$personResources = $this->personResourceRepository->findBy(['personOwner' => $personOwner->getId()]);
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:list.html.twig',
|
||||
'@ChillPerson/PersonResource/list.html.twig',
|
||||
[
|
||||
'person' => $personOwner,
|
||||
'personResources' => $personResources,
|
||||
@@ -148,7 +148,7 @@ final class PersonResourceController extends AbstractController
|
||||
}
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:PersonResource:create.html.twig',
|
||||
'@ChillPerson/PersonResource/create.html.twig',
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'person' => $personOwner,
|
||||
|
@@ -49,7 +49,7 @@ class TimelinePersonController extends AbstractController
|
||||
$this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT);
|
||||
|
||||
return $this->render(
|
||||
'ChillPersonBundle:Timeline:index.html.twig',
|
||||
'@ChillPerson/Timeline/index.html.twig',
|
||||
[
|
||||
'timeline' => $this->timelineBuilder->getTimelineHTML(
|
||||
'person',
|
||||
|
@@ -40,8 +40,6 @@ class LoadPersonACL extends AbstractFixture implements OrderedFixtureInterface
|
||||
switch ($permissionsGroup->getName()) {
|
||||
case 'social':
|
||||
case 'direction':
|
||||
printf("Adding CHILL_PERSON_UPDATE & CHILL_PERSON_CREATE to %s permission group \n", $permissionsGroup->getName());
|
||||
|
||||
$permissionsGroup->addRoleScope(
|
||||
(new RoleScope())
|
||||
->setRole(AccompanyingPeriodVoter::FULL)
|
||||
@@ -80,7 +78,6 @@ class LoadPersonACL extends AbstractFixture implements OrderedFixtureInterface
|
||||
break;
|
||||
|
||||
case 'administrative':
|
||||
printf("Adding CHILL_PERSON_SEE to %s permission group \n", $permissionsGroup->getName());
|
||||
$roleScopeSee = (new RoleScope())
|
||||
->setRole('CHILL_PERSON_SEE')
|
||||
->setScope(null);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% extends 'ChillMainBundle::layout.html.twig' %}
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title "Liste de parcours à répartir" %}
|
||||
|
||||
|
@@ -258,7 +258,7 @@
|
||||
{% endif %}
|
||||
|
||||
<h2 class="mb-3 visually-hidden">{{ 'Last activities' |trans }}</h2>
|
||||
{% include 'ChillActivityBundle:Activity:list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
|
||||
{% include '@ChillActivity/Activity/list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -63,7 +63,7 @@
|
||||
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for period in acps %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(period, contextEntity)
|
||||
} %}
|
||||
{% else %}
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for period in acpsClosed %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
{% include '@ChillPerson/AccompanyingPeriod/_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(period, contextEntity)
|
||||
} %}
|
||||
{% endfor %}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<h1>{{ 'Accompanying period list'|trans }}</h1>
|
||||
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
{% include '@ChillPerson/AccompanyingPeriod/_list.html.twig' %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% extends 'ChillMainBundle::layout.html.twig' %}
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title 'period_by_user_list.Period by user'|trans %}
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
{% include '@ChillPerson/AccompanyingPeriod/_list.html.twig' %}
|
||||
|
||||
{% if accompanying_periods_old|length > 0 %}
|
||||
<div class="accordion" id="nonCurrent">
|
||||
@@ -28,7 +28,7 @@
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="heading_{{ household.id }}"
|
||||
data-bs-parent="#nonCurrent">
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' with {'accompanying_periods' : accompanying_periods_old} %}
|
||||
{% include '@ChillPerson/AccompanyingPeriod/_list.html.twig' with {'accompanying_periods' : accompanying_periods_old} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -28,7 +28,7 @@ This view should receive those arguments:
|
||||
we define variables to include an edit form repeated multiple time across
|
||||
the page
|
||||
#}
|
||||
{% set edit_tmp_name = 'ChillPersonBundle:Form:go_to_form.html.twig' %}
|
||||
{% set edit_tmp_name = '@ChillPerson/Form/go_to_form.html.twig' %}
|
||||
{% set edit_tmp_args = { 'form_path_args' : { 'person_id': person.id },
|
||||
'form_path_key' : 'chill_person_general_edit' } %}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
{#
|
||||
{#
|
||||
if the `custom_fields` option is used, the custom fields are available
|
||||
under the customFields variable, with the custom field slug as key.
|
||||
#}
|
||||
{% import 'ChillPersonBundle:Person:macro.html.twig' as person %}
|
||||
{% import '@ChillPerson/Person/macro.html.twig' as person %}
|
||||
<div class="col-8 centered">
|
||||
<h2>{{ 'Accompanyied people'|trans }}</h2>
|
||||
<table>
|
||||
|
@@ -54,8 +54,8 @@ final class AccompanyingCourseControllerTest extends WebTestCase
|
||||
->findOneBy(['name' => 'Center A']);
|
||||
|
||||
$personIds = $em->createQuery('SELECT p.id FROM ' .
|
||||
Person::class . ' p ' .
|
||||
' WHERE p.center = :center')
|
||||
Person::class . ' p JOIN p.centerCurrent cc ' .
|
||||
' WHERE cc.center = :center')
|
||||
->setParameter('center', $center)
|
||||
->setMaxResults(100)
|
||||
->getScalarResult();
|
||||
|
@@ -56,6 +56,7 @@ final class PersonDuplicateControllerViewTest extends WebTestCase
|
||||
|
||||
$crawler = $client->request('GET', '/en/person/' . $this->person->getId() . '/duplicate/view');
|
||||
$response = $client->getResponse();
|
||||
var_dump(substr($crawler->html(), 0, 500));
|
||||
$this->assertTrue($response->isSuccessful());
|
||||
|
||||
$this->assertGreaterThan(0, $crawler->filter('html:contains("Find duplicate")')->count());
|
||||
|
@@ -36,7 +36,7 @@ class TimelineAccompanyingPeriodClosing extends AbstractTimelineAccompanyingPeri
|
||||
public function getEntityTemplate($entity, $context, array $args)
|
||||
{
|
||||
return $this->getBasicEntityTemplate(
|
||||
'ChillPersonBundle:Timeline:closing_period.html.twig',
|
||||
'@ChillPerson/Timeline/closing_period.html.twig',
|
||||
$entity,
|
||||
$context,
|
||||
$args
|
||||
|
@@ -34,7 +34,7 @@ class TimelineAccompanyingPeriodOpening extends AbstractTimelineAccompanyingPeri
|
||||
public function getEntityTemplate($entity, $context, array $args)
|
||||
{
|
||||
return $this->getBasicEntityTemplate(
|
||||
'ChillPersonBundle:Timeline:opening_period.html.twig',
|
||||
'@ChillPerson/Timeline/opening_period.html.twig',
|
||||
$entity,
|
||||
$context,
|
||||
$args
|
||||
|
@@ -25,6 +25,6 @@ class AddAPersonWidget implements WidgetInterface
|
||||
array $context,
|
||||
array $config
|
||||
) {
|
||||
return $env->render('ChillPersonBundle:Widget:homepage_add_a_person.html.twig');
|
||||
return $env->render('@ChillPerson/Widget/homepage_add_a_person.html.twig');
|
||||
}
|
||||
}
|
||||
|
@@ -127,7 +127,7 @@ class PersonListWidget implements WidgetInterface
|
||||
}
|
||||
|
||||
return $env->render(
|
||||
'ChillPersonBundle:Widget:homepage_person_list.html.twig',
|
||||
'@ChillPerson/Widget/homepage_person_list.html.twig',
|
||||
[
|
||||
'persons' => $persons,
|
||||
'customFields' => $cfields,
|
||||
|
Reference in New Issue
Block a user