看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 27411ebedc
1827 changed files with 192340 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<div class="page-header">
<h2><?= t('Add a new swimlane') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('SwimlaneController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Name'), 'name') ?>
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="191"', 'tabindex="1"')) ?>
<?= $this->form->label(t('Description'), 'description') ?>
<?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?>
<?= $this->form->label(t('Task limit'), 'task_limit') ?>
<?= $this->form->number('task_limit', $values, $errors, array('tabindex' => 3, 'min="0"')) ?>
<?= $this->modal->submitButtons() ?>
</form>
+18
View File
@@ -0,0 +1,18 @@
<div class="page-header">
<h2><?= t('Swimlane modification for the project "%s"', $project['name']) ?></h2>
</div>
<form method="post" action="<?= $this->url->href('SwimlaneController', 'update', array('project_id' => $project['id'], 'swimlane_id' => $values['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Name'), 'name') ?>
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="191"', 'tabindex="1"')) ?>
<?= $this->form->label(t('Description'), 'description') ?>
<?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?>
<?= $this->form->label(t('Task limit'), 'task_limit') ?>
<?= $this->form->number('task_limit', $values, $errors, array('tabindex' => 3, 'min="0"')) ?>
<?= $this->modal->submitButtons() ?>
</form>
+28
View File
@@ -0,0 +1,28 @@
<div class="page-header">
<h2><?= t('Swimlanes') ?></h2>
<ul>
<li>
<?= $this->modal->medium('plus', t('Add a new swimlane'), 'SwimlaneController', 'create', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div>
<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,
)) ?>
<?php endif ?>
<?php if (! empty($inactive_swimlanes)): ?>
<h3><?= t('Inactive swimlanes') ?></h3>
<?= $this->render('swimlane/table', array(
'swimlanes' => $inactive_swimlanes,
'project' => $project,
'disable_handle' => true,
)) ?>
<?php endif ?>
+15
View File
@@ -0,0 +1,15 @@
<div class="page-header">
<h2><?= t('Remove a swimlane') ?></h2>
</div>
<div class="confirm">
<p class="alert alert-info">
<?= t('Do you really want to remove this swimlane: "%s"?', $swimlane['name']) ?>
</p>
<?= $this->modal->confirmButtons(
'SwimlaneController',
'remove',
array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])
) ?>
</div>
+59
View File
@@ -0,0 +1,59 @@
<table
class="swimlanes-table table-striped table-scrolling"
data-save-position-url="<?= $this->url->href('SwimlaneController', 'move', array('project_id' => $project['id'], 'csrf_token' => $this->app->getToken()->getReusableCSRFToken())) ?>">
<thead>
<tr>
<th><?= t('Name') ?></th>
<th class="column-15"><?= t('Task limit') ?></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_handle)): ?>
<i class="fa fa-arrows-alt draggable-row-handle" title="<?= t('Change column position') ?>" role="button" aria-label="<?= t('Change column position') ?>"></i>&nbsp;
<?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'])): ?>
<?= $this->app->tooltipMarkdown($swimlane['description']) ?>
<?php endif ?>
</td>
<td>
<?= $swimlane['task_limit'] > 0 ? $swimlane['task_limit'] : '∞' ?>
</td>
<td>
<?= $swimlane['nb_open_tasks'] ?>
</td>
<td>
<?= $swimlane['nb_closed_tasks'] ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>