Allow to associate project categories to colors
The color is then used as background in the board and list views
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<div class="task-board-category-container task-board-category-container-color">
|
||||
<span class="task-board-category category-<?= $this->text->e($task['category_name']) ?>">
|
||||
<span class="task-board-category category-<?= $this->text->e($task['category_name']) ?> <?= $task['category_color_id'] ? "color-{$task['category_color_id']}" : '' ?>">
|
||||
<?php if ($not_editable): ?>
|
||||
<?= $this->text->e($task['category_name']) ?>
|
||||
<?php else: ?>
|
||||
|
||||
@@ -7,5 +7,8 @@
|
||||
<?= $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>
|
||||
|
||||
@@ -11,5 +11,8 @@
|
||||
<?= $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>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<?= $this->text->e($task['column_name']) ?>
|
||||
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<span class="table-list-category">
|
||||
<span class="table-list-category <?= $task['category_color_id'] ? "color-{$task['category_color_id']}" : '' ?>">
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->url->link(
|
||||
$this->text->e($task['category_name']),
|
||||
|
||||
Reference in New Issue
Block a user