From f0b53863fbf4aee56f8c7ce036ea4d1713cec82b Mon Sep 17 00:00:00 2001 From: Timo Date: Fri, 22 Nov 2019 04:36:19 +0100 Subject: [PATCH] Add colors to tag and category list Add colors to: - Global tag list - Project tag list - Project category list --- app/Controller/CategoryController.php | 1 + app/Controller/ProjectTagController.php | 1 + app/Controller/TagController.php | 1 + app/Template/category/index.php | 2 ++ app/Template/project_tag/index.php | 2 ++ app/Template/tag/index.php | 4 +++- 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Controller/CategoryController.php b/app/Controller/CategoryController.php index c2b8c2a68..292e7119a 100644 --- a/app/Controller/CategoryController.php +++ b/app/Controller/CategoryController.php @@ -25,6 +25,7 @@ class CategoryController extends BaseController $this->response->html($this->helper->layout->project('category/index', array( 'categories' => $this->categoryModel->getAll($project['id']), 'project' => $project, + 'colors' => $this->colorModel->getList(), 'title' => t('Categories'), ))); } diff --git a/app/Controller/ProjectTagController.php b/app/Controller/ProjectTagController.php index 719853368..815363293 100644 --- a/app/Controller/ProjectTagController.php +++ b/app/Controller/ProjectTagController.php @@ -17,6 +17,7 @@ class ProjectTagController extends BaseController $this->response->html($this->helper->layout->project('project_tag/index', array( 'project' => $project, 'tags' => $this->tagModel->getAllByProject($project['id']), + 'colors' => $this->colorModel->getList(), 'title' => t('Project tags management'), ))); } diff --git a/app/Controller/TagController.php b/app/Controller/TagController.php index b550cf581..6ad9ac8f5 100644 --- a/app/Controller/TagController.php +++ b/app/Controller/TagController.php @@ -16,6 +16,7 @@ class TagController extends BaseController { $this->response->html($this->helper->layout->config('tag/index', array( 'tags' => $this->tagModel->getAllByProject(0), + 'colors' => $this->colorModel->getList(), 'title' => t('Settings').' > '.t('Global tags management'), ))); } diff --git a/app/Template/category/index.php b/app/Template/category/index.php index 1ef67fdb9..36f666da9 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -12,6 +12,7 @@ + @@ -34,6 +35,7 @@ app->tooltipMarkdown($category['description']) ?> +
text->e($colors[$category['color_id']] ?? '') ?>
diff --git a/app/Template/project_tag/index.php b/app/Template/project_tag/index.php index 7c3470566..1322bf233 100644 --- a/app/Template/project_tag/index.php +++ b/app/Template/project_tag/index.php @@ -13,6 +13,7 @@ + @@ -30,6 +31,7 @@ text->e($tag['name']) ?> +
text->e($colors[$tag['color_id']] ?? '') ?>
diff --git a/app/Template/tag/index.php b/app/Template/tag/index.php index 834e8e7cf..b32c9a7a9 100644 --- a/app/Template/tag/index.php +++ b/app/Template/tag/index.php @@ -12,12 +12,14 @@ - + + +
text->e($tag['name']) ?>text->e($colors[$tag['color_id']] ?? '') ?> modal->medium('edit', t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id'])) ?> modal->confirm('trash-o', t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id'])) ?>