mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
add a timeline in view pages for viewing task transitions
This commit is contained in:
@@ -75,7 +75,7 @@ class SingleTaskController extends Controller
|
||||
if ($form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($task);
|
||||
|
||||
|
||||
$dispatcher->dispatch(TaskEvent::PERSIST, new TaskEvent($task));
|
||||
|
||||
$em->flush();
|
||||
@@ -133,8 +133,12 @@ class SingleTaskController extends Controller
|
||||
throw $this->createNotFoundException('Unable to find Task entity.');
|
||||
}
|
||||
|
||||
$timeline = $this->get('chill.main.timeline_builder')
|
||||
->getTimelineHTML('task', array('task' => $task));
|
||||
|
||||
return $this->render('ChillTaskBundle:SingleTask:show.html.twig', array(
|
||||
'task' => $task,
|
||||
'timeline' => $timeline
|
||||
));
|
||||
}
|
||||
|
||||
@@ -146,8 +150,8 @@ class SingleTaskController extends Controller
|
||||
* )
|
||||
*/
|
||||
public function editAction(
|
||||
Request $request,
|
||||
$id,
|
||||
Request $request,
|
||||
$id,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
/* @var $taskRepository SingleTaskRepository */
|
||||
@@ -213,7 +217,7 @@ class SingleTaskController extends Controller
|
||||
* )
|
||||
*/
|
||||
public function deleteAction(
|
||||
Request $request,
|
||||
Request $request,
|
||||
$id,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
@@ -221,7 +225,7 @@ class SingleTaskController extends Controller
|
||||
$taskRepository = $this->get('chill_task.single_task_repository');
|
||||
|
||||
$task = $taskRepository->find($id);
|
||||
|
||||
|
||||
if (!$task) {
|
||||
throw $this->createNotFoundException('Unable to find Task entity.');
|
||||
}
|
||||
@@ -321,18 +325,18 @@ class SingleTaskController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Arguments:
|
||||
* - user_id
|
||||
* - scope_id
|
||||
* - person_id
|
||||
* - hide_form (hide the form to filter the tasks)
|
||||
* - status: date state, amongst SingleTaskRepository::DATE_STATUSES, or 'closed'
|
||||
*
|
||||
*
|
||||
* @Route(
|
||||
* "/{_locale}/task/singletask/list",
|
||||
* name="chill_task_singletask_list",
|
||||
* options={ "menus": {
|
||||
* options={ "menus": {
|
||||
* "person" : { "order": 400, "label": "Associated tasks" } ,
|
||||
* "section": { "order": 400, "label": "Tasks", "icons": "tasks" }
|
||||
* }}
|
||||
@@ -354,7 +358,7 @@ class SingleTaskController extends Controller
|
||||
$params['user'] = null;
|
||||
$viewParams['center'] = null;
|
||||
$params['center'] = null;
|
||||
|
||||
|
||||
// Get parameters from url
|
||||
if (!empty($request->query->get('person_id', NULL))) {
|
||||
$personId = $request->query->getInt('person_id');
|
||||
@@ -469,7 +473,7 @@ class SingleTaskController extends Controller
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
return $this->render('ChillTaskBundle:SingleTask:index.html.twig',
|
||||
return $this->render('ChillTaskBundle:SingleTask:index.html.twig',
|
||||
\array_merge($viewParams, [ 'form' => $form->createView() ]));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user