diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-08 18:36:13 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-08 18:36:13 -0500 |
commit | 73dce1279760434e1d1b7a903a0a7500462d6f9c (patch) | |
tree | 59a4fa8b6aa0215c658d339e6a31a0ba32b10036 /app/Template/column | |
parent | d3650eaa2582f6224eb5f5549829b7a84cda1ea4 (diff) |
Prevent people to remove columns that contains tasks
Diffstat (limited to 'app/Template/column')
-rw-r--r-- | app/Template/column/index.php | 14 | ||||
-rw-r--r-- | app/Template/column/remove.php | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/Template/column/index.php b/app/Template/column/index.php index eaaae332..0b14e341 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -15,10 +15,12 @@ data-save-position-url="<?= $this->url->href('ColumnController', 'move', array('project_id' => $project['id'])) ?>"> <thead> <tr> - <th class="column-70"><?= t('Column title') ?></th> + <th class="column-40"><?= t('Column title') ?></th> <th class="column-10"><?= t('Task limit') ?></th> <th class="column-20"><?= t('Visible on dashboard') ?></th> - <th class="column-5"><?= t('Actions') ?></th> + <th class="column-10"><?= t('Open tasks') ?></th> + <th class="column-10"><?= t('Closed tasks') ?></th> + <th><?= t('Actions') ?></th> </tr> </thead> <tbody> @@ -40,15 +42,23 @@ <?= $column['hide_in_dashboard'] == 1 ? t('Yes') : t('No') ?> </td> <td> + <?= $column['nb_open_tasks'] ?> + </td> + <td> + <?= $column['nb_closed_tasks'] ?> + </td> + <td> <div class="dropdown"> <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a> <ul> <li> <?= $this->modal->medium('edit', t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> + <?php if ($column['nb_open_tasks'] == 0 && $column['nb_closed_tasks'] == 0): ?> <li> <?= $this->modal->confirm('trash-o', t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> + <?php endif ?> </ul> </div> </td> diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php index 4134b175..b4e7942d 100644 --- a/app/Template/column/remove.php +++ b/app/Template/column/remove.php @@ -5,7 +5,6 @@ <div class="confirm"> <p class="alert alert-info"> <?= t('Do you really want to remove this column: "%s"?', $column['title']) ?> - <?= t('This action will REMOVE ALL TASKS associated to this column!') ?> </p> <?= $this->modal->confirmButtons( |