summaryrefslogtreecommitdiff
path: root/app/Helper/TaskHelper.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Helper/TaskHelper.php')
-rw-r--r--app/Helper/TaskHelper.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Helper/TaskHelper.php b/app/Helper/TaskHelper.php
index 3b9e9745..065ece10 100644
--- a/app/Helper/TaskHelper.php
+++ b/app/Helper/TaskHelper.php
@@ -220,6 +220,21 @@ class TaskHelper extends Base
return $html;
}
+ public function renderReference(array $task)
+ {
+ if (! empty($task['reference'])) {
+ $reference = $this->helper->text->e($task['reference']);
+
+ if (filter_var($task['reference'], FILTER_VALIDATE_URL) !== false) {
+ return sprintf('<a href="%s" target=_blank">%s</a>', $reference, $reference);
+ }
+
+ return $reference;
+ }
+
+ return '';
+ }
+
public function getProgress($task)
{
if (! isset($this->columns[$task['project_id']])) {