blob: 0352788b1dcd18fb2fc36dd629af4356d2518a71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
<h2><?= $this->e($task['title']) ?> (#<?= $task['id'] ?>)</h2>
<?= t('The task have been updated.') ?>
<?php if (! empty($changes)): ?>
<h2><?= t('List of changes') ?></h2>
<ul>
<?php
foreach ($changes as $field => $value) {
switch ($field) {
case 'title':
echo '<li>'.t('New title: %s', $task['title']).'</li>';
break;
case 'owner_id':
if (empty($task['owner_id'])) {
echo '<li>'.t('The task is not assigned anymore').'</li>';
}
else {
echo '<li>'.t('New assignee: %s', $task['assignee_name'] ?: $task['assignee_username']).'</li>';
}
break;
case 'category_id':
if (empty($task['category_id'])) {
echo '<li>'.t('There is no category now').'</li>';
}
else {
echo '<li>'.t('New category: %s', $task['category_name']).'</li>';
}
break;
case 'color_id':
echo '<li>'.t('New color: %s', $this->text->in($task['color_id'], $colors_list)).'</li>';
break;
case 'score':
echo '<li>'.t('New complexity: %d', $task['score']).'</li>';
break;
case 'date_due':
if (empty($task['date_due'])) {
echo '<li>'.t('The due date have been removed').'</li>';
}
else {
echo '<li>'.dt('New due date: %B %e, %Y', $task['date_due']).'</li>';
}
break;
case 'description':
if (empty($task['description'])) {
echo '<li>'.t('There is no description anymore').'</li>';
}
break;
default:
echo '<li>'.t('The field "%s" have been updated', $field).'</li>';
}
}
?>
</ul>
<?php if (! empty($changes['description'])): ?>
<h3><?= t('New description') ?></h3>
<?= $this->text->markdown($task['description']) ?>
<?php endif ?>
<?php endif ?>
<?= $this->render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?>
|