summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-09 20:39:45 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-09 20:39:45 +0200
commit9bde377bbe85617dde280af985e033cf7de61803 (patch)
tree2d2c080a86542206f862bd6d1c14ce622aa225a8 /app/Templates
parentef95c7c28479a22e41fff35a893f05eb084e1f2c (diff)
Start to implement task history and project activity
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/board_index.php1
-rw-r--r--app/Templates/event_task_close.php6
-rw-r--r--app/Templates/event_task_create.php6
-rw-r--r--app/Templates/event_task_move_column.php6
-rw-r--r--app/Templates/event_task_move_position.php6
-rw-r--r--app/Templates/event_task_open.php6
-rw-r--r--app/Templates/event_task_update.php6
-rw-r--r--app/Templates/project_activity.php28
-rw-r--r--app/Templates/project_search.php1
-rw-r--r--app/Templates/project_tasks.php1
10 files changed, 67 insertions, 0 deletions
diff --git a/app/Templates/board_index.php b/app/Templates/board_index.php
index c168d11a..da40468d 100644
--- a/app/Templates/board_index.php
+++ b/app/Templates/board_index.php
@@ -19,6 +19,7 @@
<li><a href="#" id="filter-due-date"><?= t('Filter by due date') ?></a></li>
<li><a href="?controller=project&amp;action=search&amp;project_id=<?= $current_project_id ?>"><?= t('Search') ?></a></li>
<li><a href="?controller=project&amp;action=tasks&amp;project_id=<?= $current_project_id ?>"><?= t('Completed tasks') ?></a></li>
+ <li><a href="?controller=project&amp;action=activity&amp;project_id=<?= $current_project_id ?>"><?= t('Activity') ?></a></li>
</ul>
</div>
diff --git a/app/Templates/event_task_close.php b/app/Templates/event_task_close.php
new file mode 100644
index 00000000..d5952d74
--- /dev/null
+++ b/app/Templates/event_task_close.php
@@ -0,0 +1,6 @@
+<p class="activity-title">
+ <?= t('%s closed the task #%d', $author, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_task_create.php b/app/Templates/event_task_create.php
new file mode 100644
index 00000000..f0dcf2d7
--- /dev/null
+++ b/app/Templates/event_task_create.php
@@ -0,0 +1,6 @@
+<p class="activity-title">
+ <?= t('%s created the task #%d', $author, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_task_move_column.php b/app/Templates/event_task_move_column.php
new file mode 100644
index 00000000..0ccad655
--- /dev/null
+++ b/app/Templates/event_task_move_column.php
@@ -0,0 +1,6 @@
+<p class="activity-title">
+ <?= t('%s moved the task #%d to the column %s', $author, $task_id, $task_column_name) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_task_move_position.php b/app/Templates/event_task_move_position.php
new file mode 100644
index 00000000..e7d6b244
--- /dev/null
+++ b/app/Templates/event_task_move_position.php
@@ -0,0 +1,6 @@
+<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) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em>
+</p> \ No newline at end of file
diff --git a/app/Templates/event_task_open.php b/app/Templates/event_task_open.php
new file mode 100644
index 00000000..b3bc595a
--- /dev/null
+++ b/app/Templates/event_task_open.php
@@ -0,0 +1,6 @@
+<p class="activity-title">
+ <?= t('%s open the task #%d', $author, $task_id) ?>
+</p>
+<p class="activity-description">
+ <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
new file mode 100644
index 00000000..e2af6776
--- /dev/null
+++ b/app/Templates/event_task_update.php
@@ -0,0 +1,6 @@
+<p class="activity-title">
+ <?= t('%s updated the task #%d', $author, $task_id) ?>
+</p>
+<p class="activity-description">
+ <em><?= Helper\escape($task_title) ?></em>
+</p> \ No newline at end of file
diff --git a/app/Templates/project_activity.php b/app/Templates/project_activity.php
new file mode 100644
index 00000000..7886cfa4
--- /dev/null
+++ b/app/Templates/project_activity.php
@@ -0,0 +1,28 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('%s\'s activity', $project['name']) ?></h2>
+ <ul>
+ <li><a href="?controller=board&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
+ <li><a href="?controller=project&amp;action=search&amp;project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li>
+ <li><a href="?controller=project&amp;action=tasks&amp;project_id=<?= $project['id'] ?>"><?= t('Completed tasks') ?></a></li>
+ <li><a href="?controller=project&amp;action=index"><?= t('List of projects') ?></a></li>
+ </ul>
+ </div>
+ <section>
+ <?php if (empty($events)): ?>
+ <p class="alert"><?= t('No activity.') ?></p>
+ <?php else: ?>
+ <?php foreach ($events as $event): ?>
+ <div class="activity-event">
+ <p class="activity-datetime">
+ <?php if ($event['event_type'] === 'task'): ?>
+ <i class="fa fa-newspaper-o"></i>
+ <?php endif ?>
+ &nbsp;<?= dt('%B %e, %Y at %k:%M %p', $event['date_creation']) ?>
+ </p>
+ <div class="activity-content"><?= $event['event_content'] ?></div>
+ </div>
+ <?php endforeach ?>
+ <?php endif ?>
+ </section>
+</section> \ No newline at end of file
diff --git a/app/Templates/project_search.php b/app/Templates/project_search.php
index 7826ba63..a810afce 100644
--- a/app/Templates/project_search.php
+++ b/app/Templates/project_search.php
@@ -9,6 +9,7 @@
<ul>
<li><a href="?controller=board&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
<li><a href="?controller=project&amp;action=tasks&amp;project_id=<?= $project['id'] ?>"><?= t('Completed tasks') ?></a></li>
+ <li><a href="?controller=project&amp;action=activity&amp;project_id=<?= $project['id'] ?>"><?= t('Activity') ?></a></li>
<li><a href="?controller=project&amp;action=index"><?= t('List of projects') ?></a></li>
</ul>
</div>
diff --git a/app/Templates/project_tasks.php b/app/Templates/project_tasks.php
index a820be13..bc27befa 100644
--- a/app/Templates/project_tasks.php
+++ b/app/Templates/project_tasks.php
@@ -4,6 +4,7 @@
<ul>
<li><a href="?controller=board&amp;action=show&amp;project_id=<?= $project['id'] ?>"><?= t('Back to the board') ?></a></li>
<li><a href="?controller=project&amp;action=search&amp;project_id=<?= $project['id'] ?>"><?= t('Search') ?></a></li>
+ <li><a href="?controller=project&amp;action=activity&amp;project_id=<?= $project['id'] ?>"><?= t('Activity') ?></a></li>
<li><a href="?controller=project&amp;action=index"><?= t('List of projects') ?></a></li>
</ul>
</div>