Pagination refactoring
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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')) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->a('<i class="fa fa-calendar"></i>', 'calendar', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Calendar')) ?>
|
||||
<?= $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 ?>
|
||||
@@ -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 ?>
|
||||
@@ -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 ?>
|
||||
Reference in New Issue
Block a user