summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 09:42:01 -0500
commitde128dbad860478496a0d655b5eb5c1005ebbabe (patch)
tree7fee510e901273472731e8e843981268c593ec40 /app/Template
parent0430a09c069134622c0161dc2fb9ba3718a73c0d (diff)
Remove default swimlane
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/project_creation/create.php1
-rw-r--r--app/Template/project_view/duplicate.php1
-rw-r--r--app/Template/search/results.php2
-rw-r--r--app/Template/swimlane/edit_default.php14
-rw-r--r--app/Template/swimlane/index.php17
-rw-r--r--app/Template/swimlane/table.php27
-rw-r--r--app/Template/task_duplication/copy.php2
-rw-r--r--app/Template/task_duplication/move.php2
-rw-r--r--app/Template/task_list/show.php2
9 files changed, 13 insertions, 55 deletions
diff --git a/app/Template/project_creation/create.php b/app/Template/project_creation/create.php
index 171bd17a..3317a61e 100644
--- a/app/Template/project_creation/create.php
+++ b/app/Template/project_creation/create.php
@@ -25,7 +25,6 @@
<?= $this->form->checkbox('categoryModel', t('Categories'), 1, true) ?>
<?= $this->form->checkbox('tagDuplicationModel', t('Tags'), 1, true) ?>
<?= $this->form->checkbox('actionModel', t('Actions'), 1, true) ?>
- <?= $this->form->checkbox('swimlaneModel', t('Swimlanes'), 1, true) ?>
<?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?>
</div>
diff --git a/app/Template/project_view/duplicate.php b/app/Template/project_view/duplicate.php
index 561378d1..d24a52a0 100644
--- a/app/Template/project_view/duplicate.php
+++ b/app/Template/project_view/duplicate.php
@@ -17,7 +17,6 @@
<?= $this->form->checkbox('categoryModel', t('Categories'), 1, true) ?>
<?= $this->form->checkbox('tagDuplicationModel', t('Tags'), 1, true) ?>
<?= $this->form->checkbox('actionModel', t('Actions'), 1, true) ?>
- <?= $this->form->checkbox('swimlaneModel', t('Swimlanes'), 1, false) ?>
<?= $this->form->checkbox('projectMetadataModel', t('Metadata'), 1, false) ?>
<?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?>
diff --git a/app/Template/search/results.php b/app/Template/search/results.php
index 8c439a8a..3fbfc314 100644
--- a/app/Template/search/results.php
+++ b/app/Template/search/results.php
@@ -19,7 +19,7 @@
<?= $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->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
+ <?= $this->text->e($task['swimlane_name']) ?>
</td>
<td>
<?= $this->text->e($task['column_name']) ?>
diff --git a/app/Template/swimlane/edit_default.php b/app/Template/swimlane/edit_default.php
deleted file mode 100644
index a2c3ee73..00000000
--- a/app/Template/swimlane/edit_default.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<div class="page-header">
- <h2><?= t('Change default swimlane') ?></h2>
-</div>
-<form method="post" action="<?= $this->url->href('SwimlaneController', 'updateDefault', array('project_id' => $project['id'])) ?>" autocomplete="off">
- <?= $this->form->csrf() ?>
- <?= $this->form->hidden('id', $values) ?>
-
- <?= $this->form->label(t('Name'), 'default_swimlane') ?>
- <?= $this->form->text('default_swimlane', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
-
- <?= $this->form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, $values['show_default_swimlane'] == 1) ?>
-
- <?= $this->modal->submitButtons() ?>
-</form>
diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php
index e05b9088..35bbb589 100644
--- a/app/Template/swimlane/index.php
+++ b/app/Template/swimlane/index.php
@@ -7,21 +7,22 @@
</ul>
</div>
-<?php if (! empty($active_swimlanes) || $default_swimlane['show_default_swimlane'] == 1): ?>
<h3><?= t('Active swimlanes') ?></h3>
+
+<?php if (empty($active_swimlanes)): ?>
+ <p class="alert alert-error"><?= t('Your project must have at least one active swimlane.') ?></p>
+<?php else: ?>
<?= $this->render('swimlane/table', array(
'swimlanes' => $active_swimlanes,
- 'project' => $project,
- 'default_swimlane' => $default_swimlane['show_default_swimlane'] == 1 ? $default_swimlane : array()
+ 'project' => $project,
)) ?>
<?php endif ?>
-<?php if (! empty($inactive_swimlanes) || $default_swimlane['show_default_swimlane'] == 0): ?>
+<?php if (! empty($inactive_swimlanes)): ?>
<h3><?= t('Inactive swimlanes') ?></h3>
<?= $this->render('swimlane/table', array(
- 'swimlanes' => $inactive_swimlanes,
- 'project' => $project,
- 'default_swimlane' => $default_swimlane['show_default_swimlane'] == 0 ? $default_swimlane : array(),
- 'disable_handler' => true
+ 'swimlanes' => $inactive_swimlanes,
+ 'project' => $project,
+ 'disable_handler' => true,
)) ?>
<?php endif ?>
diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php
index 2d783a00..4f87924d 100644
--- a/app/Template/swimlane/table.php
+++ b/app/Template/swimlane/table.php
@@ -6,33 +6,6 @@
<th><?= t('Name') ?></th>
<th class="column-8"><?= t('Actions') ?></th>
</tr>
-
- <?php if (! empty($default_swimlane)): ?>
- <tr>
- <td>
- <?= $this->text->e($default_swimlane['default_swimlane']) ?>
- <?php if ($default_swimlane['default_swimlane'] !== t('Default swimlane')): ?>
- &nbsp;(<?= t('Default swimlane') ?>)
- <?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', 'editDefault', array('project_id' => $project['id'])) ?>
- </li>
- <li>
- <?php if ($default_swimlane['show_default_swimlane'] == 1): ?>
- <?= $this->url->icon('toggle-off', t('Disable'), 'SwimlaneController', 'disableDefault', array('project_id' => $project['id']), true) ?>
- <?php else: ?>
- <?= $this->url->icon('toggle-on', t('Enable'), 'SwimlaneController', 'enableDefault', array('project_id' => $project['id']), true) ?>
- <?php endif ?>
- </li>
- </ul>
- </td>
- </tr>
- <?php endif ?>
</thead>
<tbody>
<?php foreach ($swimlanes as $swimlane): ?>
diff --git a/app/Template/task_duplication/copy.php b/app/Template/task_duplication/copy.php
index d96960fc..0aa990b7 100644
--- a/app/Template/task_duplication/copy.php
+++ b/app/Template/task_duplication/copy.php
@@ -27,7 +27,7 @@
<?= $this->form->label(t('Swimlane'), 'swimlane_id') ?>
<?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?>
- <p class="form-help"><?= t('Current swimlane: %s', $task['swimlane_name'] ?: e($task['default_swimlane'])) ?></p>
+ <p class="form-help"><?= t('Current swimlane: %s', $task['swimlane_name']) ?></p>
<?= $this->form->label(t('Column'), 'column_id') ?>
<?= $this->form->select('column_id', $columns_list, $values) ?>
diff --git a/app/Template/task_duplication/move.php b/app/Template/task_duplication/move.php
index 16ce2464..1564a577 100644
--- a/app/Template/task_duplication/move.php
+++ b/app/Template/task_duplication/move.php
@@ -28,7 +28,7 @@
<?= $this->form->label(t('Swimlane'), 'swimlane_id') ?>
<?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?>
- <p class="form-help"><?= t('Current swimlane: %s', $task['swimlane_name'] ?: e($task['default_swimlane'])) ?></p>
+ <p class="form-help"><?= t('Current swimlane: %s', $task['swimlane_name']) ?></p>
<?= $this->form->label(t('Column'), 'column_id') ?>
<?= $this->form->select('column_id', $columns_list, $values) ?>
diff --git a/app/Template/task_list/show.php b/app/Template/task_list/show.php
index 4a2ebeba..ecfdeb87 100644
--- a/app/Template/task_list/show.php
+++ b/app/Template/task_list/show.php
@@ -26,7 +26,7 @@
<?php endif ?>
</td>
<td>
- <?= $this->text->e($task['swimlane_name'] ?: $task['default_swimlane']) ?>
+ <?= $this->text->e($task['swimlane_name']) ?>
</td>
<td>
<?= $this->text->e($task['column_name']) ?>