Esempio n. 1
0
 public function executeDelete()
 {
     $task = TaskPeer::retrieveByUuid($this->getRequestParameter('task'));
     $this->forward404Unless($task);
     $task->delete();
     return $this->redirect($this->getRequest()->getReferer());
 }
Esempio n. 2
0
 public function executeAjaxSetTaskStatus()
 {
     //[0]Complete|[1]In Progress|[2]Pending/Planning|(2,+Inf]Unknown task status code
     $task = TaskPeer::retrieveByUuid($this->getRequestParameter('task'));
     $this->forward404Unless($task, 'Task not found in action, unable to update status');
     $status = $this->getRequestParameter('task-status');
     $this->forward404Unless(is_numeric($status));
     if ($task->isAuthorized()) {
         $this->logMessage('Unauthorize to make changes to task');
         $task->setStatus($status);
         $task->save();
     } else {
         $this->logMessage('Unauthorize to make changes to task');
     }
     $this->task = $task;
     $this->projectUsers = $this->task->getProject()->getApprovedUsers();
 }
Esempio n. 3
0
 public function executeFileBrowser()
 {
     $filter = $this->getRequestParameter('filter');
     $category = $this->getRequestParameter('category');
     $type = $this->getRequestParameter('type');
     $object_uuid = $this->getRequestParameter('id');
     if ($type == 'task') {
         $object = TaskPeer::retrieveByUuid($object_uuid);
     }
     $this->files = sfFileGalleryPeer::getFiles($type, $object->getId());
 }