Add HTML tag in email notifications

This commit is contained in:
Frédéric Guillot
2019-04-27 20:45:21 -07:00
committed by fguillot
parent d6ffe08aeb
commit 11b6bf6d25
22 changed files with 102 additions and 14 deletions

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<?php if (! empty($comment['username'])): ?> <?php if (! empty($comment['username'])): ?>
@@ -9,3 +11,5 @@
<?= $this->text->markdown($comment['comment'], true) ?> <?= $this->text->markdown($comment['comment'], true) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Comment removed') ?></h3> <h3><?= t('Comment removed') ?></h3>
@@ -5,3 +7,5 @@
<?= $this->text->markdown($comment['comment'], true) ?> <?= $this->text->markdown($comment['comment'], true) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Comment updated') ?></h3> <h3><?= t('Comment updated') ?></h3>
@@ -5,3 +7,5 @@
<?= $this->text->markdown($comment['comment'], true) ?> <?= $this->text->markdown($comment['comment'], true) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= t('You were mentioned in a comment on the task #%d', $task['id']) ?></h2> <h2><?= t('You were mentioned in a comment on the task #%d', $task['id']) ?></h2>
<p><?= $this->text->e($task['title']) ?></p> <p><?= $this->text->e($task['title']) ?></p>
@@ -5,3 +7,5 @@
<?= $this->text->markdown($comment['comment'], true) ?> <?= $this->text->markdown($comment['comment'], true) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('New sub-task') ?></h3> <h3><?= t('New sub-task') ?></h3>
@@ -15,3 +17,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Subtask removed') ?></h3> <h3><?= t('Subtask removed') ?></h3>
@@ -9,3 +11,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('Sub-task updated') ?></h3> <h3><?= t('Sub-task updated') ?></h3>
@@ -21,3 +23,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul> <ul>
@@ -18,3 +20,5 @@
<?php endif ?> <?php endif ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been closed.', $task['id']) ?></p> <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>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul> <ul>
@@ -41,3 +43,5 @@
<?php endif ?> <?php endif ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('New attachment added "%s"', $file['name']) ?></p> <p><?= t('New attachment added "%s"', $file['name']) ?></p>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('Attachment removed "%s"', $file['name']) ?></p> <p><?= t('Attachment removed "%s"', $file['name']) ?></p>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p> <p>
@@ -7,3 +9,5 @@
</p> </p>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p> <p>
@@ -7,3 +9,5 @@
</p> </p>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul> <ul>
@@ -9,3 +11,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul> <ul>
@@ -9,3 +11,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <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> <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)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<ul> <ul>
@@ -17,3 +19,5 @@
</ul> </ul>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,5 +1,9 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<p><?= t('The task #%d have been opened.', $task['id']) ?></p> <p><?= t('The task #%d have been opened.', $task['id']) ?></p>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= t('Overdue tasks for the project(s) "%s"', $project_name) ?></h2> <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> <table style="font-size: .8em; table-layout: fixed; width: 100%; border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;" cellpadding=5 cellspacing=1>
@@ -35,3 +37,5 @@
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
</table> </table>
</body>
</html>

View File

@@ -1,4 +1,8 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2> <h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<?= $this->render('task/changes', array('changes' => $changes, 'task' => $task, 'public' => true)) ?> <?= $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>

View File

@@ -1,3 +1,5 @@
<html>
<body>
<h2><?= t('You were mentioned in the task #%d', $task['id']) ?></h2> <h2><?= t('You were mentioned in the task #%d', $task['id']) ?></h2>
<p><?= $this->text->e($task['title']) ?></p> <p><?= $this->text->e($task['title']) ?></p>
@@ -5,3 +7,5 @@
<?= $this->text->markdown($task['description'], true) ?> <?= $this->text->markdown($task['description'], true) ?>
<?= $this->render('notification/footer', array('task' => $task)) ?> <?= $this->render('notification/footer', array('task' => $task)) ?>
</body>
</html>