Add subtasks and comments history

This commit is contained in:
Frédéric Guillot
2014-09-10 16:21:47 +02:00
parent 9bde377bbe
commit 28ff8dad91
29 changed files with 822 additions and 136 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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