Rename controllers

This commit is contained in:
Frederic Guillot
2016-05-28 13:41:54 -04:00
parent ab48a09f0d
commit 1353929a7d
134 changed files with 496 additions and 493 deletions

View File

@@ -0,0 +1,27 @@
<section id="main">
<div class="page-header">
<ul>
<li>
<i class="fa fa-folder fa-fw"></i>
<?= $this->url->link(t('Projects list'), 'ProjectListController', 'show') ?>
</li>
<?php if ($this->user->hasAccess('gantt', 'projects')): ?>
<li>
<i class="fa fa-sliders fa-fw"></i>
<?= $this->url->link(t('Projects Gantt chart'), 'gantt', 'projects') ?>
</li>
<?php endif ?>
</ul>
</div>
<section class="sidebar-container">
<?= $this->render($sidebar_template, array('users' => $users, 'filter' => $filter)) ?>
<div class="sidebar-content">
<div class="page-header">
<h2><?= $this->text->e($title) ?></h2>
</div>
<?= $content_for_sublayout ?>
</div>
</section>
</section>

View 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->text->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>', 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'dashboard-table-link', t('Project settings')) ?>
<?= $this->text->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->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?= $paginator ?>
<?php endif ?>

View File

@@ -0,0 +1,30 @@
<div class="sidebar">
<h2><?= t('Actions') ?></h2>
<?= $this->form->select(
'user_id',
$users,
$filter,
array(),
array('data-redirect-url="'.$this->url->href('ProjectUserOverviewController', $this->app->getRouterAction(), array('user_id' => 'USER_ID')).'"', 'data-redirect-regex="USER_ID"'),
'chosen-select select-auto-redirect'
) ?>
<br><br>
<ul>
<li <?= $this->app->checkMenuSelection('ProjectUserOverviewController', 'managers') ?>>
<?= $this->url->link(t('Project managers'), 'ProjectUserOverviewController', 'managers', $filter) ?>
</li>
<li <?= $this->app->checkMenuSelection('ProjectUserOverviewController', 'members') ?>>
<?= $this->url->link(t('Project members'), 'ProjectUserOverviewController', 'members', $filter) ?>
</li>
<li <?= $this->app->checkMenuSelection('ProjectUserOverviewController', 'opens') ?>>
<?= $this->url->link(t('Open tasks'), 'ProjectUserOverviewController', 'opens', $filter) ?>
</li>
<li <?= $this->app->checkMenuSelection('ProjectUserOverviewController', 'closed') ?>>
<?= $this->url->link(t('Closed tasks'), 'ProjectUserOverviewController', 'closed', $filter) ?>
</li>
<?= $this->hook->render('template:project-user:sidebar') ?>
</ul>
</div>

View 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->text->e($task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?= $this->url->link($this->text->e($task['project_name']), 'board', 'show', array('project_id' => $task['project_id'])) ?>
</td>
<td>
<?= $this->text->e($task['column_name']) ?>
</td>
<td>
<?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
</td>
<td>
<?php if ($task['assignee_username']): ?>
<?= $this->text->e($task['assignee_name'] ?: $task['assignee_username']) ?>
<?php else: ?>
<?= t('Unassigned') ?>
<?php endif ?>
</td>
<td>
<?= $this->dt->date($task['date_started']) ?>
</td>
<td>
<?= $this->dt->date($task['date_due']) ?>
</td>
</tr>
<?php endforeach ?>
</table>
<?= $paginator ?>
<?php endif ?>

View File

@@ -0,0 +1,16 @@
<?php if (empty($users)): ?>
<p><?= t('There is no project member.') ?></p>
<?php else: ?>
<table>
<?php foreach ($roles as $role => $role_name): ?>
<?php if (isset($users[$role])): ?>
<tr><th><?= $role_name ?></th></tr>
<?php foreach ($users[$role] as $user_id => $user): ?>
<tr><td>
<?= $this->url->link($this->text->e($user), 'ProjectUserOverviewController', 'opens', array('user_id' => $user_id)) ?>
</td></tr>
<?php endforeach ?>
<?php endif ?>
<?php endforeach ?>
</table>
<?php endif ?>