summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Config.php1
-rw-r--r--app/Controller/Project.php2
-rw-r--r--app/Controller/Task.php10
3 files changed, 12 insertions, 1 deletions
diff --git a/app/Controller/Config.php b/app/Controller/Config.php
index 869d4331..7c8373c3 100644
--- a/app/Controller/Config.php
+++ b/app/Controller/Config.php
@@ -78,6 +78,7 @@ class Config extends Base
'title' => t('Application settings'),
'languages' => $this->config->getLanguages(),
'timezones' => $this->config->getTimezones(),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
)));
}
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index 7b174ef4..48f6f10e 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -86,6 +86,8 @@ class Project extends Base
'to' => $to,
),
'errors' => array(),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'projects',
'project' => $project,
'title' => t('Tasks Export')
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index fc7103ef..163929d2 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -92,6 +92,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($project_id),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($project_id),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
)));
@@ -138,6 +140,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($values['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($values['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('New task')
)));
@@ -153,7 +157,7 @@ class Task extends Base
$task = $this->getTask();
if (! empty($task['date_due'])) {
- $task['date_due'] = date(t('m/d/Y'), $task['date_due']);
+ $task['date_due'] = date($this->config->get('application_date_format'), $task['date_due']);
}
else {
$task['date_due'] = '';
@@ -169,6 +173,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($task['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($task['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'ajax' => $ajax,
'menu' => 'tasks',
'title' => t('Edit a task')
@@ -219,6 +225,8 @@ class Task extends Base
'users_list' => $this->projectPermission->getUsersList($values['project_id']),
'colors_list' => $this->color->getList(),
'categories_list' => $this->category->getList($values['project_id']),
+ 'date_format' => $this->config->get('application_date_format'),
+ 'date_formats' => $this->dateParser->getAvailableFormats(),
'menu' => 'tasks',
'title' => t('Edit a task'),
'ajax' => $this->request->isAjax(),