From 5e2e0272ed78e3b729d5673da3e957ce68a30fa2 Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Sat, 8 Oct 2016 09:53:46 -0400
Subject: Send absolute links in email notifications
---
app/Template/notification/footer.php | 4 ++--
app/Template/notification/task_internal_link_create_update.php | 2 +-
app/Template/notification/task_internal_link_delete.php | 2 +-
app/Template/notification/task_open.php | 2 +-
app/Template/notification/task_overdue.php | 8 ++++----
app/Template/task_internal_link/table.php | 10 ++++++++--
6 files changed, 17 insertions(+), 11 deletions(-)
(limited to 'app/Template')
diff --git a/app/Template/notification/footer.php b/app/Template/notification/footer.php
index 6ac260cb..da437eea 100644
--- a/app/Template/notification/footer.php
+++ b/app/Template/notification/footer.php
@@ -2,6 +2,6 @@
Kanboard
- - = t('view the task on Kanboard') ?>
- - = t('view the board on Kanboard') ?>
+ - = $this->url->absoluteLink(t('view the task on Kanboard'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ - = $this->url->absoluteLink(t('view the board on Kanboard'), 'BoardViewController', 'show', array('project_id' => $task['project_id'])) ?>
diff --git a/app/Template/notification/task_internal_link_create_update.php b/app/Template/notification/task_internal_link_create_update.php
index 73cad84d..b66a1531 100644
--- a/app/Template/notification/task_internal_link_create_update.php
+++ b/app/Template/notification/task_internal_link_create_update.php
@@ -3,7 +3,7 @@
= e(
'This task is now linked to the task %s with the relation "%s"',
- $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])),
+ $this->url->absoluteLink(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id'])),
$this->text->e($task_link['label'])
) ?>
diff --git a/app/Template/notification/task_internal_link_delete.php b/app/Template/notification/task_internal_link_delete.php
index bb54e0a7..d556fb20 100644
--- a/app/Template/notification/task_internal_link_delete.php
+++ b/app/Template/notification/task_internal_link_delete.php
@@ -4,7 +4,7 @@
= e(
'The link with the relation "%s" to the task %s have been removed',
$this->text->e($task_link['label']),
- $this->url->link(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id']))
+ $this->url->absoluteLink(t('#%d', $task_link['opposite_task_id']), 'TaskViewController', 'show', array('task_id' => $task_link['opposite_task_id']))
) ?>
diff --git a/app/Template/notification/task_open.php b/app/Template/notification/task_open.php
index 6eb4ec08..2c85e9f7 100644
--- a/app/Template/notification/task_open.php
+++ b/app/Template/notification/task_open.php
@@ -2,4 +2,4 @@
= t('The task #%d have been opened.', $task['id']) ?>
-= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
\ No newline at end of file
+= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
diff --git a/app/Template/notification/task_overdue.php b/app/Template/notification/task_overdue.php
index 406e41f7..01ad0a01 100644
--- a/app/Template/notification/task_overdue.php
+++ b/app/Template/notification/task_overdue.php
@@ -13,16 +13,16 @@
#= $task['id'] ?> |
-
- = $this->text->e($task['title']) ?>
+
+ = $this->url->absoluteLink($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
= $this->text->e($task['title']) ?>
|
= $this->dt->date($task['date_due']) ?> |
- = $task['project_name'] ?> |
+ = $this->text->e($task['project_name']) ?> |
-
+
= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
|
diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php
index 6584a33a..3a3a2b88 100644
--- a/app/Template/task_internal_link/table.php
+++ b/app/Template/task_internal_link/table.php
@@ -72,8 +72,14 @@
- - = $this->url->link(t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
- - = $this->url->link(t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+ -
+
+ = $this->url->link(t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
+ -
+
+ = $this->url->link(t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
+
--
cgit v1.2.3