summaryrefslogtreecommitdiff
path: root/app/Templates
diff options
context:
space:
mode:
Diffstat (limited to 'app/Templates')
-rw-r--r--app/Templates/app_index.php45
-rw-r--r--app/Templates/layout.php3
-rw-r--r--app/Templates/project_activity.php21
-rw-r--r--app/Templates/project_events.php21
-rw-r--r--app/Templates/task_table.php2
5 files changed, 71 insertions, 21 deletions
diff --git a/app/Templates/app_index.php b/app/Templates/app_index.php
new file mode 100644
index 00000000..91eecce4
--- /dev/null
+++ b/app/Templates/app_index.php
@@ -0,0 +1,45 @@
+<section id="main">
+ <div class="page-header">
+ <h2><?= t('Dashboard') ?></h2>
+ </div>
+ <section id="dashboard">
+ <div class="dashboard-left-column">
+ <h2><?= t('My tasks') ?></h2>
+ <?php if (empty($tasks)): ?>
+ <p class="alert"><?= t('There is nothing assigned to you.') ?></p>
+ <?php else: ?>
+ <table>
+ <tr>
+ <th>&nbsp;</th>
+ <th width="15%"><?= t('Project') ?></th>
+ <th width="40%"><?= t('Title') ?></th>
+ <th><?= t('Due date') ?></th>
+ <th><?= t('Date created') ?></th>
+ </tr>
+ <?php foreach ($tasks as $task): ?>
+ <tr>
+ <td class="task-table task-<?= $task['color_id'] ?>">
+ <?= Helper\a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'])) ?>
+ </td>
+ <td>
+ <?= Helper\a(Helper\escape($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
+ </td>
+ <td>
+ <?= Helper\a(Helper\escape($task['title']), 'task', 'show', array('task_id' => $task['id'])) ?>
+ </td>
+ <td>
+ <?= dt('%B %e, %Y', $task['date_due']) ?>
+ </td>
+ <td>
+ <?= dt('%B %e, %Y', $task['date_creation']) ?>
+ </td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+ <?php endif ?>
+ </div>
+ <div class="dashboard-right-column">
+ <h2><?= t('Activity stream') ?></h2>
+ <?= Helper\template('project_events', array('events' => $events)) ?>
+ </section>
+</section> \ No newline at end of file
diff --git a/app/Templates/layout.php b/app/Templates/layout.php
index 434c5aca..a86d613b 100644
--- a/app/Templates/layout.php
+++ b/app/Templates/layout.php
@@ -50,6 +50,9 @@
</select>
</li>
<?php endif ?>
+ <li <?= isset($menu) && $menu === 'dashboard' ? 'class="active"' : '' ?>>
+ <a href="?controller=app"><?= t('Dashboard') ?></a>
+ </li>
<li <?= isset($menu) && $menu === 'boards' ? 'class="active"' : '' ?>>
<a href="?controller=board"><?= t('Boards') ?></a>
</li>
diff --git a/app/Templates/project_activity.php b/app/Templates/project_activity.php
index 50743d68..d07ba86a 100644
--- a/app/Templates/project_activity.php
+++ b/app/Templates/project_activity.php
@@ -9,29 +9,10 @@
</ul>
</div>
<section>
- <?php if (empty($events)): ?>
- <p class="alert"><?= t('No activity.') ?></p>
- <?php else: ?>
-
<?php if ($project['is_public']): ?>
<p class="pull-right"><i class="fa fa-rss-square"></i> <?= Helper\a(t('RSS feed'), 'project', 'feed', array('token' => $project['token'])) ?></p>
<?php endif ?>
- <?php foreach ($events as $event): ?>
- <div class="activity-event">
- <p class="activity-datetime">
- <?php if (Helper\contains($event['event_name'], 'task')): ?>
- <i class="fa fa-newspaper-o"></i>
- <?php elseif (Helper\contains($event['event_name'], 'subtask')): ?>
- <i class="fa fa-tasks"></i>
- <?php elseif (Helper\contains($event['event_name'], 'comment')): ?>
- <i class="fa fa-comments-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 ?>
+ <?= Helper\template('project_events', array('events' => $events)) ?>
</section>
</section> \ No newline at end of file
diff --git a/app/Templates/project_events.php b/app/Templates/project_events.php
new file mode 100644
index 00000000..1b606414
--- /dev/null
+++ b/app/Templates/project_events.php
@@ -0,0 +1,21 @@
+<?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 (Helper\contains($event['event_name'], 'subtask')): ?>
+ <i class="fa fa-tasks"></i>
+ <?php elseif (Helper\contains($event['event_name'], 'task')): ?>
+ <i class="fa fa-newspaper-o"></i>
+ <?php elseif (Helper\contains($event['event_name'], 'comment')): ?>
+ <i class="fa fa-comments-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 ?> \ No newline at end of file
diff --git a/app/Templates/task_table.php b/app/Templates/task_table.php
index b6fdb2b9..fa04fa55 100644
--- a/app/Templates/task_table.php
+++ b/app/Templates/task_table.php
@@ -13,7 +13,7 @@
<?php foreach ($tasks as $task): ?>
<tr>
<td class="task-table task-<?= $task['color_id'] ?>">
- <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['id']) ?></a>
+ <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>">#<?= Helper\escape($task['id']) ?></a>
</td>
<td>
<?= Helper\in_list($task['column_id'], $columns) ?>