mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add routes for household addresses, members, and addresses_moves
This commit is contained in:
parent
fa556bbba1
commit
a133f56dce
@ -31,4 +31,58 @@ class HouseholdController extends AbstractController
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{household_id}/members",
|
||||
* name="chill_person_household_members",
|
||||
* methods={"GET", "HEAD"}
|
||||
* )
|
||||
* @ParamConverter("household", options={"id" = "household_id"})
|
||||
*/
|
||||
public function members(Request $request, Household $household)
|
||||
{
|
||||
// TODO ACL
|
||||
return $this->render('@ChillPerson/Household/members.html.twig',
|
||||
[
|
||||
'household' => $household
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{household_id}/addresses",
|
||||
* name="chill_person_household_addresses",
|
||||
* methods={"GET", "HEAD"}
|
||||
* )
|
||||
* @ParamConverter("household", options={"id" = "household_id"})
|
||||
*/
|
||||
public function addresses(Request $request, Household $household)
|
||||
{
|
||||
// TODO ACL
|
||||
return $this->render('@ChillPerson/Household/addresses.html.twig',
|
||||
[
|
||||
'household' => $household
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{household_id}/address/move",
|
||||
* name="chill_person_household_address_move",
|
||||
* methods={"GET", "HEAD", "POST"}
|
||||
* )
|
||||
* @ParamConverter("household", options={"id" = "household_id"})
|
||||
*/
|
||||
public function addressMove(Request $request, Household $household)
|
||||
{
|
||||
// TODO ACL
|
||||
return $this->render('@ChillPerson/Household/address_move.html.twig',
|
||||
[
|
||||
'household' => $household
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,20 @@ class HouseholdMenuBuilder implements LocalMenuBuilderInterface
|
||||
'household_id' => $household->getId()
|
||||
]])
|
||||
->setExtras(['order' => 10]);
|
||||
|
||||
$menu->addChild($this->translator->trans('Members'), [
|
||||
'route' => 'chill_person_household_members',
|
||||
'routeParameters' => [
|
||||
'household_id' => $household->getId()
|
||||
]])
|
||||
->setExtras(['order' => 20]);
|
||||
|
||||
$menu->addChild($this->translator->trans('Addresses'), [
|
||||
'route' => 'chill_person_household_addresses',
|
||||
'routeParameters' => [
|
||||
'household_id' => $household->getId()
|
||||
]])
|
||||
->setExtras(['order' => 30]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
{% extends '@ChillPerson/Household/layout.html.twig' %}
|
||||
|
||||
{% block title 'Move household'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<p>Household with id {{ household.id }}</p>
|
||||
|
||||
|
||||
{% endblock %}
|
@ -0,0 +1,14 @@
|
||||
{% extends '@ChillPerson/Household/layout.html.twig' %}
|
||||
|
||||
{% block title 'Addresses history for household'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<p>Household with id {{ household.id }}</p>
|
||||
|
||||
<a class="sc-button bt-update" href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
|
||||
{% endblock %}
|
@ -0,0 +1,10 @@
|
||||
{% extends '@ChillPerson/Household/layout.html.twig' %}
|
||||
|
||||
{% block title 'Household members'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<p>Household with id {{ household.id }}</p>
|
||||
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user