Update template pathes to new syntax

This commit is contained in:
Julien Fastré 2023-10-02 13:56:22 +02:00
parent 294aaf5bed
commit bad302f512
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
13 changed files with 30 additions and 30 deletions

View File

@ -40,7 +40,7 @@ class ActivityReasonCategoryController extends AbstractController
return $this->redirectToRoute('chill_activity_activityreasoncategory_show', ['id' => $entity->getId()]); return $this->redirectToRoute('chill_activity_activityreasoncategory_show', ['id' => $entity->getId()]);
} }
return $this->render('ChillActivityBundle:ActivityReasonCategory:new.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -62,7 +62,7 @@ class ActivityReasonCategoryController extends AbstractController
$editForm = $this->createEditForm($entity); $editForm = $this->createEditForm($entity);
return $this->render('ChillActivityBundle:ActivityReasonCategory:edit.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);
@ -78,7 +78,7 @@ class ActivityReasonCategoryController extends AbstractController
$entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll(); $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll();
return $this->render('ChillActivityBundle:ActivityReasonCategory:index.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [
'entities' => $entities, 'entities' => $entities,
]); ]);
} }
@ -92,7 +92,7 @@ class ActivityReasonCategoryController extends AbstractController
$entity = new ActivityReasonCategory(); $entity = new ActivityReasonCategory();
$form = $this->createCreateForm($entity); $form = $this->createCreateForm($entity);
return $this->render('ChillActivityBundle:ActivityReasonCategory:new.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -112,7 +112,7 @@ class ActivityReasonCategoryController extends AbstractController
throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.');
} }
return $this->render('ChillActivityBundle:ActivityReasonCategory:show.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/show.html.twig', [
'entity' => $entity, 'entity' => $entity,
]); ]);
} }
@ -140,7 +140,7 @@ class ActivityReasonCategoryController extends AbstractController
return $this->redirectToRoute('chill_activity_activityreasoncategory_edit', ['id' => $id]); return $this->redirectToRoute('chill_activity_activityreasoncategory_edit', ['id' => $id]);
} }
return $this->render('ChillActivityBundle:ActivityReasonCategory:edit.html.twig', [ return $this->render('@ChillActivity/ActivityReasonCategory/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);

View File

@ -24,6 +24,6 @@ class AdminController extends AbstractController
*/ */
public function indexAdminAction() public function indexAdminAction()
{ {
return $this->render('ChillAsideActivityBundle:Admin:index.html.twig'); return $this->render('@ChillAsideActivity/Admin/index.html.twig');
} }
} }

View File

@ -26,6 +26,6 @@ class AdminController extends AbstractController
*/ */
public function indexAction(): Response public function indexAction(): Response
{ {
return $this->render('ChillCustomFieldsBundle:Admin:layout.html.twig'); return $this->render('@ChillCustomFields/Admin/layout.html.twig');
} }
} }

View File

@ -48,7 +48,7 @@ class CustomFieldController extends AbstractController
$this->addFlash('error', $this->get('translator') $this->addFlash('error', $this->get('translator')
->trans('The custom field form contains errors')); ->trans('The custom field form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', [ return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -71,7 +71,7 @@ class CustomFieldController extends AbstractController
$editForm = $this->createEditForm($entity, $entity->getType()); $editForm = $this->createEditForm($entity, $entity->getType());
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', [ return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);
@ -103,7 +103,7 @@ class CustomFieldController extends AbstractController
$form = $this->createCreateForm($entity, $request->query->get('type')); $form = $this->createCreateForm($entity, $request->query->get('type'));
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', [ return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -138,7 +138,7 @@ class CustomFieldController extends AbstractController
$this->addFlash('error', $this->get('translator') $this->addFlash('error', $this->get('translator')
->trans('The custom field form contains errors')); ->trans('The custom field form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', [ return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);

View File

@ -63,7 +63,7 @@ class CustomFieldsGroupController extends AbstractController
$this->addFlash('error', $this->translator $this->addFlash('error', $this->translator
->trans('The custom fields group form contains errors')); ->trans('The custom fields group form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -85,7 +85,7 @@ class CustomFieldsGroupController extends AbstractController
$editForm = $this->createEditForm($entity); $editForm = $this->createEditForm($entity);
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);
@ -111,7 +111,7 @@ class CustomFieldsGroupController extends AbstractController
} }
} }
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:index.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/index.html.twig', [
'entities' => $cfGroups, 'entities' => $cfGroups,
'default_groups' => $defaultGroups, 'default_groups' => $defaultGroups,
'make_default_forms' => $makeDefaultFormViews, 'make_default_forms' => $makeDefaultFormViews,
@ -174,7 +174,7 @@ class CustomFieldsGroupController extends AbstractController
$entity = new CustomFieldsGroup(); $entity = new CustomFieldsGroup();
$form = $this->createCreateForm($entity); $form = $this->createCreateForm($entity);
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
'entity' => $entity, 'entity' => $entity,
'form' => $form->createView(), 'form' => $form->createView(),
]); ]);
@ -213,7 +213,7 @@ class CustomFieldsGroupController extends AbstractController
if ($form->isSubmitted()) { if ($form->isSubmitted()) {
if ($form->get('submit_render')->isClicked()) { if ($form->get('submit_render')->isClicked()) {
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:render_for_test.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/render_for_test.html.twig', [
'fields' => $form->getData(), 'fields' => $form->getData(),
'customFieldsGroup' => $entity, 'customFieldsGroup' => $entity,
]); ]);
@ -247,7 +247,7 @@ class CustomFieldsGroupController extends AbstractController
$options = $this->getOptionsAvailable($entity->getEntity()); $options = $this->getOptionsAvailable($entity->getEntity());
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:show.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/show.html.twig', [
'entity' => $entity, 'entity' => $entity,
'create_field_form' => $this->createCreateFieldForm($entity)->createView(), 'create_field_form' => $this->createCreateFieldForm($entity)->createView(),
'options' => $options, 'options' => $options,
@ -284,7 +284,7 @@ class CustomFieldsGroupController extends AbstractController
$this->addFlash('error', $this->translator $this->addFlash('error', $this->translator
->trans('The custom fields group form contains errors')); ->trans('The custom fields group form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', [ return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
'entity' => $entity, 'entity' => $entity,
'edit_form' => $editForm->createView(), 'edit_form' => $editForm->createView(),
]); ]);

View File

@ -289,7 +289,7 @@ class CustomFieldChoice extends AbstractCustomField
$choices[] = ['name' => $value['_other'], 'slug' => '_other']; $choices[] = ['name' => $value['_other'], 'slug' => '_other'];
} }
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.html.twig'; $template = '@ChillCustomFields/CustomFieldsRendering/choice.html.twig';
if ('csv' === $documentType) { if ('csv' === $documentType) {
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.csv.twig'; $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.csv.twig';

View File

@ -90,7 +90,7 @@ class CustomFieldText extends AbstractCustomField
public function render($value, CustomField $customField, $documentType = 'html') public function render($value, CustomField $customField, $documentType = 'html')
{ {
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.html.twig'; $template = '@ChillCustomFields/CustomFieldsRendering/text.html.twig';
if ('csv' === $documentType) { if ('csv' === $documentType) {
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.csv.twig'; $template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.csv.twig';

View File

@ -82,7 +82,7 @@ class CustomFieldTitle extends AbstractCustomField
{ {
return $this->templating return $this->templating
->render( ->render(
'ChillCustomFieldsBundle:CustomFieldsRendering:title.html.twig', '@ChillCustomFields/CustomFieldsRendering/title.html.twig',
[ [
'title' => $customField->getName(), 'title' => $customField->getName(),
'type' => $customField->getOptions()[self::TYPE], 'type' => $customField->getOptions()[self::TYPE],

View File

@ -77,7 +77,7 @@ class CustomFieldRenderingTwig extends AbstractExtension
* Twig Extension that is used to render the label of a custom field. * Twig Extension that is used to render the label of a custom field.
* *
* @param CustomField $customField Either a customField OR a customizable_entity OR the FQDN of the entity * @param CustomField $customField Either a customField OR a customizable_entity OR the FQDN of the entity
* @param array $params The parameters for rendering. Currently, 'label_layout' allow to choose a different label. Default is 'ChillCustomFieldsBundle:CustomField:render_label.html.twig' * @param array $params The parameters for rendering. Currently, 'label_layout' allow to choose a different label. Default is '@ChillCustomFields/CustomField/render_label.html.twig'
* *
* @return string HTML representation of the custom field label. * @return string HTML representation of the custom field label.
*/ */

View File

@ -76,7 +76,7 @@ final class CustomFieldsGroupRenderingTwig extends AbstractExtension
* @param string $documentType The type of the document (csv, html) * @param string $documentType The type of the document (csv, html)
* @param array $params The parameters for rendering : * @param array $params The parameters for rendering :
* - layout : allow to choose a different layout by default : * - layout : allow to choose a different layout by default :
* ChillCustomFieldsBundle:CustomFieldsGroup:render.html.twig * @ChillCustomFields/CustomFieldsGroup/render.html.twig
* - show_empty : force show empty field * - show_empty : force show empty field
* *
* @return string HTML representation of the custom field group value, as described in * @return string HTML representation of the custom field group value, as described in

View File

@ -68,7 +68,7 @@ class DocumentAccompanyingCourseController extends AbstractController
} }
return $this->render( return $this->render(
'ChillDocStoreBundle:AccompanyingCourseDocument:delete.html.twig', '@ChillDocStore/AccompanyingCourseDocument/delete.html.twig',
[ [
'document' => $document, 'document' => $document,
'delete_form' => $form->createView(), 'delete_form' => $form->createView(),
@ -109,7 +109,7 @@ class DocumentAccompanyingCourseController extends AbstractController
} }
return $this->render( return $this->render(
'ChillDocStoreBundle:AccompanyingCourseDocument:edit.html.twig', '@ChillDocStore/AccompanyingCourseDocument/edit.html.twig',
[ [
'document' => $document, 'document' => $document,
'form' => $form->createView(), 'form' => $form->createView(),
@ -157,7 +157,7 @@ class DocumentAccompanyingCourseController extends AbstractController
$this->addFlash('error', $this->translator->trans('This form contains errors')); $this->addFlash('error', $this->translator->trans('This form contains errors'));
} }
return $this->render('ChillDocStoreBundle:AccompanyingCourseDocument:new.html.twig', [ return $this->render('@ChillDocStore/AccompanyingCourseDocument/new.html.twig', [
'document' => $document, 'document' => $document,
'form' => $form->createView(), 'form' => $form->createView(),
'accompanyingCourse' => $course, 'accompanyingCourse' => $course,
@ -172,7 +172,7 @@ class DocumentAccompanyingCourseController extends AbstractController
$this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::SEE_DETAILS, $document); $this->denyAccessUnlessGranted(AccompanyingCourseDocumentVoter::SEE_DETAILS, $document);
return $this->render( return $this->render(
'ChillDocStoreBundle:AccompanyingCourseDocument:show.html.twig', '@ChillDocStore/AccompanyingCourseDocument/show.html.twig',
['document' => $document, 'accompanyingCourse' => $course] ['document' => $document, 'accompanyingCourse' => $course]
); );
} }

View File

@ -3,7 +3,7 @@
<div class="item-col"> <div class="item-col">
<div class="denomination h2"> <div class="denomination h2">
{{ task.title }} {{ task.title }}
{% for place in workflow_marked_places(task) %} {% for place in workflow_marked_places(task) %}
<span class="task-status badge type-{{ task.type }} place-{{ place }}"> <span class="task-status badge type-{{ task.type }} place-{{ place }}">
{{ place|trans }} {{ place|trans }}
</span> </span>

View File

@ -23,6 +23,6 @@ class AdminController extends AbstractController
*/ */
public function indexAdminAction() public function indexAdminAction()
{ {
return $this->render('ChillThirdPartyBundle:Admin:index.html.twig'); return $this->render('@ChillThirdParty/Admin/index.html.twig');
} }
} }