admin: admin section for social work related entities: SocialIssue, SocialAction, Goal, Result, Evaluation

This commit is contained in:
nobohan 2022-05-05 12:07:45 +02:00
parent 10aa727fb3
commit 5daf09334b
27 changed files with 290 additions and 192 deletions

View File

@ -1,22 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminSocialIssueController
* Controller for social issues.
*/
class AdminEvaluationController extends CRUDController
{
}

View File

@ -1,22 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminSocialIssueController
* Controller for social issues.
*/
class AdminGoalController extends CRUDController
{
}

View File

@ -1,22 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminSocialIssueController
* Controller for social issues.
*/
class AdminResultController extends CRUDController
{
}

View File

@ -1,22 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminSocialIssueController
* Controller for social issues.
*/
class AdminSocialActionController extends CRUDController
{
}

View File

@ -1,22 +0,0 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminSocialIssueController
* Controller for social issues.
*/
class AdminSocialIssueController extends CRUDController
{
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class EvaluationController extends CRUDController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
$query->addOrderBy('e.id', 'ASC');
return parent::orderQuery($action, $query, $request, $paginator);
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class GoalController extends CRUDController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
$query->addOrderBy('e.id', 'ASC');
return parent::orderQuery($action, $query, $request, $paginator);
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class ResultController extends CRUDController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
$query->addOrderBy('e.id', 'ASC');
return parent::orderQuery($action, $query, $request, $paginator);
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class SocialActionController extends CRUDController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
$query->addOrderBy('e.id', 'ASC');
return parent::orderQuery($action, $query, $request, $paginator);
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Controller\SocialWork;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class SocialIssueController extends CRUDController
{
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
$query->addOrderBy('e.id', 'ASC');
return parent::orderQuery($action, $query, $request, $paginator);
}
}

View File

@ -190,7 +190,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'name' => 'social_issue', 'name' => 'social_issue',
'base_path' => '/admin/social-work/social-issue', 'base_path' => '/admin/social-work/social-issue',
'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialIssueType::class, 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialIssueType::class,
'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialIssueController::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\SocialIssueController::class,
'actions' => [ 'actions' => [
'index' => [ 'index' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
@ -211,7 +211,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'name' => 'social_action', 'name' => 'social_action',
'base_path' => '/admin/social-work/social-action', 'base_path' => '/admin/social-work/social-action',
'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialActionType::class, 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialActionType::class,
'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialActionController::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\SocialActionController::class,
'actions' => [ 'actions' => [
'index' => [ 'index' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
@ -232,7 +232,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'name' => 'social_goal', 'name' => 'social_goal',
'base_path' => '/admin/social-work/goal', 'base_path' => '/admin/social-work/goal',
'form_class' => \Chill\PersonBundle\Form\SocialWork\GoalType::class, 'form_class' => \Chill\PersonBundle\Form\SocialWork\GoalType::class,
'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminGoalController::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\GoalController::class,
'actions' => [ 'actions' => [
'index' => [ 'index' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
@ -253,7 +253,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'name' => 'social_result', 'name' => 'social_result',
'base_path' => '/admin/social-work/result', 'base_path' => '/admin/social-work/result',
'form_class' => \Chill\PersonBundle\Form\SocialWork\ResultType::class, 'form_class' => \Chill\PersonBundle\Form\SocialWork\ResultType::class,
'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminResultController::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\ResultController::class,
'actions' => [ 'actions' => [
'index' => [ 'index' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',
@ -274,7 +274,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
'name' => 'social_evaluation', 'name' => 'social_evaluation',
'base_path' => '/admin/social-work/evaluation', 'base_path' => '/admin/social-work/evaluation',
'form_class' => \Chill\PersonBundle\Form\SocialWork\EvaluationType::class, 'form_class' => \Chill\PersonBundle\Form\SocialWork\EvaluationType::class,
'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminEvaluationController::class, 'controller' => \Chill\PersonBundle\Controller\SocialWork\EvaluationController::class,
'actions' => [ 'actions' => [
'index' => [ 'index' => [
'role' => 'ROLE_ADMIN', 'role' => 'ROLE_ADMIN',

View File

@ -121,14 +121,14 @@ class Evaluation
return $this; return $this;
} }
public function setDelay(DateInterval $delay): self public function setDelay(?DateInterval $delay): self
{ {
$this->delay = $delay; $this->delay = $delay;
return $this; return $this;
} }
public function setNotificationDelay(DateInterval $notificationDelay): self public function setNotificationDelay(?DateInterval $notificationDelay): self
{ {
$this->notificationDelay = $notificationDelay; $this->notificationDelay = $notificationDelay;

View File

@ -45,7 +45,7 @@ class Result
/** /**
* @ORM\Column(type="datetime", nullable=true) * @ORM\Column(type="datetime", nullable=true)
*/ */
private DateTime $desactivationDate; private ?DateTime $desactivationDate;
/** /**
* @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results") * @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results")

View File

@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Form\SocialWork; namespace Chill\PersonBundle\Form\SocialWork;
use Chill\MainBundle\Form\Type\DateIntervalType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Entity\SocialWork\Evaluation; use Chill\PersonBundle\Entity\SocialWork\Evaluation;
@ -39,9 +40,14 @@ class EvaluationType extends AbstractType
->add('title', TranslatableStringFormType::class, [ ->add('title', TranslatableStringFormType::class, [
'label' => 'Nom', 'label' => 'Nom',
]) ])
->add('delay') ->add('delay', DateIntervalType::class, [
'label' => 'evaluation.delay',
->add('notificationDelay'); 'required' => false,
])
->add('notificationDelay', DateIntervalType::class, [
'label' => 'evaluation.notificationDelay',
'required' => false,
]);
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)

View File

@ -11,13 +11,13 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Form\SocialWork; namespace Chill\PersonBundle\Form\SocialWork;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Entity\SocialWork\Goal; use Chill\PersonBundle\Entity\SocialWork\Goal;
use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -52,11 +52,9 @@ class GoalType extends AbstractType
}, },
]) ])
->add('desactivationDate', DateType::class, [ ->add('desactivationDate', ChillDateType::class, [
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
'required' => false, 'required' => false,
'label' => 'goal.desactivationDate',
]); ]);
} }

View File

@ -11,11 +11,11 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Form\SocialWork; namespace Chill\PersonBundle\Form\SocialWork;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Entity\SocialWork\Result; use Chill\PersonBundle\Entity\SocialWork\Result;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -40,13 +40,10 @@ class ResultType extends AbstractType
->add('title', TranslatableStringFormType::class, [ ->add('title', TranslatableStringFormType::class, [
'label' => 'Nom', 'label' => 'Nom',
]) ])
->add('accompanyingPeriodWorks')
->add('accompanyingPeriodWorkGoals') ->add('desactivationDate', ChillDateType::class, [
->add('desactivationDate', DateType::class, [
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
'required' => false, 'required' => false,
'label' => 'goal.desactivationDate',
]); ]);
} }

View File

@ -11,13 +11,14 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Form\SocialWork; namespace Chill\PersonBundle\Form\SocialWork;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\DateIntervalType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -44,6 +45,7 @@ class SocialActionType extends AbstractType
]) ])
->add('issue', EntityType::class, [ ->add('issue', EntityType::class, [
'class' => SocialIssue::class, 'class' => SocialIssue::class,
'label' => 'socialAction.socialIssue',
'choice_label' => function (SocialIssue $issue) { 'choice_label' => function (SocialIssue $issue) {
return $this->translatableStringHelper->localize($issue->getTitle()); return $this->translatableStringHelper->localize($issue->getTitle());
}, },
@ -55,12 +57,13 @@ class SocialActionType extends AbstractType
return $this->translatableStringHelper->localize($issue->getTitle()); return $this->translatableStringHelper->localize($issue->getTitle());
}, },
]) ])
->add('defaultNotificationDelay') ->add('defaultNotificationDelay', DateIntervalType::class, [
->add('desactivationDate', DateType::class, [ 'label' => 'socialAction.defaultNotificationDelay',
'attr' => ['class' => 'datepicker'],
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
'required' => false, 'required' => false,
])
->add('desactivationDate', ChillDateType::class, [
'required' => false,
'label' => 'goal.desactivationDate',
]); ]);
} }

View File

@ -11,12 +11,12 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Form\SocialWork; namespace Chill\PersonBundle\Form\SocialWork;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
@ -41,10 +41,8 @@ class SocialIssueType extends AbstractType
'required' => false, 'required' => false,
'choice_label' => fn (SocialIssue $issue): ?string => $this->translatableStringHelper->localize($issue->getTitle()), 'choice_label' => fn (SocialIssue $issue): ?string => $this->translatableStringHelper->localize($issue->getTitle()),
]) ])
->add('desactivationDate', DateType::class, [ ->add('desactivationDate', ChillDateType::class, [
'attr' => ['class' => 'datepicker'], 'label' => 'goal.desactivationDate',
'widget' => 'single_text',
'format' => 'dd-MM-yyyy',
'required' => false, 'required' => false,
]); ]);
} }

View File

@ -37,9 +37,37 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header') ->setAttribute('class', 'list-group-item-header')
->setExtras(['order' => 2000, 'header' => true]); ->setExtras(['order' => 2000, 'header' => true]);
$menu->addChild('Civility', [
'route' => 'chill_crud_main_civility_index',
])->setExtras(['order' => 2010]);
$menu->addChild('Marital status', [ $menu->addChild('Marital status', [
'route' => 'chill_crud_person_marital-status_index', 'route' => 'chill_crud_person_marital-status_index',
])->setExtras(['order' => 2010]); ])->setExtras(['order' => 2020]);
$menu->addChild('person_admin.social_work')
->setAttribute('class', 'list-group-item-header')
->setExtras(['order' => 3000, 'header' => true]);
$menu->addChild('person_admin.social_action', [
'route' => 'chill_crud_social_action_index',
])->setExtras(['order' => 3001]);
$menu->addChild('person_admin.social_issue', [
'route' => 'chill_crud_social_issue_index',
])->setExtras(['order' => 3002]);
$menu->addChild('person_admin.social_goal', [
'route' => 'chill_crud_social_goal_index',
])->setExtras(['order' => 3010]);
$menu->addChild('person_admin.social_evaluation', [
'route' => 'chill_crud_social_evaluation_index',
])->setExtras(['order' => 3020]);
$menu->addChild('person_admin.social_result', [
'route' => 'chill_crud_social_result_index',
])->setExtras(['order' => 3030]);
} }
public static function getMenuIds(): array public static function getMenuIds(): array

View File

@ -1,6 +1,6 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th> <th>{{ 'Id'|trans }}</th>
@ -9,19 +9,25 @@
{% endblock %} {% endblock %}
{% block table_entities_tbody %} {% block table_entities_tbody %}
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<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"> <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="btn btn-edit"></a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %} {% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th> <th>{{ 'Id'|trans }}</th>
@ -16,12 +16,18 @@
<td> <td>
<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="btn btn-edit"></a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th> <th>{{ 'Id'|trans }}</th>
@ -16,12 +16,18 @@
<td> <td>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ chill_path_add_return_path('chill_crud_social_result_edit', { 'id': entity.id }) }}" class="sc-button bt-edit"></a> <a href="{{ chill_path_add_return_path('chill_crud_social_result_edit', { 'id': entity.id }) }}" class="btn btn-edit"></a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th> <th>{{ 'Id'|trans }}</th>
@ -16,12 +16,18 @@
<td> <td>
<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="btn btn-edit"></a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock %}

View File

@ -1,6 +1,6 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %} {% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %} {% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th> <th>{{ 'Id'|trans }}</th>
@ -16,12 +16,18 @@
<td> <td>
<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="btn btn-edit"></a>
</li> </li>
</ul> </ul>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% block actions_before %}
<li class='cancel'>
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
</li>
{% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock %}

View File

@ -1,12 +1,11 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %} {% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %} {% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %} {% endblock %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} {% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %} {% block content_form_actions_save_and_show %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %} {% endembed %}
{% endembed %} {% endblock admin_content %}
{% endblock %}

View File

@ -1,11 +1,13 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %} {% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %} {% block title %}
{% include('@ChillMain/CRUD/_new_title.html.twig') %} {% include('@ChillMain/CRUD/_new_title.html.twig') %}
{% endblock %} {% endblock %}
{% block layout_wvm_content %} {% block admin_content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %} {% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %} {% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %} {% endembed %}
{% endblock %} {% endblock admin_content %}

View File

@ -387,23 +387,39 @@ crud:
social_action: social_action:
index: index:
title: Liste des actions d'accompagnements title: Liste des actions d'accompagnements
add_new: Ajouter une nouvelle action d'accompagnements add_new: Ajouter une nouvelle action d'accompagnement
title_new: Nouvelle action d'accompagnements title_new: Nouvelle action d'accompagnement
title_edit: Modifier l'action d'accompagnements title_edit: Modifier l'action d'accompagnement
title_link: Voir l'action d'accompagnement title_link: Voir l'action d'accompagnement
social_evaluation:
index:
title: Liste des évaluations
add_new: Ajouter une nouvelle évaluation
title_new: Nouvelle évaluation
title_edit: Modifier l'évaluation
social_goal: social_goal:
index: index:
title: Liste des objectifs d'action d'accompagnements title: Liste des objectifs d'action d'accompagnements
add_new: Ajouter un nouvel objectif d'action d'accompagnements add_new: Ajouter un nouvel objectif d'action d'accompagnement
title_new: Nouvel objectif title_new: Nouvel objectif
title_edit: Modifier l'objectif title_edit: Modifier l'objectif
social_result: social_result:
index: index:
title: Liste des résultats d'action d'accompagnements title: Liste des résultats d'action d'accompagnements
add_new: Ajouter un nouveau résultat d'action d'accompagnements add_new: Ajouter un nouveau résultat d'action d'accompagnement
title_new: Nouveau résultat title_new: Nouveau résultat
title_edit: Modifier le résultat title_edit: Modifier le résultat
evaluation:
delay: Délai
notificationDelay: Délai de notification
goal:
desactivationDate: Date de désactivation
socialAction:
defaultNotificationDelay: Délai de notification par défaut
socialIssue: Problématique sociale
# specific to closing motive # specific to closing motive
closing_motive: closing_motive:
@ -427,6 +443,7 @@ person_admin:
social_goal: Buts social_goal: Buts
social_result: Résultats social_result: Résultats
social_evaluation: Évaluations social_evaluation: Évaluations
social_work: Accompagnement social
# specific to accompanying period # specific to accompanying period
accompanying_period: accompanying_period: