summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/app/dashboard.php6
-rw-r--r--app/Template/app/projects.php11
-rw-r--r--app/Template/app/subtasks.php14
-rw-r--r--app/Template/app/tasks.php14
-rw-r--r--app/Template/project/search.php7
-rw-r--r--app/Template/project/tasks.php5
-rw-r--r--app/Template/task/table.php22
-rw-r--r--app/Template/user/index.php22
8 files changed, 50 insertions, 51 deletions
diff --git a/app/Template/app/dashboard.php b/app/Template/app/dashboard.php
index 81305ed8..592621a6 100644
--- a/app/Template/app/dashboard.php
+++ b/app/Template/app/dashboard.php
@@ -14,9 +14,9 @@
</div>
<section id="dashboard">
<div class="dashboard-left-column">
- <?= $this->render('app/projects', array('projects' => $projects, 'pagination' => $project_pagination)) ?>
- <?= $this->render('app/tasks', array('tasks' => $tasks, 'pagination' => $task_pagination)) ?>
- <?= $this->render('app/subtasks', array('subtasks' => $subtasks, 'pagination' => $subtask_pagination)) ?>
+ <?= $this->render('app/projects', array('paginator' => $project_paginator)) ?>
+ <?= $this->render('app/tasks', array('paginator' => $task_paginator)) ?>
+ <?= $this->render('app/subtasks', array('paginator' => $subtask_paginator)) ?>
</div>
<div class="dashboard-right-column">
<h2><?= t('Activity stream') ?></h2>
diff --git a/app/Template/app/projects.php b/app/Template/app/projects.php
index 724a6a5d..4740c4b8 100644
--- a/app/Template/app/projects.php
+++ b/app/Template/app/projects.php
@@ -1,14 +1,14 @@
<h2><?= t('My projects') ?></h2>
-<?php if (empty($projects)): ?>
+<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('Your are not member of any project.') ?></p>
<?php else: ?>
<table class="table-fixed">
<tr>
- <th class="column-8"><?= $this->order('Id', 'id', $pagination) ?></th>
- <th class="column-20"><?= $this->order(t('Project'), 'name', $pagination) ?></th>
+ <th class="column-8"><?= $paginator->order('Id', 'id') ?></th>
+ <th class="column-20"><?= $paginator->order(t('Project'), 'name') ?></th>
<th><?= t('Columns') ?></th>
</tr>
- <?php foreach ($projects as $project): ?>
+ <?php foreach ($paginator->getCollection() as $project): ?>
<tr>
<td>
<?= $this->a('#'.$project['id'], 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link') ?>
@@ -17,6 +17,7 @@
<?php if ($this->isManager($project['id'])): ?>
<?= $this->a('<i class="fa fa-cog"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Settings')) ?>&nbsp;
<?php endif ?>
+
<?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>&nbsp;
<?= $this->a($this->e($project['name']), 'board', 'show', array('project_id' => $project['id'])) ?>
</td>
@@ -30,5 +31,5 @@
<?php endforeach ?>
</table>
- <?= $this->paginate($pagination) ?>
+ <?= $paginator ?>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/app/subtasks.php b/app/Template/app/subtasks.php
index 2ad343e5..75320027 100644
--- a/app/Template/app/subtasks.php
+++ b/app/Template/app/subtasks.php
@@ -1,15 +1,15 @@
<h2><?= t('My subtasks') ?></h2>
-<?php if (empty($subtasks)): ?>
+<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<table class="table-fixed">
<tr>
- <th class="column-10"><?= $this->order('Id', 'tasks.id', $pagination) ?></th>
- <th class="column-20"><?= $this->order(t('Project'), 'project_name', $pagination) ?></th>
- <th class="column-15"><?= $this->order(t('Status'), 'status', $pagination) ?></th>
- <th><?= $this->order(t('Subtask'), 'title', $pagination) ?></th>
+ <th class="column-10"><?= $paginator->order('Id', 'tasks.id') ?></th>
+ <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
+ <th class="column-15"><?= $paginator->order(t('Status'), 'status') ?></th>
+ <th><?= $paginator->order(t('Subtask'), 'title') ?></th>
</tr>
- <?php foreach ($subtasks as $subtask): ?>
+ <?php foreach ($paginator->getCollection() as $subtask): ?>
<tr>
<td class="task-table color-<?= $subtask['color_id'] ?>">
<?= $this->a('#'.$subtask['task_id'], 'task', 'show', array('task_id' => $subtask['task_id'], 'project_id' => $subtask['project_id'])) ?>
@@ -27,5 +27,5 @@
<?php endforeach ?>
</table>
- <?= $this->paginate($pagination) ?>
+ <?= $paginator ?>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/app/tasks.php b/app/Template/app/tasks.php
index dc485d7b..37843af5 100644
--- a/app/Template/app/tasks.php
+++ b/app/Template/app/tasks.php
@@ -1,15 +1,15 @@
<h2><?= t('My tasks') ?></h2>
-<?php if (empty($tasks)): ?>
+<?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('There is nothing assigned to you.') ?></p>
<?php else: ?>
<table class="table-fixed">
<tr>
- <th class="column-8"><?= $this->order('Id', 'tasks.id', $pagination) ?></th>
- <th class="column-20"><?= $this->order(t('Project'), 'project_name', $pagination) ?></th>
- <th><?= $this->order(t('Task'), 'title', $pagination) ?></th>
- <th class="column-20"><?= $this->order(t('Due date'), 'date_due', $pagination) ?></th>
+ <th class="column-8"><?= $paginator->order('Id', 'tasks.id') ?></th>
+ <th class="column-20"><?= $paginator->order(t('Project'), 'project_name') ?></th>
+ <th><?= $paginator->order(t('Task'), 'title') ?></th>
+ <th class="column-20"><?= $paginator->order(t('Due date'), 'date_due') ?></th>
</tr>
- <?php foreach ($tasks as $task): ?>
+ <?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
<?= $this->a('#'.$task['id'], 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
@@ -27,5 +27,5 @@
<?php endforeach ?>
</table>
- <?= $this->paginate($pagination) ?>
+ <?= $paginator ?>
<?php endif ?> \ No newline at end of file
diff --git a/app/Template/project/search.php b/app/Template/project/search.php
index 695940ac..47ba0f77 100644
--- a/app/Template/project/search.php
+++ b/app/Template/project/search.php
@@ -28,14 +28,13 @@
<input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/>
</form>
- <?php if (empty($tasks) && ! empty($values['search'])): ?>
+ <?php if (! empty($values['search']) && $paginator->isEmpty()): ?>
<p class="alert"><?= t('Nothing found.') ?></p>
- <?php elseif (! empty($tasks)): ?>
+ <?php elseif (! $paginator->isEmpty()): ?>
<?= $this->render('task/table', array(
- 'tasks' => $tasks,
+ 'paginator' => $paginator,
'categories' => $categories,
'columns' => $columns,
- 'pagination' => $pagination,
)) ?>
<?php endif ?>
diff --git a/app/Template/project/tasks.php b/app/Template/project/tasks.php
index c52abde4..b22746f9 100644
--- a/app/Template/project/tasks.php
+++ b/app/Template/project/tasks.php
@@ -20,14 +20,13 @@
</ul>
</div>
<section>
- <?php if (empty($tasks)): ?>
+ <?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('No task') ?></p>
<?php else: ?>
<?= $this->render('task/table', array(
- 'tasks' => $tasks,
+ 'paginator' => $paginator,
'categories' => $categories,
'columns' => $columns,
- 'pagination' => $pagination,
)) ?>
<?php endif ?>
</section>
diff --git a/app/Template/task/table.php b/app/Template/task/table.php
index e8ca7c51..4ccf83b9 100644
--- a/app/Template/task/table.php
+++ b/app/Template/task/table.php
@@ -1,16 +1,16 @@
<table class="table-fixed table-small">
<tr>
- <th class="column-8"><?= $this->order(t('Id'), 'tasks.id', $pagination) ?></th>
- <th class="column-8"><?= $this->order(t('Column'), 'tasks.column_id', $pagination) ?></th>
- <th class="column-8"><?= $this->order(t('Category'), 'tasks.category_id', $pagination) ?></th>
- <th><?= $this->order(t('Title'), 'tasks.title', $pagination) ?></th>
- <th class="column-10"><?= $this->order(t('Assignee'), 'users.username', $pagination) ?></th>
- <th class="column-10"><?= $this->order(t('Due date'), 'tasks.date_due', $pagination) ?></th>
- <th class="column-10"><?= $this->order(t('Date created'), 'tasks.date_creation', $pagination) ?></th>
- <th class="column-10"><?= $this->order(t('Date completed'), 'tasks.date_completed', $pagination) ?></th>
- <th class="column-5"><?= $this->order(t('Status'), 'tasks.is_active', $pagination) ?></th>
+ <th class="column-8"><?= $paginator->order(t('Id'), 'tasks.id') ?></th>
+ <th class="column-8"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th>
+ <th class="column-8"><?= $paginator->order(t('Category'), 'tasks.category_id') ?></th>
+ <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Assignee'), 'users.username') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Date created'), 'tasks.date_creation') ?></th>
+ <th class="column-10"><?= $paginator->order(t('Date completed'), 'tasks.date_completed') ?></th>
+ <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th>
</tr>
- <?php foreach ($tasks as $task): ?>
+ <?php foreach ($paginator->getCollection() as $task): ?>
<tr>
<td class="task-table color-<?= $task['color_id'] ?>">
<?= $this->a('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
@@ -53,4 +53,4 @@
<?php endforeach ?>
</table>
-<?= $this->paginate($pagination) ?>
+<?= $paginator ?>
diff --git a/app/Template/user/index.php b/app/Template/user/index.php
index e4729501..41e205ba 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user/index.php
@@ -7,22 +7,22 @@
<?php endif ?>
</div>
<section>
- <?php if (empty($users)): ?>
+ <?php if ($paginator->isEmpty()): ?>
<p class="alert"><?= t('No user') ?></p>
<?php else: ?>
<table>
<tr>
- <th><?= $this->order(t('Id'), 'id', $pagination) ?></th>
- <th><?= $this->order(t('Username'), 'username', $pagination) ?></th>
- <th><?= $this->order(t('Name'), 'name', $pagination) ?></th>
- <th><?= $this->order(t('Email'), 'email', $pagination) ?></th>
- <th><?= $this->order(t('Administrator'), 'is_admin', $pagination) ?></th>
- <th><?= $this->order(t('Default project'), 'default_project_id', $pagination) ?></th>
- <th><?= $this->order(t('Notifications'), 'notifications_enabled', $pagination) ?></th>
+ <th><?= $paginator->order(t('Id'), 'id') ?></th>
+ <th><?= $paginator->order(t('Username'), 'username') ?></th>
+ <th><?= $paginator->order(t('Name'), 'name') ?></th>
+ <th><?= $paginator->order(t('Email'), 'email') ?></th>
+ <th><?= $paginator->order(t('Administrator'), 'is_admin') ?></th>
+ <th><?= $paginator->order(t('Default project'), 'default_project_id') ?></th>
+ <th><?= $paginator->order(t('Notifications'), 'notifications_enabled') ?></th>
<th><?= t('External accounts') ?></th>
- <th><?= $this->order(t('Account type'), 'is_ldap_user', $pagination) ?></th>
+ <th><?= $paginator->order(t('Account type'), 'is_ldap_user') ?></th>
</tr>
- <?php foreach ($users as $user): ?>
+ <?php foreach ($paginator->getCollection() as $user): ?>
<tr>
<td>
<?= $this->a('#'.$user['id'], 'user', 'show', array('user_id' => $user['id'])) ?>
@@ -66,7 +66,7 @@
<?php endforeach ?>
</table>
- <?= $this->paginate($pagination) ?>
+ <?= $paginator ?>
<?php endif ?>
</section>
</section>