Improve columns table in project settings
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
data-save-position-url="<?= $this->url->href('ColumnController', 'move', array('project_id' => $project['id'])) ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-40"><?= t('Column title') ?></th>
|
||||
<th class="column-40"><?= t('Column') ?></th>
|
||||
<th class="column-10"><?= t('Task limit') ?></th>
|
||||
<th class="column-20"><?= t('Visible on dashboard') ?></th>
|
||||
<th class="column-10"><?= t('Open tasks') ?></th>
|
||||
@@ -36,10 +36,10 @@
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->text->e($column['task_limit']) ?>
|
||||
<?= $column['task_limit'] ?: '∞' ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['hide_in_dashboard'] == 1 ? t('Yes') : t('No') ?>
|
||||
<?= $column['hide_in_dashboard'] == 0 ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['nb_open_tasks'] ?>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</td>
|
||||
<td class="dashboard-project-stats">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_open_tasks'] ?></strong>
|
||||
<small><?= $this->text->e($column['title']) ?></small>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<?php endif ?>
|
||||
<td class="dashboard-project-stats">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_open_tasks'] ?></strong>
|
||||
<small><?= $this->text->e($column['title']) ?></small>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="project-overview-columns">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<div class="project-overview-column">
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_open_tasks'] ?></strong>
|
||||
<small><?= $this->text->e($column['title']) ?></small>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="main">
|
||||
<?= $this->projectHeader->render($project, 'ProjectOverviewController', 'show') ?>
|
||||
<?= $this->render('project_overview/columns', array('project' => $project)) ?>
|
||||
<?= $this->render('project_overview/columns', array('project' => $project, 'columns' => $columns)) ?>
|
||||
<?= $this->hook->render('template:project-overview:before-description', array('project' => $project)) ?>
|
||||
<?= $this->render('project_overview/description', array('project' => $project)) ?>
|
||||
<?= $this->render('project_overview/attachments', array('project' => $project, 'images' => $images, 'files' => $files)) ?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</td>
|
||||
<td class="dashboard-project-stats">
|
||||
<?php foreach ($project['columns'] as $column): ?>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
|
||||
<strong title="<?= t('Task count') ?>"><?= $column['nb_open_tasks'] ?></strong>
|
||||
<span><?= $this->text->e($column['title']) ?></span>
|
||||
<?php endforeach ?>
|
||||
</td>
|
||||
|
||||
@@ -31,57 +31,8 @@
|
||||
<?php if ($project['end_date']): ?>
|
||||
<li><?= t('End date: ').$this->dt->date($project['end_date']) ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($stats['nb_tasks'] > 0): ?>
|
||||
|
||||
<?php if ($stats['nb_active_tasks'] > 0): ?>
|
||||
<li><?= $this->url->link(t('%d tasks on the board', $stats['nb_active_tasks']), 'BoardViewController', 'show', array('project_id' => $project['id'], 'search' => 'status:open')) ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($stats['nb_inactive_tasks'] > 0): ?>
|
||||
<li><?= $this->url->link(t('%d closed tasks', $stats['nb_inactive_tasks']), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => 'status:closed')) ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<li><?= t('%d tasks in total', $stats['nb_tasks']) ?></li>
|
||||
|
||||
<?php else: ?>
|
||||
<li><?= t('No task for this project') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Board') ?></h2>
|
||||
</div>
|
||||
<table class="table-striped table-scrolling">
|
||||
<tr>
|
||||
<th class="column-40"><?= t('Column') ?></th>
|
||||
<th class="column-20"><?= t('Task limit') ?></th>
|
||||
<th class="column-20"><?= t('Active tasks') ?></th>
|
||||
<th class="column-20"><?= t('Hide tasks in this column in the dashboard') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($stats['columns'] as $column): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->text->e($column['title']) ?>
|
||||
<?php if (! empty($column['description'])): ?>
|
||||
<span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td><?= $column['task_limit'] ?: '∞' ?></td>
|
||||
<td><?= $column['nb_active_tasks'] ?></td>
|
||||
<td>
|
||||
<?php if ($column['hide_in_dashboard'] == 1): ?>
|
||||
<?= t('Yes') ?>
|
||||
<?php else: ?>
|
||||
<?= t('No') ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?php if (! empty($project['description'])): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Description') ?></h2>
|
||||
@@ -91,3 +42,48 @@
|
||||
<?= $this->text->markdown($project['description']) ?>
|
||||
</article>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="page-header">
|
||||
<h2><?= t('Columns') ?></h2>
|
||||
</div>
|
||||
<?php if (empty($columns)): ?>
|
||||
<p class="alert alert-error"><?= t('Your board doesn\'t have any columns!') ?></p>
|
||||
<?php else: ?>
|
||||
<table class="table-striped table-scrolling"
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-40"><?= t('Column') ?></th>
|
||||
<th class="column-10"><?= t('Task limit') ?></th>
|
||||
<th class="column-20"><?= t('Visible on dashboard') ?></th>
|
||||
<th class="column-15"><?= t('Open tasks') ?></th>
|
||||
<th class="column-15"><?= t('Closed tasks') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<tr data-column-id="<?= $column['id'] ?>">
|
||||
<td>
|
||||
<?= $this->text->e($column['title']) ?>
|
||||
<?php if (! empty($column['description'])): ?>
|
||||
<span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['task_limit'] ?: '∞' ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['hide_in_dashboard'] == 0 ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['nb_open_tasks'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $column['nb_closed_tasks'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif ?>
|
||||
|
||||
Reference in New Issue
Block a user