|
@@ 301-323 (lines=23) @@
|
| 298 |
|
* @Route("/estudiantes/detalle/{id}", name="my_student_detail", methods={"GET"}) |
| 299 |
|
* @Security("is_granted('AGREEMENT_ACCESS', agreement)") |
| 300 |
|
*/ |
| 301 |
|
public function myStudentDetailAction(Agreement $agreement) |
| 302 |
|
{ |
| 303 |
|
$student = $agreement->getStudent(); |
| 304 |
|
$form = $this->createForm('AppBundle\Form\Type\StudentUserType', $student, [ |
| 305 |
|
'admin' => false, |
| 306 |
|
'disabled' => true |
| 307 |
|
]); |
| 308 |
|
|
| 309 |
|
return $this->render('student/student_detail.html.twig', |
| 310 |
|
[ |
| 311 |
|
'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('my_student_index'), |
| 312 |
|
'breadcrumb' => [ |
| 313 |
|
['fixed' => $agreement->getStudent()->getFullDisplayName(), 'path' => 'my_student_agreements', 'options' => ['id' => $agreement->getStudent()->getId()]], |
| 314 |
|
['fixed' => (string) $agreement->getWorkcenter(), 'path' => 'my_student_agreement_calendar', 'options' => ['id' => $agreement->getId()]], |
| 315 |
|
['fixed' => $this->get('translator')->trans('student.detail', [], 'group')] |
| 316 |
|
], |
| 317 |
|
'title' => (string) $student, |
| 318 |
|
'user' => $student, |
| 319 |
|
'agreement' => $agreement, |
| 320 |
|
'form' => $form->createView(), |
| 321 |
|
'back' => 'my_student_agreement_calendar' |
| 322 |
|
]); |
| 323 |
|
} |
| 324 |
|
|
| 325 |
|
/** |
| 326 |
|
* @Route("/estudiantes/centro/{id}", name="workcenter_detail", methods={"GET"}) |
|
@@ 329-350 (lines=22) @@
|
| 326 |
|
* @Route("/estudiantes/centro/{id}", name="workcenter_detail", methods={"GET"}) |
| 327 |
|
* @Security("is_granted('AGREEMENT_ACCESS', agreement)") |
| 328 |
|
*/ |
| 329 |
|
public function workCenterDetailAction(Agreement $agreement) |
| 330 |
|
{ |
| 331 |
|
$workcenter = $agreement->getWorkcenter(); |
| 332 |
|
$form = $this->createForm('AppBundle\Form\Type\WorkcenterType', $workcenter, [ |
| 333 |
|
'disabled' => true |
| 334 |
|
]); |
| 335 |
|
|
| 336 |
|
return $this->render('student/workcenter_detail.html.twig', |
| 337 |
|
[ |
| 338 |
|
'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('my_student_index'), |
| 339 |
|
'breadcrumb' => [ |
| 340 |
|
['fixed' => $agreement->getStudent()->getFullDisplayName(), 'path' => 'my_student_agreements', 'options' => ['id' => $agreement->getStudent()->getId()]], |
| 341 |
|
['fixed' => (string) $agreement->getWorkcenter(), 'path' => 'my_student_agreement_calendar', 'options' => ['id' => $agreement->getId()]], |
| 342 |
|
['fixed' => $this->get('translator')->trans('form.workcenter', [], 'company')] |
| 343 |
|
], |
| 344 |
|
'title' => (string) $workcenter, |
| 345 |
|
'workcenter' => $workcenter, |
| 346 |
|
'agreement' => $agreement, |
| 347 |
|
'form' => $form->createView(), |
| 348 |
|
'back' => 'my_student_agreement_calendar' |
| 349 |
|
]); |
| 350 |
|
} |
| 351 |
|
|
| 352 |
|
private function attendanceForm(Request $request, Agreement $agreement, Form $form) |
| 353 |
|
{ |