Add subtasks and comments history

This commit is contained in:
Frédéric Guillot
2014-09-10 16:21:47 +02:00
parent 9bde377bbe
commit 28ff8dad91
29 changed files with 822 additions and 136 deletions

View File

@@ -28,6 +28,8 @@ use Model\LastLogin;
* @property \Model\SubTask $subTask
* @property \Model\Task $task
* @property \Model\TaskHistory $taskHistory
* @property \Model\CommentHistory $commentHistory
* @property \Model\SubtaskHistory $subtaskHistory
* @property \Model\User $user
* @property \Model\Webhook $webhook
*/
@@ -131,11 +133,29 @@ abstract class Base
}
// Attach events
$this->action->attachEvents();
$this->project->attachEvents();
$this->webhook->attachEvents();
$this->notification->attachEvents();
$this->taskHistory->attachEvents();
$this->attachEvents();
}
/**
* Attach events
*
* @access private
*/
private function attachEvents()
{
$models = array(
'action',
'project',
'webhook',
'notification',
'taskHistory',
'commentHistory',
'subtaskHistory',
);
foreach ($models as $model) {
$this->$model->attachEvents();
}
}
/**

View File

@@ -72,7 +72,6 @@ class Project extends Base
$to = $this->request->getStringParam('to');
if ($from && $to) {
Translator::disableEscaping();
$data = $this->task->export($project['id'], $from, $to);
$this->response->forceDownload('Export_'.date('Y_m_d_H_i_S').'.csv');
$this->response->csv($data);