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>
<?php if (! empty($comment['username'])): ?>
@ -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>

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -1,3 +1,5 @@
<html>
<body>
<h2><?= $this->text->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<h3><?= t('New sub-task') ?></h3>
@ -14,4 +16,6 @@
<?php endif ?>
</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>
<h3><?= t('Subtask removed') ?></h3>
@ -9,3 +11,5 @@
</ul>
<?= $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>
<h3><?= t('Sub-task updated') ?></h3>
@ -20,4 +22,6 @@
<?php endif ?>
</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>
<ul>
@ -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>

View File

@ -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>

View File

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

View File

@ -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>

View File

@ -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>

View File

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

View File

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

View File

@ -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>

View File

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

View File

@ -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>

View File

@ -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>
@ -34,4 +36,6 @@
</td>
</tr>
<?php endforeach ?>
</table>
</table>
</body>
</html>

View File

@ -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>

View File

@ -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>