Add project users overview
This commit is contained in:
28
app/Template/project_user/layout.php
Normal file
28
app/Template/project_user/layout.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<?php if ($this->user->isProjectAdmin() || $this->user->isAdmin()): ?>
|
||||
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New project'), 'project', 'create') ?></li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<i class="fa fa-lock fa-fw"></i>
|
||||
<?= $this->url->link(t('New private project'), 'project', 'create', array('private' => 1)) ?>
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
<?= $this->url->link(t('All projects'), 'project', 'index') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<section class="sidebar-container">
|
||||
|
||||
<?= $this->render('project_user/sidebar', array('users' => $users, 'action' => $action, 'filter' => $filter)) ?>
|
||||
|
||||
<div class="sidebar-content">
|
||||
<div class="page-header">
|
||||
<h2><?= $this->e($title) ?></h2>
|
||||
</div>
|
||||
<?= $content_for_sublayout ?>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
33
app/Template/project_user/roles.php
Normal file
33
app/Template/project_user/roles.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('No project') ?></p>
|
||||
<?php else: ?>
|
||||
<table class="table-fixed">
|
||||
<tr>
|
||||
<th class="column-20"><?= $paginator->order(t('User'), 'users.username') ?></th>
|
||||
<th class="column-25"><?= $paginator->order(t('Project'), 'projects.name') ?></th>
|
||||
<th><?= t('Columns') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($paginator->getCollection() as $project): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->e($this->user->getFullname($project)) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link('<i class="fa fa-th"></i>', 'board', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Board')) ?>
|
||||
<?= $this->url->link('<i class="fa fa-sliders fa-fw"></i>', 'gantt', 'project', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Gantt chart')) ?>
|
||||
<?= $this->url->link('<i class="fa fa-cog fa-fw"></i>', 'project', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?>
|
||||
|
||||
<?= $this->e($project['project_name']) ?>
|
||||
</td>
|
||||
<td class="dashboard-project-stats">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
|
||||
<span><?= $this->e($column['title']) ?></span>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?= $paginator ?>
|
||||
<?php endif ?>
|
||||
28
app/Template/project_user/sidebar.php
Normal file
28
app/Template/project_user/sidebar.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="sidebar">
|
||||
<h2><?= t('Actions') ?></h2>
|
||||
|
||||
<?= $this->form->select(
|
||||
'user_id',
|
||||
$users,
|
||||
$filter,
|
||||
array(),
|
||||
array('data-redirect-url="'.$this->url->href('projectuser', $action, array('user_id' => 'USER_ID')).'"', 'data-redirect-regex="USER_ID"'),
|
||||
'chosen-select select-auto-redirect'
|
||||
) ?>
|
||||
|
||||
<br/><br/>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->url->link(t('Project managers'), 'projectuser', 'managers', $filter) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->link(t('Project members'), 'projectuser', 'members', $filter) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->link(t('Open tasks'), 'projectuser', 'opens', $filter) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->link(t('Closed tasks'), 'projectuser', 'closed', $filter) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
46
app/Template/project_user/tasks.php
Normal file
46
app/Template/project_user/tasks.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('No tasks found.') ?></p>
|
||||
<?php elseif (! $paginator->isEmpty()): ?>
|
||||
<table class="table-small">
|
||||
<tr>
|
||||
<th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th>
|
||||
<th class="column-10"><?= $paginator->order(t('Project'), 'projects.name') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Column'), 'tasks.column_id') ?></th>
|
||||
<th><?= $paginator->order(t('Title'), 'tasks.title') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Assignee'), 'users.username') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Start date'), 'tasks.date_started') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Due date'), 'tasks.date_due') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($paginator->getCollection() as $task): ?>
|
||||
<tr>
|
||||
<td class="task-table color-<?= $task['color_id'] ?>">
|
||||
<?= $this->url->link('#'.$this->e($task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link($this->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->e($task['column_name']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($task['assignee_username']): ?>
|
||||
<?= $this->e($task['assignee_name'] ?: $task['assignee_username']) ?>
|
||||
<?php else: ?>
|
||||
<?= t('Unassigned') ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= dt('%B %e, %Y', $task['date_started']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= dt('%B %e, %Y', $task['date_due']) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?= $paginator ?>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user