Add colors to tag and category list

Add colors to:

- Global tag list
- Project tag list
- Project category list
This commit is contained in:
Timo
2019-11-22 04:36:19 +01:00
committed by Frédéric Guillot
parent 75682398c1
commit f0b53863fb
6 changed files with 10 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
<table class="table-striped">
<tr>
<th><?= t('Category Name') ?></th>
<th><?= t('Color') ?></th>
</tr>
<?php foreach ($categories as $category): ?>
<tr>
@@ -34,6 +35,7 @@
<?= $this->app->tooltipMarkdown($category['description']) ?>
<?php endif ?>
</td>
<td><?= $this->text->e($colors[$category['color_id']] ?? '') ?></td>
</tr>
<?php endforeach ?>
</table>

View File

@@ -13,6 +13,7 @@
<table class="table-striped table-scrolling">
<tr>
<th><?= t('Tag') ?></th>
<th><?= t('Color') ?></th>
</tr>
<?php foreach ($tags as $tag): ?>
<tr>
@@ -30,6 +31,7 @@
</div>
<?= $this->text->e($tag['name']) ?>
</td>
<td><?= $this->text->e($colors[$tag['color_id']] ?? '') ?></td>
</tr>
<?php endforeach ?>
</table>

View File

@@ -12,12 +12,14 @@
<?php else: ?>
<table class="table-striped table-scrolling">
<tr>
<th class="column-80"><?= t('Tag') ?></th>
<th class="column-60"><?= t('Tag') ?></th>
<th class="column-20"><?= t('Color') ?></th>
<th><?= t('Action') ?></th>
</tr>
<?php foreach ($tags as $tag): ?>
<tr>
<td><?= $this->text->e($tag['name']) ?></td>
<td><?= $this->text->e($colors[$tag['color_id']] ?? '') ?></td>
<td>
<?= $this->modal->medium('edit', t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id'])) ?>
<?= $this->modal->confirm('trash-o', t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id'])) ?>