Skip to content

Commit

Permalink
Add HTML tag in email notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Apr 28, 2019
1 parent d6ffe08 commit 11b6bf6
Show file tree
Hide file tree
Showing 22 changed files with 102 additions and 14 deletions.
6 changes: 5 additions & 1 deletion app/Template/notification/comment_create.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<?php if (! empty($comment['username'])): ?>
Expand All @@ -8,4 +10,6 @@

<?= $this->text->markdown($comment['comment'], true) ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/comment_delete.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<h3><?= t('Comment removed') ?></h3>

<?= $this->text->markdown($comment['comment'], true) ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/comment_update.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<h3><?= t('Comment updated') ?></h3>

<?= $this->text->markdown($comment['comment'], true) ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/comment_user_mention.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<html>
<body>
<h2><?= t('You were mentioned in a comment on the task #%d', $task['id']) ?></h2>

<p><?= $this->text->e($task['title']) ?></p>

<?= $this->text->markdown($comment['comment'], true) ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/subtask_create.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<h3><?= t('New sub-task') ?></h3>
Expand All @@ -14,4 +16,6 @@
<?php endif ?>
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/subtask_delete.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<h3><?= t('Subtask removed') ?></h3>
Expand All @@ -9,3 +11,5 @@
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/subtask_update.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<h3><?= t('Sub-task updated') ?></h3>
Expand All @@ -20,4 +22,6 @@
<?php endif ?>
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_assignee_change.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<ul>
Expand All @@ -17,4 +19,6 @@
<?= $this->text->markdown($task['description'], true) ?: t('There is no description.') ?>
<?php endif ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_close.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p><?= t('The task #%d have been closed.', $task['id']) ?></p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_create.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<ul>
Expand Down Expand Up @@ -40,4 +42,6 @@
<?= $this->text->markdown($task['description'], true) ?>
<?php endif ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/task_file_create.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p><?= t('New attachment added "%s"', $file['name']) ?></p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/task_file_destroy.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p><?= t('Attachment removed "%s"', $file['name']) ?></p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p>
Expand All @@ -7,3 +9,5 @@
</p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/task_internal_link_delete.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p>
Expand All @@ -7,3 +9,5 @@
</p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_move_column.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<ul>
Expand All @@ -8,4 +10,6 @@
<li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_move_position.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<ul>
Expand All @@ -8,4 +10,6 @@
<li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/task_move_project.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p><?= t('Task #%d "%s" has been moved to the project "%s"', $task['id'], $task['title'], $task['project_name']) ?></p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_move_swimlane.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<ul>
Expand All @@ -16,4 +18,6 @@
<li><?= t('Task position:').' '.$this->text->e($task['position']) ?></li>
</ul>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
4 changes: 4 additions & 0 deletions app/Template/notification/task_open.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<p><?= t('The task #%d have been opened.', $task['id']) ?></p>

<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_overdue.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= t('Overdue tasks for the project(s) "%s"', $project_name) ?></h2>

<table style="font-size: .8em; table-layout: fixed; width: 100%; border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;" cellpadding=5 cellspacing=1>
Expand Down Expand Up @@ -34,4 +36,6 @@
</td>
</tr>
<?php endforeach ?>
</table>
</table>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_update.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>

<?= $this->render('task/changes', array('changes' => $changes, 'task' => $task, 'public' => true)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>
6 changes: 5 additions & 1 deletion app/Template/notification/task_user_mention.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<html>
<body>
<h2><?= t('You were mentioned in the task #%d', $task['id']) ?></h2>
<p><?= $this->text->e($task['title']) ?></p>

<h2><?= t('Description') ?></h2>
<?= $this->text->markdown($task['description'], true) ?>

<?= $this->render('notification/footer', array('task' => $task)) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

0 comments on commit 11b6bf6

Please sign in to comment.