Add projects to the dashboard and rename some methods

This commit is contained in:
Frédéric Guillot
2014-11-09 12:47:49 -05:00
parent e0117cb8ed
commit 3df63e051f
30 changed files with 262 additions and 75 deletions

View File

@@ -146,7 +146,7 @@ class Project extends Base
public function update()
{
$project = $this->getProjectManagement();
$values = $this->request->getValues() + array('is_active' => 0);
$values = $this->request->getValues();
list($valid, $errors) = $this->project->validateModification($values);
if ($valid) {
@@ -527,9 +527,11 @@ class Project extends Base
if ($valid) {
if ($this->project->create($values, $this->acl->getUserId())) {
$project_id = $this->project->create($values, $this->acl->getUserId());
if ($project_id) {
$this->session->flash(t('Your project have been created successfully.'));
$this->response->redirect('?controller=project');
$this->response->redirect('?controller=project&action=show&project_id='.$project_id);
}
else {
$this->session->flashError(t('Unable to create your project.'));