mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Update path to twig template with new syntax
This commit is contained in:
@@ -91,10 +91,10 @@ final class ActivityController extends AbstractController
|
||||
}
|
||||
|
||||
if ($activity->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:confirm_deleteAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/confirm_deleteAccompanyingCourse.html.twig';
|
||||
$accompanyingPeriod = $activity->getAccompanyingPeriod();
|
||||
} else {
|
||||
$view = 'ChillActivityBundle:Activity:confirm_deletePerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/confirm_deletePerson.html.twig';
|
||||
}
|
||||
|
||||
// TODO
|
||||
@@ -164,10 +164,10 @@ final class ActivityController extends AbstractController
|
||||
$person = $entity->getPerson();
|
||||
|
||||
if ($entity->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:editAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/editAccompanyingCourse.html.twig';
|
||||
$accompanyingPeriod = $entity->getAccompanyingPeriod();
|
||||
} else {
|
||||
$view = 'ChillActivityBundle:Activity:editPerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/editPerson.html.twig';
|
||||
}
|
||||
// TODO
|
||||
// $this->denyAccessUnlessGranted('CHILL_ACTIVITY_UPDATE', $entity);
|
||||
@@ -283,7 +283,7 @@ final class ActivityController extends AbstractController
|
||||
]);
|
||||
$this->eventDispatcher->dispatch($event, PrivacyEvent::PERSON_PRIVACY_EVENT);
|
||||
|
||||
$view = 'ChillActivityBundle:Activity:listPerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/listPerson.html.twig';
|
||||
} elseif ($accompanyingPeriod instanceof AccompanyingPeriod) {
|
||||
$this->denyAccessUnlessGranted(ActivityVoter::SEE, $accompanyingPeriod);
|
||||
|
||||
@@ -299,7 +299,7 @@ final class ActivityController extends AbstractController
|
||||
$filterArgs
|
||||
);
|
||||
|
||||
$view = 'ChillActivityBundle:Activity:listAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/listAccompanyingCourse.html.twig';
|
||||
} else {
|
||||
throw new \LogicException("Unsupported");
|
||||
}
|
||||
@@ -358,9 +358,9 @@ final class ActivityController extends AbstractController
|
||||
[$person, $accompanyingPeriod] = $this->getEntity($request);
|
||||
|
||||
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:newAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/newAccompanyingCourse.html.twig';
|
||||
} elseif ($person instanceof Person) {
|
||||
$view = 'ChillActivityBundle:Activity:newPerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/newPerson.html.twig';
|
||||
}
|
||||
|
||||
$activityType_id = $request->get('activityType_id', 0);
|
||||
@@ -538,9 +538,9 @@ final class ActivityController extends AbstractController
|
||||
[$person, $accompanyingPeriod] = $this->getEntity($request);
|
||||
|
||||
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:selectTypeAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/selectTypeAccompanyingCourse.html.twig';
|
||||
} elseif ($person instanceof Person) {
|
||||
$view = 'ChillActivityBundle:Activity:selectTypePerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/selectTypePerson.html.twig';
|
||||
}
|
||||
|
||||
$data = [];
|
||||
@@ -587,9 +587,9 @@ final class ActivityController extends AbstractController
|
||||
$person = $entity->getPerson();
|
||||
|
||||
if ($accompanyingPeriod instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:showAccompanyingCourse.html.twig';
|
||||
$view = '@ChillActivity/Activity/showAccompanyingCourse.html.twig';
|
||||
} elseif ($person instanceof Person) {
|
||||
$view = 'ChillActivityBundle:Activity:showPerson.html.twig';
|
||||
$view = '@ChillActivity/Activity/showPerson.html.twig';
|
||||
} else {
|
||||
throw new RuntimeException('the activity should be linked with a period or person');
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ class ActivityReasonController extends AbstractController
|
||||
return $this->redirectToRoute('chill_activity_activityreason', ['id' => $entity->getId()]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
@@ -66,7 +66,7 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
$editForm = $this->createEditForm($entity);
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
]);
|
||||
@@ -81,7 +81,7 @@ class ActivityReasonController extends AbstractController
|
||||
|
||||
$entities = $this->activityReasonRepository->findAll();
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:index.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
]);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ class ActivityReasonController extends AbstractController
|
||||
$entity = new ActivityReason();
|
||||
$form = $this->createCreateForm($entity);
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/new.html.twig', [
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
]);
|
||||
@@ -113,7 +113,7 @@ class ActivityReasonController extends AbstractController
|
||||
throw $this->createNotFoundException('Unable to find ActivityReason entity.');
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:show.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/show.html.twig', [
|
||||
'entity' => $entity,
|
||||
]);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class ActivityReasonController extends AbstractController
|
||||
return $this->redirectToRoute('chill_activity_activityreason', ['id' => $id]);
|
||||
}
|
||||
|
||||
return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', [
|
||||
return $this->render('@ChillActivity/ActivityReason/edit.html.twig', [
|
||||
'entity' => $entity,
|
||||
'edit_form' => $editForm->createView(),
|
||||
]);
|
||||
|
@@ -20,7 +20,7 @@ class AdminController extends AbstractController
|
||||
{
|
||||
public function indexActivityAction()
|
||||
{
|
||||
return $this->render('ChillActivityBundle:Admin:layout_activity.html.twig');
|
||||
return $this->render('@ChillActivity/Admin/layout_activity.html.twig');
|
||||
}
|
||||
|
||||
public function redirectToAdminIndexAction()
|
||||
|
@@ -75,7 +75,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
|
||||
{% include '@ChillActivity/Activity/concernedGroups.html.twig' with {
|
||||
'context': context,
|
||||
'render': 'wrap-list',
|
||||
'entity': activity,
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<div class="activity-edit">
|
||||
|
||||
<div id="activity"></div> {# <=== vue component #}
|
||||
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
|
||||
{% include '@ChillActivity/Activity/edit.html.twig' %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
<div class="activity-edit">
|
||||
|
||||
<div id="activity"></div> {# <=== vue component #}
|
||||
{% include 'ChillActivityBundle:Activity:edit.html.twig' %}
|
||||
{% include '@ChillActivity/Activity/edit.html.twig' %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -91,7 +91,7 @@
|
||||
|
||||
<div class="flex-table activity-list">
|
||||
{% for activity in activities %}
|
||||
{% include 'ChillActivityBundle:Activity:_list_item.html.twig' with {
|
||||
{% include '@ChillActivity/Activity/_list_item.html.twig' with {
|
||||
'context': context,
|
||||
'recordAction': _self.recordAction(activity, context, person_id, accompanying_course_id)
|
||||
} %}
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
<h1>{{ 'Activity list' |trans }}</h1>
|
||||
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
{% include '@ChillActivity/Activity/list.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
|
||||
{% if is_granted('CHILL_ACTIVITY_CREATE', accompanyingCourse) %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
<h1>{{ 'Activity list' |trans }}</h1>
|
||||
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'person'} %}
|
||||
{% include '@ChillActivity/Activity/list.html.twig' with {'context': 'person'} %}
|
||||
|
||||
{% if is_granted('CHILL_ACTIVITY_CREATE', person) %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<div class="activity-new">
|
||||
|
||||
<div id="activity"></div> {# <=== vue component #}
|
||||
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
{% include '@ChillActivity/Activity/new.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<div class="activity-new">
|
||||
|
||||
<div id="activity"></div> {# <=== vue component #}
|
||||
{% include 'ChillActivityBundle:Activity:new.html.twig' with {'context': 'person'} %}
|
||||
{% include '@ChillActivity/Activity/new.html.twig' with {'context': 'person'} %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -5,5 +5,5 @@
|
||||
{% block title 'Activity creation'|trans %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'ChillActivityBundle:Activity:selectType.html.twig' %}
|
||||
{% include '@ChillActivity/Activity/selectType.html.twig' %}
|
||||
{% endblock %}
|
||||
|
@@ -5,5 +5,5 @@
|
||||
{% block title 'Activity creation'|trans %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'ChillActivityBundle:Activity:selectType.html.twig' %}
|
||||
{% include '@ChillActivity/Activity/selectType.html.twig' %}
|
||||
{% endblock %}
|
||||
|
@@ -88,7 +88,7 @@
|
||||
|
||||
<h2 class="chill-blue">{{ 'Concerned groups'|trans }}</h2>
|
||||
|
||||
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {
|
||||
{% include '@ChillActivity/Activity/concernedGroups.html.twig' with {
|
||||
'context': context,
|
||||
'render': 'bloc',
|
||||
'badge_person': true
|
||||
|
@@ -18,11 +18,11 @@
|
||||
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
||||
{% endblock %}
|
||||
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
{% import '@ChillActivity/ActivityReason/macro.html.twig' as m %}
|
||||
|
||||
{% block content -%}
|
||||
<div class="activity-show">
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
{% include '@ChillActivity/Activity/show.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
{% if activity is not null %}
|
||||
<div class="flex-table">
|
||||
{% if is_granted('CHILL_ACTIVITY_SEE', activity) %}
|
||||
{% include 'ChillActivityBundle:Activity:_list_item.html.twig' with {
|
||||
{% include '@ChillActivity/Activity/_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(activity),
|
||||
'context': 'accompanyingCourse',
|
||||
'itemBlocClass': 'bg-chill-llight-gray'
|
||||
|
@@ -16,11 +16,11 @@
|
||||
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
||||
{% endblock %}
|
||||
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
{% import '@ChillActivity/ActivityReason/macro.html.twig' as m %}
|
||||
|
||||
{% block content -%}
|
||||
<div class="activity-show">
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
|
||||
{% include '@ChillActivity/Activity/show.html.twig' with {'context': 'person'} %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
{% import '@ChillActivity/ActivityReason/macro.html.twig' as m %}
|
||||
|
||||
<div>
|
||||
<h3>{{ activity.date|format_date('long') }}<span class="activity"> / {{ 'Activity'|trans }}</span>{% if 'person' != context %} / {{ activity.person|chill_entity_render_box({'addLink': true}) }}{% endif %}</h3>
|
||||
|
@@ -90,7 +90,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
||||
$this->checkContext($context);
|
||||
|
||||
return [
|
||||
'template' => 'ChillActivityBundle:Timeline:activity_person_context.html.twig',
|
||||
'template' => '@ChillActivity/Timeline/activity_person_context.html.twig',
|
||||
'template_data' => [
|
||||
'activity' => $entity,
|
||||
'context' => $context,
|
||||
|
Reference in New Issue
Block a user