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->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(
@ -63,7 +63,7 @@ class ActivityReasonCategoryController extends Controller
private function createCreateForm(ActivityReasonCategory $entity)
{
$form = $this->createForm(new ActivityReasonCategoryType(), $entity, array(
'action' => $this->generateUrl('activityreasoncategory_create'),
'action' => $this->generateUrl('chill_activity_activityreasoncategory_create'),
'method' => 'POST',
));
@ -143,7 +143,7 @@ class ActivityReasonCategoryController extends Controller
private function createEditForm(ActivityReasonCategory $entity)
{
$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',
));
@ -172,7 +172,7 @@ class ActivityReasonCategoryController extends Controller
if ($editForm->isValid()) {
$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(
@ -202,7 +202,7 @@ class ActivityReasonCategoryController extends Controller
$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)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('activityreasoncategory_delete', array('id' => $id)))
->setAction($this->generateUrl('chill_activity_activityreasoncategory_delete', array('id' => $id)))
->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete'))
->getForm()

View File

@ -44,7 +44,7 @@ class ActivityReasonController extends Controller
$em->persist($entity);
$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(
@ -63,7 +63,7 @@ class ActivityReasonController extends Controller
private function createCreateForm(ActivityReason $entity)
{
$form = $this->createForm(new ActivityReasonType(), $entity, array(
'action' => $this->generateUrl('activityreason_create'),
'action' => $this->generateUrl('chill_activity_activityreason_create'),
'method' => 'POST',
));
@ -143,7 +143,7 @@ class ActivityReasonController extends Controller
private function createEditForm(ActivityReason $entity)
{
$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',
));
@ -172,7 +172,7 @@ class ActivityReasonController extends Controller
if ($editForm->isValid()) {
$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(
@ -202,7 +202,7 @@ class ActivityReasonController extends Controller
$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)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('activityreason_delete', array('id' => $id)))
->setAction($this->generateUrl('chill_activity_activityreason_delete', array('id' => $id)))
->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete'))
->getForm()

View File

@ -44,7 +44,7 @@ class ActivityTypeController extends Controller
$em->persist($entity);
$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(
@ -63,7 +63,7 @@ class ActivityTypeController extends Controller
private function createCreateForm(ActivityType $entity)
{
$form = $this->createForm(new ActivityTypeType(), $entity, array(
'action' => $this->generateUrl('activitytype_create'),
'action' => $this->generateUrl('chill_activity_activitytype_create'),
'method' => 'POST',
));
@ -143,7 +143,7 @@ class ActivityTypeController extends Controller
private function createEditForm(ActivityType $entity)
{
$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',
));
@ -172,7 +172,7 @@ class ActivityTypeController extends Controller
if ($editForm->isValid()) {
$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(
@ -202,7 +202,7 @@ class ActivityTypeController extends Controller
$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)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('activitytype_delete', array('id' => $id)))
->setAction($this->generateUrl('chill_activity_activitytype_delete', array('id' => $id)))
->setMethod('DELETE')
->add('submit', 'submit', array('label' => 'Delete'))
->getForm()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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