From fe45ce5447cce5328e256c6db777191cbab65a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 18 Oct 2018 21:31:02 +0200 Subject: [PATCH] add color to task status --- CHANGELOG.md | 1 + Resources/public/sass/_task-statuses.scss | 34 ++++++++++++++++++++++ Resources/public/sass/_task.scss | 1 + Resources/views/SingleTask/_list.html.twig | 2 +- Resources/views/SingleTask/show.html.twig | 11 ++----- 5 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 Resources/public/sass/_task-statuses.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index 5505240e4..899141238 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,4 +5,5 @@ Branch master - add assignee in task list; - fix some translation; - add a filtering by center on list; +- add color in boxes for task statuses; diff --git a/Resources/public/sass/_task-statuses.scss b/Resources/public/sass/_task-statuses.scss new file mode 100644 index 000000000..5e371359e --- /dev/null +++ b/Resources/public/sass/_task-statuses.scss @@ -0,0 +1,34 @@ +.task-status { + &.box { + font-variant: small-caps; + display: inline; + padding: .2em .6em .3em; + font-size: 0.88rem; + font-weight: bold; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em; + color: white; + } + + &.type-task_default { + // 'new', 'in_progress', 'closed', 'canceled' + &.place-new { + background-color: var(--chill-yellow); + } + + &.place-in_progress { + background-color: var(--chill-green); + } + + &.place-closed { + background-color: var(--chill-blue); + } + + &.place-canceled { + background-color: var(--chill-beige); + } + } +} diff --git a/Resources/public/sass/_task.scss b/Resources/public/sass/_task.scss index 308f9cbfd..6f28b5164 100644 --- a/Resources/public/sass/_task.scss +++ b/Resources/public/sass/_task.scss @@ -1,4 +1,5 @@ @import '../../../../main/Resources/public/sass/custom/config/colors'; +@import "_task-statuses.scss"; div#single_task_warningInterval { display: flex; diff --git a/Resources/views/SingleTask/_list.html.twig b/Resources/views/SingleTask/_list.html.twig index 4af98d5b3..3a2af26e0 100644 --- a/Resources/views/SingleTask/_list.html.twig +++ b/Resources/views/SingleTask/_list.html.twig @@ -24,7 +24,7 @@ {% endif %} {% for place in workflow_marked_places(task) %} - {{ place|trans }} + {{ place|trans }} {% endfor %} {% if task.assignee is not null %} diff --git a/Resources/views/SingleTask/show.html.twig b/Resources/views/SingleTask/show.html.twig index cc046b8db..7c35e010a 100644 --- a/Resources/views/SingleTask/show.html.twig +++ b/Resources/views/SingleTask/show.html.twig @@ -25,17 +25,12 @@ {% block personcontent %}

{{ 'Task'|trans }}

-

{{ task.title }}

+

{{ task.title }} {% for place in workflow_marked_places(task) %} + {{ place|trans }} + {% endfor %}

-
{{ 'Task status'|trans }}
-
- {% for place in workflow_marked_places(task) %} - {{ place|trans }} - {% endfor %} -
-
{{ 'Description'|trans }}
{% if task.description is empty %}