show -> view

This commit is contained in:
Marc Ducobu 2014-11-12 12:39:52 +01:00
parent 1ab9b44737
commit b91776c594
4 changed files with 7 additions and 7 deletions

View File

@ -146,7 +146,7 @@ class ReportController extends Controller
$em->persist($entity); $em->persist($entity);
$em->flush(); $em->flush();
return $this->redirect($this->generateUrl('report_show', return $this->redirect($this->generateUrl('report_view',
array('person_id' => $person_id,'report_id' => $entity->getId()))); array('person_id' => $person_id,'report_id' => $entity->getId())));
} }
@ -182,7 +182,7 @@ class ReportController extends Controller
* Finds and displays a Report entity. * Finds and displays a Report entity.
* *
*/ */
public function showAction($report_id, $person_id) public function viewAction($report_id, $person_id)
{ {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
@ -194,7 +194,7 @@ class ReportController extends Controller
throw $this->createNotFoundException('Unable to find Report entity.'); throw $this->createNotFoundException('Unable to find Report entity.');
} }
return $this->render('ChillReportBundle:Report:show.html.twig', array( return $this->render('ChillReportBundle:Report:view.html.twig', array(
'entity' => $entity, 'entity' => $entity,
'person' => $person, 'person' => $person,
)); ));

View File

@ -23,9 +23,9 @@ report_list:
person: person:
order: 101 order: 101
label: Report list label: Report list
report_show: report_view:
path: /person/{person_id}/report/{report_id}/show path: /person/{person_id}/report/{report_id}/view
defaults: { _controller: "ChillReportBundle:Report:show" } defaults: { _controller: "ChillReportBundle:Report:view" }
report_edit: report_edit:
path: /person/{person_id}/report/{report_id}/edit path: /person/{person_id}/report/{report_id}/edit

View File

@ -37,7 +37,7 @@
<td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td> <td>{% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %}</td>
<td>{{ report.cFGroup.getName(app.request.locale) }}</td> <td>{{ report.cFGroup.getName(app.request.locale) }}</td>
<td>{{ report.scope }}</td> <td>{{ report.scope }}</td>
<td><a href="{{ path('report_show', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View' | trans }}</a></td> <td><a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'View' | trans }}</a></td>
<td><a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'Update' | trans }}</a></td> <td><a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}">{{ 'Update' | trans }}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}