summaryrefslogtreecommitdiff
path: root/app/Template/notification
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/notification')
-rw-r--r--app/Template/notification/comment_creation.php7
-rw-r--r--app/Template/notification/comment_update.php7
-rw-r--r--app/Template/notification/file_creation.php5
-rw-r--r--app/Template/notification/footer.php6
-rw-r--r--app/Template/notification/subtask_creation.php17
-rw-r--r--app/Template/notification/subtask_update.php21
-rw-r--r--app/Template/notification/task_assignee_change.php20
-rw-r--r--app/Template/notification/task_close.php5
-rw-r--r--app/Template/notification/task_creation.php43
-rw-r--r--app/Template/notification/task_due.php20
-rw-r--r--app/Template/notification/task_move_column.php11
-rw-r--r--app/Template/notification/task_move_position.php11
-rw-r--r--app/Template/notification/task_open.php5
-rw-r--r--app/Template/notification/task_update.php43
14 files changed, 221 insertions, 0 deletions
diff --git a/app/Template/notification/comment_creation.php b/app/Template/notification/comment_creation.php
new file mode 100644
index 00000000..52f82a92
--- /dev/null
+++ b/app/Template/notification/comment_creation.php
@@ -0,0 +1,7 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<h3><?= t('New comment posted by %s', $comment['name'] ?: $comment['username']) ?></h3>
+
+<?= Helper\markdown($comment['comment']) ?>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/comment_update.php b/app/Template/notification/comment_update.php
new file mode 100644
index 00000000..8f613eb2
--- /dev/null
+++ b/app/Template/notification/comment_update.php
@@ -0,0 +1,7 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<h3><?= t('Comment updated') ?></h3>
+
+<?= Helper\markdown($comment['comment']) ?>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/file_creation.php b/app/Template/notification/file_creation.php
new file mode 100644
index 00000000..aae6fee9
--- /dev/null
+++ b/app/Template/notification/file_creation.php
@@ -0,0 +1,5 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<p><?= t('New attachment added "%s"', $file['name']) ?></p>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/footer.php b/app/Template/notification/footer.php
new file mode 100644
index 00000000..67039e86
--- /dev/null
+++ b/app/Template/notification/footer.php
@@ -0,0 +1,6 @@
+<hr/>
+Kanboard
+
+<?php if (isset($application_url) && ! empty($application_url)): ?>
+ - <a href="<?= $application_url.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= t('view the task on Kanboard') ?></a>.
+<?php endif ?>
diff --git a/app/Template/notification/subtask_creation.php b/app/Template/notification/subtask_creation.php
new file mode 100644
index 00000000..b264ef49
--- /dev/null
+++ b/app/Template/notification/subtask_creation.php
@@ -0,0 +1,17 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<h3><?= t('New sub-task') ?></h3>
+
+<ul>
+ <li><?= t('Title:') ?> <?= Helper\escape($subtask['title']) ?></li>
+ <li><?= t('Status:') ?> <?= Helper\escape($subtask['status_name']) ?></li>
+ <li><?= t('Assignee:') ?> <?= Helper\escape($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
+ <li>
+ <?= t('Time tracking:') ?>
+ <?php if (! empty($subtask['time_estimated'])): ?>
+ <strong><?= Helper\escape($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?php endif ?>
+ </li>
+</ul>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/subtask_update.php b/app/Template/notification/subtask_update.php
new file mode 100644
index 00000000..08b7d97f
--- /dev/null
+++ b/app/Template/notification/subtask_update.php
@@ -0,0 +1,21 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<h3><?= t('Sub-task updated') ?></h3>
+
+<ul>
+ <li><?= t('Title:') ?> <?= Helper\escape($subtask['title']) ?></li>
+ <li><?= t('Status:') ?> <?= Helper\escape($subtask['status_name']) ?></li>
+ <li><?= t('Assignee:') ?> <?= Helper\escape($subtask['name'] ?: $subtask['username'] ?: '?') ?></li>
+ <li>
+ <?= t('Time tracking:') ?>
+ <?php if (! empty($subtask['time_spent'])): ?>
+ <strong><?= Helper\escape($subtask['time_spent']).'h' ?></strong> <?= t('spent') ?>
+ <?php endif ?>
+
+ <?php if (! empty($subtask['time_estimated'])): ?>
+ <strong><?= Helper\escape($subtask['time_estimated']).'h' ?></strong> <?= t('estimated') ?>
+ <?php endif ?>
+ </li>
+</ul>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_assignee_change.php b/app/Template/notification/task_assignee_change.php
new file mode 100644
index 00000000..14beef13
--- /dev/null
+++ b/app/Template/notification/task_assignee_change.php
@@ -0,0 +1,20 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<ul>
+ <li>
+ <strong>
+ <?php if ($task['assignee_username']): ?>
+ <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('There is nobody assigned') ?>
+ <?php endif ?>
+ </strong>
+ </li>
+</ul>
+
+<?php if (! empty($task['description'])): ?>
+ <h2><?= t('Description') ?></h2>
+ <?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
+<?php endif ?>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_close.php b/app/Template/notification/task_close.php
new file mode 100644
index 00000000..1a5ec553
--- /dev/null
+++ b/app/Template/notification/task_close.php
@@ -0,0 +1,5 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<p><?= t('The task #%d have been closed.', $task['id']) ?></p>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_creation.php b/app/Template/notification/task_creation.php
new file mode 100644
index 00000000..99ebcbe5
--- /dev/null
+++ b/app/Template/notification/task_creation.php
@@ -0,0 +1,43 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<ul>
+ <li>
+ <?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
+ </li>
+ <?php if ($task['date_due']): ?>
+ <li>
+ <strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
+ </li>
+ <?php endif ?>
+ <?php if ($task['creator_username']): ?>
+ <li>
+ <?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <strong>
+ <?php if ($task['assignee_username']): ?>
+ <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('There is nobody assigned') ?>
+ <?php endif ?>
+ </strong>
+ </li>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ </li>
+ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
+ <?php if ($task['category_name']): ?>
+ <li>
+ <?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong>
+ </li>
+ <?php endif ?>
+</ul>
+
+<?php if (! empty($task['description'])): ?>
+ <h2><?= t('Description') ?></h2>
+ <?= Helper\markdown($task['description']) ?>
+<?php endif ?>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_due.php b/app/Template/notification/task_due.php
new file mode 100644
index 00000000..c7ea010f
--- /dev/null
+++ b/app/Template/notification/task_due.php
@@ -0,0 +1,20 @@
+<h2><?= t('List of due tasks for the project "%s"', $project) ?></h2>
+
+<ul>
+ <?php foreach ($tasks as $task): ?>
+ <li>
+ (<strong>#<?= $task['id'] ?></strong>)
+ <?php if ($application_url): ?>
+ <a href="<?= $application_url.'?controller=task&action=show&task_id='.$task['id'] ?>"><?= Helper\escape($task['title']) ?></a>
+ <?php else: ?>
+ <?= Helper\escape($task['title']) ?>
+ <?php endif ?>
+ (<?= dt('%B %e, %Y', $task['date_due']) ?>)
+ <?php if ($task['assignee_username']): ?>
+ (<strong><?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?></strong>)
+ <?php endif ?>
+ </li>
+ <?php endforeach ?>
+</ul>
+
+<?= Helper\template('notification/footer', array('task' => $task)) ?>
diff --git a/app/Template/notification/task_move_column.php b/app/Template/notification/task_move_column.php
new file mode 100644
index 00000000..36f4daed
--- /dev/null
+++ b/app/Template/notification/task_move_column.php
@@ -0,0 +1,11 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<ul>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ </li>
+ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
+</ul>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_move_position.php b/app/Template/notification/task_move_position.php
new file mode 100644
index 00000000..36f4daed
--- /dev/null
+++ b/app/Template/notification/task_move_position.php
@@ -0,0 +1,11 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<ul>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ </li>
+ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
+</ul>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_open.php b/app/Template/notification/task_open.php
new file mode 100644
index 00000000..6ee10242
--- /dev/null
+++ b/app/Template/notification/task_open.php
@@ -0,0 +1,5 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<p><?= t('The task #%d have been opened.', $task['id']) ?></p>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file
diff --git a/app/Template/notification/task_update.php b/app/Template/notification/task_update.php
new file mode 100644
index 00000000..cbd6b2e1
--- /dev/null
+++ b/app/Template/notification/task_update.php
@@ -0,0 +1,43 @@
+<h2><?= Helper\escape($task['title']) ?> (#<?= $task['id'] ?>)</h2>
+
+<ul>
+ <li>
+ <?= dt('Created on %B %e, %Y at %k:%M %p', $task['date_creation']) ?>
+ </li>
+ <?php if ($task['date_due']): ?>
+ <li>
+ <strong><?= dt('Must be done before %B %e, %Y', $task['date_due']) ?></strong>
+ </li>
+ <?php endif ?>
+ <?php if ($task['creator_username']): ?>
+ <li>
+ <?= t('Created by %s', $task['creator_name'] ?: $task['creator_username']) ?>
+ </li>
+ <?php endif ?>
+ <li>
+ <strong>
+ <?php if ($task['assignee_username']): ?>
+ <?= t('Assigned to %s', $task['assignee_name'] ?: $task['assignee_username']) ?>
+ <?php else: ?>
+ <?= t('There is nobody assigned') ?>
+ <?php endif ?>
+ </strong>
+ </li>
+ <li>
+ <?= t('Column on the board:') ?>
+ <strong><?= Helper\escape($task['column_title']) ?></strong>
+ </li>
+ <li><?= t('Task position:').' '.Helper\escape($task['position']) ?></li>
+ <?php if ($task['category_name']): ?>
+ <li>
+ <?= t('Category:') ?> <strong><?= Helper\escape($task['category_name']) ?></strong>
+ </li>
+ <?php endif ?>
+</ul>
+
+<?php if (! empty($task['description'])): ?>
+ <h2><?= t('Description') ?></h2>
+ <?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
+<?php endif ?>
+
+<?= Helper\template('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file