From 58cef289674717027b6b470044504a661f3bd9ad Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Sat, 6 Feb 2016 18:08:41 -0500
Subject: The date time format can be chosen in application settings
---
app/Template/app/notifications.php | 2 +-
app/Template/app/tasks.php | 2 +-
app/Template/board/task_footer.php | 2 +-
app/Template/board/tooltip_comments.php | 2 +-
app/Template/comment/show.php | 2 +-
app/Template/config/application.php | 6 ++++++
app/Template/event/events.php | 2 +-
app/Template/file/show.php | 4 ++--
app/Template/listing/show.php | 2 +-
app/Template/notification/task_create.php | 4 ++--
app/Template/notification/task_overdue.php | 2 +-
app/Template/project/index.php | 4 ++--
app/Template/project/show.php | 6 +++---
app/Template/project_user/tasks.php | 4 ++--
app/Template/search/results.php | 2 +-
app/Template/task/changes.php | 4 ++--
app/Template/task/details.php | 12 ++++++------
app/Template/task/time_tracking_details.php | 4 ++--
app/Template/task/transitions.php | 2 +-
app/Template/task_external_link/show.php | 2 +-
app/Template/user/last.php | 2 +-
app/Template/user/password_reset.php | 4 ++--
app/Template/user/sessions.php | 4 ++--
app/Template/user/timesheet.php | 4 ++--
24 files changed, 45 insertions(+), 39 deletions(-)
(limited to 'app/Template')
diff --git a/app/Template/app/notifications.php b/app/Template/app/notifications.php
index 511f377b..4cb3c571 100644
--- a/app/Template/app/notifications.php
+++ b/app/Template/app/notifications.php
@@ -49,7 +49,7 @@
- = dt('%B %e, %Y at %k:%M %p', $notification['date_creation']) ?>
+ = $this->dt->datetime($notification['date_creation']) ?>
|
diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php
index f4f9b2ad..786d7159 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/app/tasks.php
@@ -33,7 +33,7 @@
|
- = dt('%B %e, %Y', $task['date_due']) ?>
+ = $this->dt->date($task['date_due']) ?>
|
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index 1912dd83..73e68602 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -22,7 +22,7 @@
- = (date('Y') === date('Y', $task['date_due']) ? dt('%b %e', $task['date_due']) : dt('%b %e %Y', $task['date_due'])) ?>
+ = $this->dt->date($task['date_due']) ?>
diff --git a/app/Template/board/tooltip_comments.php b/app/Template/board/tooltip_comments.php
index 2e2c0c1e..ca91e13f 100644
--- a/app/Template/board/tooltip_comments.php
+++ b/app/Template/board/tooltip_comments.php
@@ -4,7 +4,7 @@
@
-
+
= $this->e($file['name']) ?>
- '.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).'
'.t('size: %s', $this->text->bytes($file['size'])) ?>'>
+ '.t('uploaded on: %s', $this->dt->datetime($file['date'])).'
'.t('size: %s', $this->text->bytes($file['size'])) ?>'>
@@ -38,7 +38,7 @@
|
= $this->e($file['name']) ?>
- '.t('uploaded on: %s', dt('%B %e, %Y at %k:%M %p', $file['date'])).' '.t('size: %s', $this->text->bytes($file['size'])) ?>'>
+ '.t('uploaded on: %s', $this->dt->datetime($file['date'])).' '.t('size: %s', $this->text->bytes($file['size'])) ?>'>
|
diff --git a/app/Template/listing/show.php b/app/Template/listing/show.php
index c24110f4..e7aa5947 100644
--- a/app/Template/listing/show.php
+++ b/app/Template/listing/show.php
@@ -43,7 +43,7 @@
- = dt('%B %e, %Y', $task['date_due']) ?>
+ = $this->dt->date($task['date_due']) ?>
|
diff --git a/app/Template/notification/task_create.php b/app/Template/notification/task_create.php
index 1d834d44..fb7898fc 100644
--- a/app/Template/notification/task_create.php
+++ b/app/Template/notification/task_create.php
@@ -2,11 +2,11 @@
-
- = dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
+ = t('Created:').' '.$this->dt->datetime($task['date_creation']) ?>
-
- = dt('Must be done before %B %e, %Y', $task['date_due']) ?>
+ = t('Due date:').' '.$this->dt->date($task['date_due']) ?>
diff --git a/app/Template/notification/task_overdue.php b/app/Template/notification/task_overdue.php
index a231937b..d7e6ff5a 100644
--- a/app/Template/notification/task_overdue.php
+++ b/app/Template/notification/task_overdue.php
@@ -9,7 +9,7 @@
= $this->e($task['title']) ?>
- (= dt('%B %e, %Y', $task['date_due']) ?>)
+ (= $this->dt->date($task['date_due']) ?>)
(= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>)
diff --git a/app/Template/project/index.php b/app/Template/project/index.php
index c5dd267c..8d384e58 100644
--- a/app/Template/project/index.php
+++ b/app/Template/project/index.php
@@ -57,10 +57,10 @@
= $this->url->link($this->e($project['name']), 'project', 'show', array('project_id' => $project['id'])) ?>
|
- = $project['start_date'] ?>
+ = $this->dt->date($project['start_date']) ?>
|
- = $project['end_date'] ?>
+ = $this->dt->date($project['end_date']) ?>
|
0): ?>
diff --git a/app/Template/project/show.php b/app/Template/project/show.php
index 5f1aefc1..166b8902 100644
--- a/app/Template/project/show.php
+++ b/app/Template/project/show.php
@@ -21,15 +21,15 @@
- = dt('Last modified on %B %e, %Y at %k:%M %p', $project['last_modified']) ?>
+ = t('Modified:').' '.$this->dt->datetime($project['last_modified']) ?>
- = t('Start date: %s', $project['start_date']) ?>
+ = t('Start date: ').$this->dt->date($project['start_date']) ?>
- = t('End date: %s', $project['end_date']) ?>
+ = t('End date: ').$this->dt->date($project['end_date']) ?>
0): ?>
diff --git a/app/Template/project_user/tasks.php b/app/Template/project_user/tasks.php
index f4fc2723..8d1cbd96 100644
--- a/app/Template/project_user/tasks.php
+++ b/app/Template/project_user/tasks.php
@@ -33,10 +33,10 @@
|
- = dt('%B %e, %Y', $task['date_started']) ?>
+ = $this->dt->date($task['date_started']) ?>
|
- = dt('%B %e, %Y', $task['date_due']) ?>
+ = $this->dt->date($task['date_due']) ?>
|
diff --git a/app/Template/search/results.php b/app/Template/search/results.php
index 88eed87c..3bb0e603 100644
--- a/app/Template/search/results.php
+++ b/app/Template/search/results.php
@@ -38,7 +38,7 @@
- = dt('%B %e, %Y', $task['date_due']) ?>
+ = $this->dt->date($task['date_due']) ?>
|
diff --git a/app/Template/task/changes.php b/app/Template/task/changes.php
index f288a8f4..db844857 100644
--- a/app/Template/task/changes.php
+++ b/app/Template/task/changes.php
@@ -31,7 +31,7 @@
if (empty($task['date_due'])) {
echo ''.t('The due date have been removed').'';
} else {
- echo ''.dt('New due date: %B %e, %Y', $task['date_due']).'';
+ echo ''.t('New due date: ').$this->dt->date($task['date_due']).'';
}
break;
case 'description':
@@ -56,7 +56,7 @@
break;
case 'date_started':
if ($value != 0) {
- echo ''.dt('Start date changed: %B %e, %Y', $task['date_started']).'';
+ echo ''.t('Start date changed: ').$this->dt->datetime($task['date_started']).'';
}
break;
default:
diff --git a/app/Template/task/details.php b/app/Template/task/details.php
index 838eb260..5c2e3cff 100644
--- a/app/Template/task/details.php
+++ b/app/Template/task/details.php
@@ -79,7 +79,7 @@
= t('Due date:') ?>
- = dt('%B %e, %Y', $task['date_due']) ?>
+ = $this->dt->date($task['date_due']) ?>
@@ -100,28 +100,28 @@
-
= t('Created:') ?>
- = dt('%B %e, %Y at %k:%M %p', $task['date_creation']) ?>
+ = $this->dt->datetime($task['date_creation']) ?>
-
= t('Modified:') ?>
- = dt('%B %e, %Y at %k:%M %p', $task['date_modification']) ?>
+ = $this->dt->datetime($task['date_modification']) ?>
-
= t('Completed:') ?>
- = dt('%B %e, %Y at %k:%M %p', $task['date_completed']) ?>
+ = $this->dt->datetime($task['date_completed']) ?>
-
= t('Started:') ?>
- = dt('%B %e, %Y at %k:%M %p', $task['date_started']) ?>
+ = $this->dt->datetime($task['date_started']) ?>
-
= t('Moved:') ?>
- = dt('%B %e, %Y at %k:%M %p', $task['date_moved']) ?>
+ = $this->dt->datetime($task['date_moved']) ?>
diff --git a/app/Template/task/time_tracking_details.php b/app/Template/task/time_tracking_details.php
index 85ad5567..147c5109 100644
--- a/app/Template/task/time_tracking_details.php
+++ b/app/Template/task/time_tracking_details.php
@@ -16,8 +16,8 @@
|
= $this->url->link($this->e($record['user_fullname'] ?: $record['username']), 'user', 'show', array('user_id' => $record['user_id'])) ?> |
= t($record['subtask_title']) ?> |
- = dt('%B %e, %Y at %k:%M %p', $record['start']) ?> |
- = dt('%B %e, %Y at %k:%M %p', $record['end']) ?> |
+ = $this->dt->datetime($record['start']) ?> |
+ = $this->dt->datetime($record['end']) ?> |
= n($record['time_spent']).' '.t('hours') ?> |
diff --git a/app/Template/task/transitions.php b/app/Template/task/transitions.php
index 2ca2387f..d79c2fd9 100644
--- a/app/Template/task/transitions.php
+++ b/app/Template/task/transitions.php
@@ -15,7 +15,7 @@
- = dt('%B %e, %Y at %k:%M %p', $transition['date']) ?> |
+ = $this->dt->datetime($transition['date']) ?> |
= $this->e($transition['src_column']) ?> |
= $this->e($transition['dst_column']) ?> |
= $this->url->link($this->e($transition['name'] ?: $transition['username']), 'user', 'show', array('user_id' => $transition['user_id'])) ?> |
diff --git a/app/Template/task_external_link/show.php b/app/Template/task_external_link/show.php
index 2dc3d1dd..12d8e4f6 100644
--- a/app/Template/task_external_link/show.php
+++ b/app/Template/task_external_link/show.php
@@ -31,7 +31,7 @@
= $this->e($link['creator_name'] ?: $link['creator_username']) ?>
- = dt('%B %e, %Y', $link['date_creation']) ?>
+ = $this->dt->date($link['date_creation']) ?>
|
user->hasProjectAccess('TaskExternalLink', 'edit', $task['project_id'])): ?>
diff --git a/app/Template/user/last.php b/app/Template/user/last.php
index 8879466e..d6c86391 100644
--- a/app/Template/user/last.php
+++ b/app/Template/user/last.php
@@ -14,7 +14,7 @@
|
- = dt('%B %e, %Y at %k:%M %p', $login['date_creation']) ?> |
+ = $this->dt->datetime($login['date_creation']) ?> |
= $this->e($login['auth_type']) ?> |
= $this->e($login['ip']) ?> |
= $this->e($login['user_agent']) ?> |
diff --git a/app/Template/user/password_reset.php b/app/Template/user/password_reset.php
index b4c9a0c4..4e9063ef 100644
--- a/app/Template/user/password_reset.php
+++ b/app/Template/user/password_reset.php
@@ -15,8 +15,8 @@
- = dt('%B %e, %Y at %k:%M %p', $token['date_creation']) ?> |
- = dt('%B %e, %Y at %k:%M %p', $token['date_expiration']) ?> |
+ = $this->dt->datetime($token['date_creation']) ?> |
+ = $this->dt->datetime($token['date_expiration']) ?> |
= $token['is_active'] == 0 ? t('No') : t('Yes') ?> |
= $this->e($token['ip']) ?> |
= $this->e($token['user_agent']) ?> |
diff --git a/app/Template/user/sessions.php b/app/Template/user/sessions.php
index 7a66c5ad..8db02430 100644
--- a/app/Template/user/sessions.php
+++ b/app/Template/user/sessions.php
@@ -15,8 +15,8 @@
- = dt('%B %e, %Y at %k:%M %p', $session['date_creation']) ?> |
- = dt('%B %e, %Y at %k:%M %p', $session['expiration']) ?> |
+ = $this->dt->datetime($session['date_creation']) ?> |
+ = $this->dt->datetime($session['expiration']) ?> |
= $this->e($session['ip']) ?> |
= $this->e($session['user_agent']) ?> |
= $this->url->link(t('Remove'), 'User', 'removeSession', array('user_id' => $user['id'], 'id' => $session['id']), true) ?> |
diff --git a/app/Template/user/timesheet.php b/app/Template/user/timesheet.php
index 5c0d3af8..4a6e42c5 100644
--- a/app/Template/user/timesheet.php
+++ b/app/Template/user/timesheet.php
@@ -18,8 +18,8 @@
= $this->url->link($this->e($record['task_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> |
= $this->url->link($this->e($record['subtask_title']), 'task', 'show', array('project_id' => $record['project_id'], 'task_id' => $record['task_id'])) ?> |
- = dt('%B %e, %Y at %k:%M %p', $record['start']) ?> |
- = dt('%B %e, %Y at %k:%M %p', $record['end']) ?> |
+ = $this->dt->datetime($record['start']) ?> |
+ = $this->dt->datetime($record['end']) ?> |
= n($record['time_spent']).' '.t('hours') ?> |
--
cgit v1.2.3
= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?>
+ = $this->form->label(t('Date and time format'), 'application_datetime_format') ?> + = $this->form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> + + = $this->form->label(t('Time format'), 'application_time_format') ?> + = $this->form->select('application_time_format', $time_formats, $values, $errors) ?> + = $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> = $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> diff --git a/app/Template/event/events.php b/app/Template/event/events.php index aec0b29e..bbb01be4 100644 --- a/app/Template/event/events.php +++ b/app/Template/event/events.php @@ -14,7 +14,7 @@ text->contains($event['event_name'], 'comment')): ?> - = dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?> + = $this->dt->datetime($event['date_creation']) ?>