看板初始化提交

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
+14
View File
@@ -0,0 +1,14 @@
<div class="page-header">
<h2><?= t('Add a new category') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('CategoryController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Category Name'), 'name') ?>
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required')) ?>
<?= $this->form->label(t('Color'), 'color_id') ?>
<?= $this->form->select('color_id', array('' => t('No color')) + $colors, $values, $errors, array(), 'color-picker') ?>
<?= $this->modal->submitButtons() ?>
</form>
+18
View File
@@ -0,0 +1,18 @@
<div class="page-header">
<h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2>
</div>
<form method="post" action="<?= $this->url->href('CategoryController', 'update', array('project_id' => $project['id'], 'category_id' => $values['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->label(t('Category 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('Color'), 'color_id') ?>
<?= $this->form->select('color_id', array('' => t('No color')) + $colors, $values, $errors, array(), 'color-picker') ?>
<?= $this->modal->submitButtons() ?>
</form>
+42
View File
@@ -0,0 +1,42 @@
<div class="page-header">
<h2><?= t('Categories') ?></h2>
<ul>
<li>
<?= $this->modal->medium('plus', t('Add a new category'), 'CategoryController', 'create', array('project_id' => $project['id'])) ?>
</li>
</ul>
</div>
<?php if (empty($categories)): ?>
<p class="alert"><?= t('There is no category in this project.') ?></p>
<?php else: ?>
<table class="table-striped">
<tr>
<th><?= t('Category Name') ?></th>
<th><?= t('Color') ?></th>
</tr>
<?php foreach ($categories as $category): ?>
<tr>
<td>
<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'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category['id'])) ?>
</li>
<li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category['id'])) ?>
</li>
</ul>
</div>
<?= $this->text->e($category['name']) ?>
<?php if (! empty($category['description'])): ?>
<?= $this->app->tooltipMarkdown($category['description']) ?>
<?php endif ?>
</td>
<td><?= $this->text->e($colors[$category['color_id']] ?? '') ?></td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>
+15
View File
@@ -0,0 +1,15 @@
<div class="page-header">
<h2><?= t('Remove a category') ?></h2>
</div>
<div class="confirm">
<p class="alert alert-info">
<?= t('Do you really want to remove this category: "%s"?', $category['name']) ?>
</p>
<?= $this->modal->confirmButtons(
'CategoryController',
'remove',
array('project_id' => $project['id'], 'category_id' => $category['id'])
) ?>
</div>