mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
admin: reorganise person admin menu + fix marital status admin
This commit is contained in:
@@ -18,16 +18,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
*/
|
||||
class AdminController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @param $_locale
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function indexAction($_locale)
|
||||
{
|
||||
return $this->render('ChillPersonBundle:Admin:layout.html.twig', []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
|
@@ -33,12 +33,13 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
return;
|
||||
}
|
||||
|
||||
$menu->addChild('Person', [
|
||||
'route' => 'chill_person_admin',
|
||||
])
|
||||
->setExtras([
|
||||
'order' => 20,
|
||||
]);
|
||||
$menu->addChild('Person')
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras(['order' => 2000, 'header' => true]);
|
||||
|
||||
$menu->addChild('Marital status', [
|
||||
'route' => 'chill_crud_person_marital-status_index',
|
||||
])->setExtras(['order' => 2010]);
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@@ -4,9 +4,8 @@
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
{% block content_form_actions_view %}{% endblock %}
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
{% endblock admin_content %}
|
@@ -1,6 +1,6 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
@@ -21,7 +21,13 @@
|
||||
</ul>
|
||||
</td>
|
||||
</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 %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
@@ -4,8 +4,9 @@
|
||||
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
{% endblock admin_content %}
|
||||
|
||||
|
@@ -96,10 +96,6 @@ chill_person_timeline:
|
||||
path: /{_locale}/person/{person_id}/timeline
|
||||
controller: Chill\PersonBundle\Controller\TimelinePersonController::personAction
|
||||
|
||||
chill_person_admin:
|
||||
path: "/{_locale}/admin/person"
|
||||
controller: Chill\PersonBundle\Controller\AdminController::indexAction
|
||||
|
||||
chill_person_duplicate_view:
|
||||
path: /{_locale}/person/{person_id}/duplicate/view
|
||||
controller: Chill\PersonBundle\Controller\PersonDuplicateController::viewAction
|
||||
|
Reference in New Issue
Block a user