diff options
Diffstat (limited to 'app/Template/swimlane')
-rw-r--r-- | app/Template/swimlane/edit_default.php | 14 | ||||
-rw-r--r-- | app/Template/swimlane/index.php | 17 | ||||
-rw-r--r-- | app/Template/swimlane/table.php | 27 |
3 files changed, 9 insertions, 49 deletions
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')): ?> - (<?= 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): ?> |