From e5c63f4ecc78e144659bf83947a19d996f60b490 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 6 Nov 2016 20:08:36 -0500 Subject: Load external tasks asynchronously from task view page --- app/Controller/ExternalTaskViewController.php | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/Controller/ExternalTaskViewController.php (limited to 'app/Controller') diff --git a/app/Controller/ExternalTaskViewController.php b/app/Controller/ExternalTaskViewController.php new file mode 100644 index 00000000..4ffc4763 --- /dev/null +++ b/app/Controller/ExternalTaskViewController.php @@ -0,0 +1,30 @@ +getTask(); + $taskProvider = $this->externalTaskManager->getProvider($task['external_provider']); + $externalTask = $taskProvider->retrieve($task['external_uri']); + + $this->response->html($this->template->render($taskProvider->getViewTemplate(), array( + 'task' => $task, + 'external_task' => $externalTask, + ))); + } catch (ExternalTaskException $e) { + $this->response->html('
'.$e->getMessage().'
'); + } + } +} -- cgit v1.2.3