Renaming route + in admin

This commit is contained in:
Marc Ducobu 2015-07-01 18:12:25 +02:00
parent 6d53ab6cb7
commit c2a36ef928
19 changed files with 86 additions and 90 deletions

View File

@ -44,7 +44,7 @@ class ActivityReasonCategoryController extends Controller
$em->persist($entity); $em->persist($entity);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activityreasoncategory_show', array('id' => $entity->getId()))); return $this->redirect($this->generateUrl('chill_activity_activityreasoncategory_show', array('id' => $entity->getId())));
} }
return $this->render('ChillActivityBundle:ActivityReasonCategory:new.html.twig', array( return $this->render('ChillActivityBundle:ActivityReasonCategory:new.html.twig', array(
@ -63,7 +63,7 @@ class ActivityReasonCategoryController extends Controller
private function createCreateForm(ActivityReasonCategory $entity) private function createCreateForm(ActivityReasonCategory $entity)
{ {
$form = $this->createForm(new ActivityReasonCategoryType(), $entity, array( $form = $this->createForm(new ActivityReasonCategoryType(), $entity, array(
'action' => $this->generateUrl('activityreasoncategory_create'), 'action' => $this->generateUrl('chill_activity_activityreasoncategory_create'),
'method' => 'POST', 'method' => 'POST',
)); ));
@ -143,7 +143,7 @@ class ActivityReasonCategoryController extends Controller
private function createEditForm(ActivityReasonCategory $entity) private function createEditForm(ActivityReasonCategory $entity)
{ {
$form = $this->createForm(new ActivityReasonCategoryType(), $entity, array( $form = $this->createForm(new ActivityReasonCategoryType(), $entity, array(
'action' => $this->generateUrl('activityreasoncategory_update', array('id' => $entity->getId())), 'action' => $this->generateUrl('chill_activity_activityreasoncategory_update', array('id' => $entity->getId())),
'method' => 'PUT', 'method' => 'PUT',
)); ));
@ -172,7 +172,7 @@ class ActivityReasonCategoryController extends Controller
if ($editForm->isValid()) { if ($editForm->isValid()) {
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activityreasoncategory_edit', array('id' => $id))); return $this->redirect($this->generateUrl('chill_activity_activityreasoncategory_edit', array('id' => $id)));
} }
return $this->render('ChillActivityBundle:ActivityReasonCategory:edit.html.twig', array( return $this->render('ChillActivityBundle:ActivityReasonCategory:edit.html.twig', array(
@ -202,7 +202,7 @@ class ActivityReasonCategoryController extends Controller
$em->flush(); $em->flush();
} }
return $this->redirect($this->generateUrl('activityreasoncategory')); return $this->redirect($this->generateUrl('chill_activity_activityreasoncategory'));
} }
/** /**
@ -215,7 +215,7 @@ class ActivityReasonCategoryController extends Controller
private function createDeleteForm($id) private function createDeleteForm($id)
{ {
return $this->createFormBuilder() return $this->createFormBuilder()
->setAction($this->generateUrl('activityreasoncategory_delete', array('id' => $id))) ->setAction($this->generateUrl('chill_activity_activityreasoncategory_delete', array('id' => $id)))
->setMethod('DELETE') ->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete')) ->add('submit', 'submit', array('label' => 'Delete'))
->getForm() ->getForm()

View File

@ -44,7 +44,7 @@ class ActivityReasonController extends Controller
$em->persist($entity); $em->persist($entity);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activityreason_show', array('id' => $entity->getId()))); return $this->redirect($this->generateUrl('chill_activity_activityreason_show', array('id' => $entity->getId())));
} }
return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', array( return $this->render('ChillActivityBundle:ActivityReason:new.html.twig', array(
@ -63,7 +63,7 @@ class ActivityReasonController extends Controller
private function createCreateForm(ActivityReason $entity) private function createCreateForm(ActivityReason $entity)
{ {
$form = $this->createForm(new ActivityReasonType(), $entity, array( $form = $this->createForm(new ActivityReasonType(), $entity, array(
'action' => $this->generateUrl('activityreason_create'), 'action' => $this->generateUrl('chill_activity_activityreason_create'),
'method' => 'POST', 'method' => 'POST',
)); ));
@ -143,7 +143,7 @@ class ActivityReasonController extends Controller
private function createEditForm(ActivityReason $entity) private function createEditForm(ActivityReason $entity)
{ {
$form = $this->createForm(new ActivityReasonType(), $entity, array( $form = $this->createForm(new ActivityReasonType(), $entity, array(
'action' => $this->generateUrl('activityreason_update', array('id' => $entity->getId())), 'action' => $this->generateUrl('chill_activity_activityreason_update', array('id' => $entity->getId())),
'method' => 'PUT', 'method' => 'PUT',
)); ));
@ -172,7 +172,7 @@ class ActivityReasonController extends Controller
if ($editForm->isValid()) { if ($editForm->isValid()) {
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activityreason_edit', array('id' => $id))); return $this->redirect($this->generateUrl('chill_activity_activityreason_edit', array('id' => $id)));
} }
return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', array( return $this->render('ChillActivityBundle:ActivityReason:edit.html.twig', array(
@ -202,7 +202,7 @@ class ActivityReasonController extends Controller
$em->flush(); $em->flush();
} }
return $this->redirect($this->generateUrl('activityreason')); return $this->redirect($this->generateUrl('chill_activity_activityreason'));
} }
/** /**
@ -215,7 +215,7 @@ class ActivityReasonController extends Controller
private function createDeleteForm($id) private function createDeleteForm($id)
{ {
return $this->createFormBuilder() return $this->createFormBuilder()
->setAction($this->generateUrl('activityreason_delete', array('id' => $id))) ->setAction($this->generateUrl('chill_activity_activityreason_delete', array('id' => $id)))
->setMethod('DELETE') ->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete')) ->add('submit', 'submit', array('label' => 'Delete'))
->getForm() ->getForm()

View File

@ -44,7 +44,7 @@ class ActivityTypeController extends Controller
$em->persist($entity); $em->persist($entity);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activitytype_show', array('id' => $entity->getId()))); return $this->redirect($this->generateUrl('chill_activity_activitytype_show', array('id' => $entity->getId())));
} }
return $this->render('ChillActivityBundle:ActivityType:new.html.twig', array( return $this->render('ChillActivityBundle:ActivityType:new.html.twig', array(
@ -63,7 +63,7 @@ class ActivityTypeController extends Controller
private function createCreateForm(ActivityType $entity) private function createCreateForm(ActivityType $entity)
{ {
$form = $this->createForm(new ActivityTypeType(), $entity, array( $form = $this->createForm(new ActivityTypeType(), $entity, array(
'action' => $this->generateUrl('activitytype_create'), 'action' => $this->generateUrl('chill_activity_activitytype_create'),
'method' => 'POST', 'method' => 'POST',
)); ));
@ -143,7 +143,7 @@ class ActivityTypeController extends Controller
private function createEditForm(ActivityType $entity) private function createEditForm(ActivityType $entity)
{ {
$form = $this->createForm(new ActivityTypeType(), $entity, array( $form = $this->createForm(new ActivityTypeType(), $entity, array(
'action' => $this->generateUrl('activitytype_update', array('id' => $entity->getId())), 'action' => $this->generateUrl('chill_activity_activitytype_update', array('id' => $entity->getId())),
'method' => 'PUT', 'method' => 'PUT',
)); ));
@ -172,7 +172,7 @@ class ActivityTypeController extends Controller
if ($editForm->isValid()) { if ($editForm->isValid()) {
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('activitytype_edit', array('id' => $id))); return $this->redirect($this->generateUrl('chill_activity_activitytype_edit', array('id' => $id)));
} }
return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array( return $this->render('ChillActivityBundle:ActivityType:edit.html.twig', array(
@ -202,7 +202,7 @@ class ActivityTypeController extends Controller
$em->flush(); $em->flush();
} }
return $this->redirect($this->generateUrl('activitytype')); return $this->redirect($this->generateUrl('chill_activity_activitytype'));
} }
/** /**
@ -215,7 +215,7 @@ class ActivityTypeController extends Controller
private function createDeleteForm($id) private function createDeleteForm($id)
{ {
return $this->createFormBuilder() return $this->createFormBuilder()
->setAction($this->generateUrl('activitytype_delete', array('id' => $id))) ->setAction($this->generateUrl('chill_activity_activitytype_delete', array('id' => $id)))
->setMethod('DELETE') ->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete')) ->add('submit', 'submit', array('label' => 'Delete'))
->getForm() ->getForm()

View File

@ -4,16 +4,12 @@ chill_activity_activity:
chill_activity_activityreason: chill_activity_activityreason:
resource: "@ChillActivityBundle/Resources/config/routing/activityreason.yml" resource: "@ChillActivityBundle/Resources/config/routing/activityreason.yml"
prefix: /activityreason prefix: /
chill_activity_activityreasoncategory: chill_activity_activityreasoncategory:
resource: "@ChillActivityBundle/Resources/config/routing/activityreasoncategory.yml" resource: "@ChillActivityBundle/Resources/config/routing/activityreasoncategory.yml"
prefix: /activityreasoncategory prefix: /
chill_activity_activitytype: chill_activity_activitytype:
resource: "@ChillActivityBundle/Resources/config/routing/activitytype.yml" resource: "@ChillActivityBundle/Resources/config/routing/activitytype.yml"
prefix: /activitytype prefix: /
chill_activity_homepage:
path: /hello/{name}
defaults: { _controller: ChillActivityBundle:Default:index }

View File

@ -1,30 +1,30 @@
activityreason: chill_activity_activityreason:
path: / path: /{_locale}/admin/activityreason/
defaults: { _controller: "ChillActivityBundle:ActivityReason:index" } defaults: { _controller: "ChillActivityBundle:ActivityReason:index" }
activityreason_show: chill_activity_activityreason_show:
path: /{id}/show path: /{_locale}/admin/activityreason/{id}/show
defaults: { _controller: "ChillActivityBundle:ActivityReason:show" } defaults: { _controller: "ChillActivityBundle:ActivityReason:show" }
activityreason_new: chill_activity_activityreason_new:
path: /new path: /{_locale}/admin/activityreason/new
defaults: { _controller: "ChillActivityBundle:ActivityReason:new" } defaults: { _controller: "ChillActivityBundle:ActivityReason:new" }
activityreason_create: chill_activity_activityreason_create:
path: /create path: /{_locale}/admin/activityreason/create
defaults: { _controller: "ChillActivityBundle:ActivityReason:create" } defaults: { _controller: "ChillActivityBundle:ActivityReason:create" }
methods: POST methods: POST
activityreason_edit: chill_activity_activityreason_edit:
path: /{id}/edit path: /{_locale}/admin/activityreason/{id}/edit
defaults: { _controller: "ChillActivityBundle:ActivityReason:edit" } defaults: { _controller: "ChillActivityBundle:ActivityReason:edit" }
activityreason_update: chill_activity_activityreason_update:
path: /{id}/update path: /{_locale}/admin/activityreason/{id}/update
defaults: { _controller: "ChillActivityBundle:ActivityReason:update" } defaults: { _controller: "ChillActivityBundle:ActivityReason:update" }
methods: [POST, PUT] methods: [POST, PUT]
activityreason_delete: chill_activity_activityreason_delete:
path: /{id}/delete path: /{_locale}/admin/activityreason/{id}/delete
defaults: { _controller: "ChillActivityBundle:ActivityReason:delete" } defaults: { _controller: "ChillActivityBundle:ActivityReason:delete" }
methods: [POST, DELETE] methods: [POST, DELETE]

View File

@ -1,30 +1,30 @@
activityreasoncategory: chill_activity_activityreasoncategory:
path: / path: /{_locale}/admin/activityreasoncategory/
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:index" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:index" }
activityreasoncategory_show: chill_activity_activityreasoncategory_show:
path: /{id}/show path: /{_locale}/admin/activityreasoncategory/{id}/show
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:show" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:show" }
activityreasoncategory_new: chill_activity_activityreasoncategory_new:
path: /new path: /{_locale}/admin/activityreasoncategory/new
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:new" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:new" }
activityreasoncategory_create: chill_activity_activityreasoncategory_create:
path: /create path: /{_locale}/admin/activityreasoncategory/create
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:create" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:create" }
methods: POST methods: POST
activityreasoncategory_edit: chill_activity_activityreasoncategory_edit:
path: /{id}/edit path: /{_locale}/admin/activityreasoncategory/{id}/edit
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:edit" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:edit" }
activityreasoncategory_update: chill_activity_activityreasoncategory_update:
path: /{id}/update path: /{_locale}/admin/activityreasoncategory/{id}/update
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:update" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:update" }
methods: [POST, PUT] methods: [POST, PUT]
activityreasoncategory_delete: chill_activity_activityreasoncategory_delete:
path: /{id}/delete path: /{_locale}/admin/activityreasoncategory/{id}/delete
defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:delete" } defaults: { _controller: "ChillActivityBundle:ActivityReasonCategory:delete" }
methods: [POST, DELETE] methods: [POST, DELETE]

View File

@ -1,30 +1,30 @@
activitytype: activitytype:
path: / path: /{_locale}/admin/activitytype/
defaults: { _controller: "ChillActivityBundle:ActivityType:index" } defaults: { _controller: "ChillActivityBundle:ActivityType:index" }
activitytype_show: chill_activity_activitytype_show:
path: /{id}/show path: /{_locale}/admin/activitytype/{id}/show
defaults: { _controller: "ChillActivityBundle:ActivityType:show" } defaults: { _controller: "ChillActivityBundle:ActivityType:show" }
activitytype_new: chill_activity_activitytype_new:
path: /new path: /{_locale}/admin/activitytype/new
defaults: { _controller: "ChillActivityBundle:ActivityType:new" } defaults: { _controller: "ChillActivityBundle:ActivityType:new" }
activitytype_create: chill_activity_activitytype_create:
path: /create path: /{_locale}/admin/activitytype/create
defaults: { _controller: "ChillActivityBundle:ActivityType:create" } defaults: { _controller: "ChillActivityBundle:ActivityType:create" }
methods: POST methods: POST
activitytype_edit: chill_activity_activitytype_edit:
path: /{id}/edit path: /{_locale}/admin/activitytype/{id}/edit
defaults: { _controller: "ChillActivityBundle:ActivityType:edit" } defaults: { _controller: "ChillActivityBundle:ActivityType:edit" }
activitytype_update: chill_activity_activitytype_update:
path: /{id}/update path: /{_locale}/admin/activitytype/{id}/update
defaults: { _controller: "ChillActivityBundle:ActivityType:update" } defaults: { _controller: "ChillActivityBundle:ActivityType:update" }
methods: [POST, PUT] methods: [POST, PUT]
activitytype_delete: chill_activity_activitytype_delete:
path: /{id}/delete path: /{_locale}/admin/activitytype/{id}/delete
defaults: { _controller: "ChillActivityBundle:ActivityType:delete" } defaults: { _controller: "ChillActivityBundle:ActivityType:delete" }
methods: [POST, DELETE] methods: [POST, DELETE]

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreason') }}"> <a href="{{ path('chill_activity_activityreason') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -15,16 +15,16 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('activityreason_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td> <td><a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td> <td>{{ entity.label }}</td>
<td>{{ entity.active }}</td> <td>{{ entity.active }}</td>
<td> <td>
<ul> <ul>
<li> <li>
<a href="{{ path('activityreason_show', { 'id': entity.id }) }}">show</a> <a href="{{ path('chill_activity_activityreason_show', { 'id': entity.id }) }}">show</a>
</li> </li>
<li> <li>
<a href="{{ path('activityreason_edit', { 'id': entity.id }) }}">edit</a> <a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">edit</a>
</li> </li>
</ul> </ul>
</td> </td>
@ -35,7 +35,7 @@
<ul> <ul>
<li> <li>
<a href="{{ path('activityreason_new') }}"> <a href="{{ path('chill_activity_activityreason_new') }}">
Create a new entry Create a new entry
</a> </a>
</li> </li>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreason') }}"> <a href="{{ path('chill_activity_activityreason') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -22,12 +22,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreason') }}"> <a href="{{ path('chill_activity_activityreason') }}">
Back to the list Back to the list
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('activityreason_edit', { 'id': entity.id }) }}"> <a href="{{ path('chill_activity_activityreason_edit', { 'id': entity.id }) }}">
Edit Edit
</a> </a>
</li> </li>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreasoncategory') }}"> <a href="{{ path('chill_activity_activityreasoncategory') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -15,16 +15,16 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('activityreasoncategory_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td> <td><a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.label }}</td> <td>{{ entity.label }}</td>
<td>{{ entity.active }}</td> <td>{{ entity.active }}</td>
<td> <td>
<ul> <ul>
<li> <li>
<a href="{{ path('activityreasoncategory_show', { 'id': entity.id }) }}">show</a> <a href="{{ path('chill_activity_activityreasoncategory_show', { 'id': entity.id }) }}">show</a>
</li> </li>
<li> <li>
<a href="{{ path('activityreasoncategory_edit', { 'id': entity.id }) }}">edit</a> <a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}">edit</a>
</li> </li>
</ul> </ul>
</td> </td>
@ -35,7 +35,7 @@
<ul> <ul>
<li> <li>
<a href="{{ path('activityreasoncategory_new') }}"> <a href="{{ path('chill_activity_activityreasoncategory_new') }}">
Create a new entry Create a new entry
</a> </a>
</li> </li>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreasoncategory') }}"> <a href="{{ path('chill_activity_activityreasoncategory') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -22,12 +22,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activityreasoncategory') }}"> <a href="{{ path('chill_activity_activityreasoncategory') }}">
Back to the list Back to the list
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('activityreasoncategory_edit', { 'id': entity.id }) }}"> <a href="{{ path('chill_activity_activityreasoncategory_edit', { 'id': entity.id }) }}">
Edit Edit
</a> </a>
</li> </li>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activitytype') }}"> <a href="{{ path('chill_activity_activitytype') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -14,15 +14,15 @@
<tbody> <tbody>
{% for entity in entities %} {% for entity in entities %}
<tr> <tr>
<td><a href="{{ path('activitytype_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td> <td><a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.name }}</td> <td>{{ entity.name }}</td>
<td> <td>
<ul> <ul>
<li> <li>
<a href="{{ path('activitytype_show', { 'id': entity.id }) }}">show</a> <a href="{{ path('chill_activity_activitytype_show', { 'id': entity.id }) }}">show</a>
</li> </li>
<li> <li>
<a href="{{ path('activitytype_edit', { 'id': entity.id }) }}">edit</a> <a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}">edit</a>
</li> </li>
</ul> </ul>
</td> </td>
@ -33,7 +33,7 @@
<ul> <ul>
<li> <li>
<a href="{{ path('activitytype_new') }}"> <a href="{{ path('chill_activity_activitytype_new') }}">
Create a new entry Create a new entry
</a> </a>
</li> </li>

View File

@ -7,7 +7,7 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activitytype') }}"> <a href="{{ path('chill_activity_activitytype') }}">
Back to the list Back to the list
</a> </a>
</li> </li>

View File

@ -18,12 +18,12 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a href="{{ path('activitytype') }}"> <a href="{{ path('chill_activity_activitytype') }}">
Back to the list Back to the list
</a> </a>
</li> </li>
<li> <li>
<a href="{{ path('activitytype_edit', { 'id': entity.id }) }}"> <a href="{{ path('chill_activity_activitytype_edit', { 'id': entity.id }) }}">
Edit Edit
</a> </a>
</li> </li>