summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-10 16:21:47 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-10 16:21:47 +0200
commit28ff8dad91c9e3c25f6a3b5398ae15f2a1ef95cd (patch)
tree0cecc5cbb6e7e6795dd032cc6a5703cd88b8770e /app/Templates
parent9bde377bbe85617dde280af985e033cf7de61803 (diff)
Add subtasks and comments history
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/event_comment_create.php7
-rw-r--r--app/Templates/event_comment_update.php7
-rw-r--r--app/Templates/event_subtask_create.php12
-rw-r--r--app/Templates/event_subtask_update.php12
-rw-r--r--app/Templates/event_task_close.php2
-rw-r--r--app/Templates/event_task_create.php2
-rw-r--r--app/Templates/event_task_move_column.php2
-rw-r--r--app/Templates/event_task_move_position.php2
-rw-r--r--app/Templates/event_task_open.php4
-rw-r--r--app/Templates/event_task_update.php2
-rw-r--r--app/Templates/project_activity.php4
11 files changed, 49 insertions, 7 deletions
diff --git a/app/Templates/event_comment_create.php b/app/Templates/event_comment_create.php
new file mode 100644
index 00000000..09d45ed0
--- /dev/null
+++ b/app/Templates/event_comment_create.php
@@ -0,0 +1,7 @@
+<p class="activity-title">
+ <?= e('%s commented the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em><br/>
+ <div class="markdown"><?= Helper\parse($comment) ?></div>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_comment_update.php b/app/Templates/event_comment_update.php
new file mode 100644
index 00000000..a42e5dab
--- /dev/null
+++ b/app/Templates/event_comment_update.php
@@ -0,0 +1,7 @@
+<p class="activity-title">
+ <?= e('%s updated a comment on the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em><br/>
+ <div class="markdown"><?= Helper\parse($comment) ?></div>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_subtask_create.php b/app/Templates/event_subtask_create.php
new file mode 100644
index 00000000..81268449
--- /dev/null
+++ b/app/Templates/event_subtask_create.php
@@ -0,0 +1,12 @@
+<p class="activity-title">
+ <?= e('%s created a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em><br/>
+ <p><?= Helper\escape($subtask_title) ?> <strong>(<?= Helper\in_list($subtask_status, $subtask_status_list) ?>)</strong></p>
+ <?php if ($subtask_assignee): ?>
+ <p><?= t('Assigned to %s with estimate of %s/%sh', $subtask_assignee, $subtask_time_spent, $subtask_time_estimated) ?></p>
+ <?php else: ?>
+ <p><?= t('Not assigned, estimate of %sh', $subtask_time_estimated) ?></p>
+ <?php endif ?>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_subtask_update.php b/app/Templates/event_subtask_update.php
new file mode 100644
index 00000000..9862f997
--- /dev/null
+++ b/app/Templates/event_subtask_update.php
@@ -0,0 +1,12 @@
+<p class="activity-title">
+ <?= e('%s updated a subtask for the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em><br/>
+ <p><?= Helper\escape($subtask_title) ?> <strong>(<?= Helper\in_list($subtask_status, $subtask_status_list) ?>)</strong></p>
+ <?php if ($subtask_assignee): ?>
+ <p><?= t('Assigned to %s with estimate of %s/%sh', $subtask_assignee, $subtask_time_spent, $subtask_time_estimated) ?></p>
+ <?php else: ?>
+ <p><?= t('Not assigned, estimate of %sh', $subtask_time_estimated) ?></p>
+ <?php endif ?>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_task_close.php b/app/Templates/event_task_close.php
index d5952d74..9d92ea55 100644
--- a/app/Templates/event_task_close.php
+++ b/app/Templates/event_task_close.php
@@ -1,5 +1,5 @@
<p class="activity-title">
- <?= t('%s closed the task #%d', $author, $task_id) ?>
+ <?= e('%s closed the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task_title) ?></em>
diff --git a/app/Templates/event_task_create.php b/app/Templates/event_task_create.php
index f0dcf2d7..7ceab4bb 100644
--- a/app/Templates/event_task_create.php
+++ b/app/Templates/event_task_create.php
@@ -1,5 +1,5 @@
<p class="activity-title">
- <?= t('%s created the task #%d', $author, $task_id) ?>
+ <?= e('%s created the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task_title) ?></em>
diff --git a/app/Templates/event_task_move_column.php b/app/Templates/event_task_move_column.php
index 0ccad655..a674f80a 100644
--- a/app/Templates/event_task_move_column.php
+++ b/app/Templates/event_task_move_column.php
@@ -1,5 +1,5 @@
<p class="activity-title">
- <?= t('%s moved the task #%d to the column %s', $author, $task_id, $task_column_name) ?>
+ <?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the column "%s"', Helper\escape($author), $task_id, $task_id, Helper\escape($task_column_name)) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task_title) ?></em>
diff --git a/app/Templates/event_task_move_position.php b/app/Templates/event_task_move_position.php
index e7d6b244..0b7e9615 100644
--- a/app/Templates/event_task_move_position.php
+++ b/app/Templates/event_task_move_position.php
@@ -1,5 +1,5 @@
<p class="activity-title">
- <?= t('%s moved the task #%d to the position %d in the column %s', $author, $task_id, $task_position, $task_column_name) ?>
+ <?= e('%s moved the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a> to the position #%d in the column "%s"', Helper\escape($author), $task_id, $task_id, $task_position, Helper\escape($task_column_name)) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task_title) ?></em>
diff --git a/app/Templates/event_task_open.php b/app/Templates/event_task_open.php
index b3bc595a..763b0dfc 100644
--- a/app/Templates/event_task_open.php
+++ b/app/Templates/event_task_open.php
@@ -1,6 +1,6 @@
<p class="activity-title">
- <?= t('%s open the task #%d', $author, $task_id) ?>
+ <?= e('%s open the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
- <em><?= Helper\escape($task_title ?></em>
+ <em><?= Helper\escape($task_title) ?></em>
</p> \ No newline at end of file
diff --git a/app/Templates/event_task_update.php b/app/Templates/event_task_update.php
index e2af6776..313e79cb 100644
--- a/app/Templates/event_task_update.php
+++ b/app/Templates/event_task_update.php
@@ -1,5 +1,5 @@
<p class="activity-title">
- <?= t('%s updated the task #%d', $author, $task_id) ?>
+ <?= e('%s updated the task <a href="?controller=task&amp;action=show&amp;task_id=%d">#%d</a>', Helper\escape($author), $task_id, $task_id) ?>
</p>
<p class="activity-description">
<em><?= Helper\escape($task_title) ?></em>
diff --git a/app/Templates/project_activity.php b/app/Templates/project_activity.php
index 7886cfa4..b79d97f9 100644
--- a/app/Templates/project_activity.php
+++ b/app/Templates/project_activity.php
@@ -17,6 +17,10 @@
<p class="activity-datetime">
<?php if ($event['event_type'] === 'task'): ?>
<i class="fa fa-newspaper-o"></i>
+ <?php elseif ($event['event_type'] === 'subtask'): ?>
+ <i class="fa fa-tasks"></i>
+ <?php elseif ($event['event_type'] === 'comment'): ?>
+ <i class="fa fa-comments-o"></i>
<?php endif ?>
&nbsp;<?= dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?>
</p>