admin: update marital status

This commit is contained in:
nobohan 2022-05-03 19:03:58 +02:00
parent 76af733bc3
commit 3f256ad907
8 changed files with 59 additions and 55 deletions

View File

@ -1,6 +1,6 @@
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block content -%}
{% block content %}
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}

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;
use Chill\MainBundle\CRUD\Controller\CRUDController;
/**
* Class AdminMaritalStatusController.
*/
class AdminMaritalStatusController extends CRUDController
{
// for minimal cases, nothing is required here !
}

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;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Symfony\Component\HttpFoundation\Request;
class MaritalStatusController 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

@ -166,10 +166,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
[
'class' => \Chill\PersonBundle\Entity\MaritalStatus::class,
'name' => 'marital_status',
'base_path' => '/admin/marital-status',
'name' => 'person_marital-status',
'base_path' => '/admin/person/marital-status',
'form_class' => \Chill\PersonBundle\Form\MaritalStatusType::class,
'controller' => \Chill\PersonBundle\Controller\AdminMaritalStatusController::class,
'controller' => \Chill\PersonBundle\Controller\MaritalStatusController::class,
'actions' => [
'index' => [
'role' => 'ROLE_ADMIN',

View File

@ -1,12 +1,12 @@
{% extends '@ChillPerson/Admin/layout.html.twig' %}
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock %}
{% block layout_wvm_content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% block content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% block content_form_actions_view %}{% endblock %}
{% block content_form_actions_save_and_show %}{% endblock %}
{% endembed %}
{% 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 content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
<th>{{ 'Id'|trans }}</th>
@ -9,19 +9,19 @@
{% endblock %}
{% block table_entities_tbody %}
{% for entity in entities %}
<tr>
<td>{{ entity.id }}</td>
<td>{{ entity.name|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_crud_marital_status_edit', { 'id': entity.id }) }}" class="btn btn-edit"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
{% for entity in entities %}
<tr>
<td>{{ entity.id }}</td>
<td>{{ entity.name|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>
<a href="{{ chill_path_add_return_path('chill_crud_person_marital-status_edit', { 'id': entity.id }) }}" class="btn btn-edit"></a>
</li>
</ul>
</td>
</tr>
{% endfor %}
{% endblock %}
{% endembed %}
{% endblock %}

View File

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

View File

@ -372,7 +372,7 @@ crud:
add_new: Ajouter un nouveau
title_new: Nouveau motif de clotûre
title_edit: Modifier le motif de clotûre
marital_status:
person_marital-status:
index:
title: Liste des états civils
add_new: Ajouter un nouveau