diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/column/index.php | 6 | ||||
-rw-r--r-- | app/Template/dashboard/projects.php | 2 | ||||
-rw-r--r-- | app/Template/project_list/show.php | 2 | ||||
-rw-r--r-- | app/Template/project_overview/columns.php | 4 | ||||
-rw-r--r-- | app/Template/project_overview/show.php | 2 | ||||
-rw-r--r-- | app/Template/project_user_overview/roles.php | 2 | ||||
-rw-r--r-- | app/Template/project_view/show.php | 94 |
7 files changed, 54 insertions, 58 deletions
diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 0b14e341..6108661b 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -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'] ?> diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php index f8806c01..7e35b059 100644 --- a/app/Template/dashboard/projects.php +++ b/app/Template/dashboard/projects.php @@ -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> diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php index a6364585..9dfae24c 100644 --- a/app/Template/project_list/show.php +++ b/app/Template/project_list/show.php @@ -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> diff --git a/app/Template/project_overview/columns.php b/app/Template/project_overview/columns.php index daae9ca7..f1472ff3 100644 --- a/app/Template/project_overview/columns.php +++ b/app/Template/project_overview/columns.php @@ -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 ?> diff --git a/app/Template/project_overview/show.php b/app/Template/project_overview/show.php index d87b2775..8bd711f0 100644 --- a/app/Template/project_overview/show.php +++ b/app/Template/project_overview/show.php @@ -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)) ?> diff --git a/app/Template/project_user_overview/roles.php b/app/Template/project_user_overview/roles.php index 011714d4..b8c67323 100644 --- a/app/Template/project_user_overview/roles.php +++ b/app/Template/project_user_overview/roles.php @@ -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> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php index 29d558b1..7dee08be 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -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 ?> |