diff --git a/Controller/ReportController.php b/Controller/ReportController.php index 8da41ce0d..8d505eecf 100644 --- a/Controller/ReportController.php +++ b/Controller/ReportController.php @@ -146,7 +146,7 @@ class ReportController extends Controller $em->persist($entity); $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()))); } @@ -182,7 +182,7 @@ class ReportController extends Controller * Finds and displays a Report entity. * */ - public function showAction($report_id, $person_id) + public function viewAction($report_id, $person_id) { $em = $this->getDoctrine()->getManager(); @@ -194,7 +194,7 @@ class ReportController extends Controller 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, 'person' => $person, )); diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index c4c9ab1a2..2e1ae0198 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -23,9 +23,9 @@ report_list: person: order: 101 label: Report list -report_show: - path: /person/{person_id}/report/{report_id}/show - defaults: { _controller: "ChillReportBundle:Report:show" } +report_view: + path: /person/{person_id}/report/{report_id}/view + defaults: { _controller: "ChillReportBundle:Report:view" } report_edit: path: /person/{person_id}/report/{report_id}/edit diff --git a/Resources/views/Report/list.html.twig b/Resources/views/Report/list.html.twig index a14b373e8..fcc9eb600 100644 --- a/Resources/views/Report/list.html.twig +++ b/Resources/views/Report/list.html.twig @@ -37,7 +37,7 @@ {% if report.date %}{{ report.date|date('d-m-Y') }}{% endif %} {{ report.cFGroup.getName(app.request.locale) }} {{ report.scope }} - {{ 'View' | trans }} + {{ 'View' | trans }} {{ 'Update' | trans }} {% endfor %} diff --git a/Resources/views/Report/show.html.twig b/Resources/views/Report/view.html.twig similarity index 100% rename from Resources/views/Report/show.html.twig rename to Resources/views/Report/view.html.twig