Prevent people to remove swimlanes that contains tasks
This commit is contained in:
@@ -15,19 +15,31 @@
|
||||
data-save-position-url="<?= $this->url->href('ColumnController', 'move', array('project_id' => $project['id'])) ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-40"><?= t('Column') ?></th>
|
||||
<th><?= 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>
|
||||
<th class="column-10"><?= t('Closed tasks') ?></th>
|
||||
<th><?= t('Actions') ?></th>
|
||||
<th class="column-15"><?= t('Visible on dashboard') ?></th>
|
||||
<th class="column-12"><?= t('Open tasks') ?></th>
|
||||
<th class="column-12"><?= t('Closed tasks') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($columns as $column): ?>
|
||||
<tr data-column-id="<?= $column['id'] ?>">
|
||||
<td>
|
||||
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
|
||||
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
|
||||
<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>
|
||||
<?= $this->text->e($column['title']) ?>
|
||||
<?php if (! empty($column['description'])): ?>
|
||||
<span class="tooltip" title="<?= $this->text->markdownAttribute($column['description']) ?>">
|
||||
@@ -47,21 +59,6 @@
|
||||
<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>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
<?= $this->render('swimlane/table', array(
|
||||
'swimlanes' => $inactive_swimlanes,
|
||||
'project' => $project,
|
||||
'disable_handler' => true,
|
||||
'disable_handle' => true,
|
||||
)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -4,17 +4,39 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?= t('Name') ?></th>
|
||||
<th class="column-8"><?= t('Actions') ?></th>
|
||||
<th class="column-15"><?= t('Open tasks') ?></th>
|
||||
<th class="column-15"><?= t('Closed tasks') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($swimlanes as $swimlane): ?>
|
||||
<tr data-swimlane-id="<?= $swimlane['id'] ?>">
|
||||
<td>
|
||||
<?php if (! isset($disable_handler)): ?>
|
||||
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
|
||||
<?php if (! isset($disable_handle)): ?>
|
||||
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>"></i>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('edit', t('Edit'), 'SwimlaneController', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($swimlane['is_active']): ?>
|
||||
<?= $this->url->icon('toggle-off', t('Disable'), 'SwimlaneController', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->icon('toggle-on', t('Enable'), 'SwimlaneController', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<?php if ($swimlane['nb_open_tasks'] == 0 && $swimlane['nb_closed_tasks'] == 0): ?>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'SwimlaneController', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?= $this->text->e($swimlane['name']) ?>
|
||||
|
||||
<?php if (! empty($swimlane['description'])): ?>
|
||||
@@ -24,24 +46,10 @@
|
||||
<?php endif ?>
|
||||
</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'), 'SwimlaneController', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php if ($swimlane['is_active']): ?>
|
||||
<?= $this->url->icon('toggle-off', t('Disable'), 'SwimlaneController', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->icon('toggle-on', t('Enable'), 'SwimlaneController', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'SwimlaneController', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?= $swimlane['nb_open_tasks'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $swimlane['nb_closed_tasks'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
|
||||
Reference in New Issue
Block a user