2014-07-20 12:26:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Controller;
|
|
|
|
|
|
|
|
use Model\Project as ProjectModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Application controller
|
|
|
|
*
|
|
|
|
* @package controller
|
|
|
|
* @author Frederic Guillot
|
|
|
|
*/
|
|
|
|
class App extends Base
|
|
|
|
{
|
|
|
|
/**
|
2014-11-23 20:13:38 +01:00
|
|
|
* Dashboard for the current user
|
2014-07-20 12:26:15 +02:00
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
2014-11-23 20:13:38 +01:00
|
|
|
$user_id = $this->acl->getUserId();
|
|
|
|
$projects = $this->projectPermission->getAllowedProjects($user_id);
|
|
|
|
|
|
|
|
$this->response->html($this->template->layout('app_index', array(
|
|
|
|
'board_selector' => $projects,
|
|
|
|
'events' => $this->projectActivity->getProjects(array_keys($projects), 10),
|
|
|
|
'tasks' => $this->taskFinder->getAllTasksByUser($user_id),
|
|
|
|
'menu' => 'dashboard',
|
|
|
|
'title' => t('Dashboard'),
|
|
|
|
)));
|
2014-07-20 12:26:15 +02:00
|
|
|
}
|
|
|
|
}
|