Изменить цвет фона в соответствии со статусом в Redmine

Всем привет! Сегодня я расскажу как изменить цвет фона в соответствии со статусом в Redmine. Это очень удобно при работе со списком задач. Делается это достаточно просто.

Решение

Для того, чтобы изменить цвет фона в соответствии со статусом в Redmine необходимо в файл application.css вашей темы добавить следующие строчки:

/* issues links are underlined (bold inherited) */
#content table.list tr.issue a { color: #000000; text-decoration: underline; }
/* issue list:  colours black the progress bar */
#content .list .issue .done_ratio .progress .todo { background: #ffffff; }
#content .list .issue .done_ratio .progress .closed { background: #000000; }
/* issue view: underline the links and colour black the progress bar
   (bold inherited) */
#content .issue h3 { color: #000000; }
#content .issue a { color: #000000; text-decoration: underline; }
#content .issue .attributes .progress .progress .todo { background: #ffffff; }
#content .issue .attributes .progress .progress .closed { background: #000000; }
#content .details { background: #ffffbb }
/* IMMEDIATE, URGENT, HIGH, NORMAL, LOW */
/* Issues list */

/* status NEW */
.status-1.priority-5 { background: #fe4040; } /* priority IMMEDIATE */
.status-1.priority-4 { background: #fe6060; } /* priority URGENT  */
.status-1.priority-3 { background: #fe8080; } /* priority HIGH */
.status-1.priority-2 { background: #fea0a0; } /* priority NORMAL */
.status-1.priority-1 { background: #fec0c0; } /* priority LOW */
/* status ASSIGNED */
.status-2.priority-5 { background: #5858ff; } /* priority IMMEDIATE */
.status-2.priority-4 { background: #7878ff; } /* priority URGENT  */
.status-2.priority-3 { background: #9898ff; } /* priority HIGH */
.status-2.priority-2 { background: #b8b8ff; } /* priority NORMAL */
.status-2.priority-1 { background: #d8d8ff; } /* priority LOW */
/* status ACKNOWLEDGED */
.status-3.priority-5 { background: #008833; } /* priority IMMEDIATE */
.status-3.priority-4 { background: #00aa55; } /* priority URGENT  */
.status-3.priority-3 { background: #00cc77; } /* priority HIGH */
.status-3.priority-2 { background: #00ee99; } /* priority NORMAL */
.status-3.priority-1 { background: #99ffbb; } /* priority LOW */
/* status REJECTED */
.status-4.priority-5 { background: #ffbb22; } /* priority IMMEDIATE */
.status-4.priority-4 { background: #ffcc44; } /* priority URGENT  */
.status-4.priority-3 { background: #ffdd66; } /* priority HIGH */
.status-4.priority-2 { background: #ffee88; } /* priority NORMAL */
.status-4.priority-1 { background: #ffffaa; } /* priority LOW */
/* status CLOSED */
.status-5.priority-5 { background: #555555; } /* priority IMMEDIATE */
.status-5.priority-4 { background: #777777; } /* priority URGENT  */
.status-5.priority-3 { background: #999999; } /* priority HIGH */
.status-5.priority-2 { background: #bbbbbb; } /* priority NORMAL */
.status-5.priority-1 { background: #dddddd; } /* priority LOW */

Получится в итоге так:

Цвета назначьте на свой вкус. Проверено, работает. Всем удачи!

Спасибо за подсказку https://www.redmine.org/issues/4967

Размещено в Redmine и отмечено .

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.