Project

General

Profile

Patch #13747 » redmine_issue_colors_and_icons_v2.diff

Patch for issue colors, Version 2 - Daniel Felix, 2013-04-15 12:41

View differences:

app/models/issue.rb
961 961

  
962 962
  # Returns a string of css classes that apply to the issue
963 963
  def css_classes
964
    s = "issue tracker-#{tracker_id} status-#{status_id} #{priority.try(:css_classes)}"
964
    s = "issue tracker-#{tracker_id} tracker-#{tracker.name.downcase} status-#{status_id} status-#{status.name.downcase} #{priority.try(:css_classes)}"
965
    s << ' open' unless closed?
965 966
    s << ' closed' if closed?
967
    s << ' timed' unless due_date.blank?
966 968
    s << ' overdue' if overdue?
967 969
    s << ' child' if child?
968 970
    s << ' parent' unless leaf?
public/stylesheets/application.css
146 146
tr.project.idnt-8 td.name {padding-left: 11em;}
147 147
tr.project.idnt-9 td.name {padding-left: 12.5em;}
148 148

  
149
/* Issue priority colors */
150
/* default */
151
tr.issue.odd td, tr.issue.even td{color:#484848; padding: 5px;}
152
tr.issue.context-menu-selection.odd td, tr.issue.context-menu-selection.even td{color:#F8F8F8; padding: 5px;}
153
/* special color fields */
154
tr.issue.odd td.priority, tr.issue.even td.priority,
155
tr.issue.odd td.status, tr.issue.even td.status{color:#484848;}
156

  
157
/* low */
158
tr.issue.odd.priority-1 td.priority{background: #d6ffd0; border-color: #a5d690;}
159
tr.issue.even.priority-1 td.priority{background: #e2ffde; border-color: #a5d690;}
160
/* normal */
161
tr.issue.odd.priority-2 td.priority{background: #eaf7ff; border-color: #add7f3;}
162
tr.issue.even.priority-2 td.priority{background: #f2faff; border-color: #add7f3;}
163
/* high */
164
tr.issue.odd.priority-3 td.priority{background: #fffbca; border-color: #d7d290;}
165
tr.issue.even.priority-3 td.priority{background: #fffcdb;border-color: #d7d290;}
166
/* urgent */
167
tr.issue.odd.priority-4 td.priority{background-color: #FF9999; border-color:#FF8888;}
168
tr.issue.even.priority-4 td.priority{background-color: #FFBBBB; border-color:#FFA0A0;}
169
/* immediate */
170
tr.issue.odd.priority-5 td.priority{background-color: #FF9999; border-color: #FF8888; font-weight: bold;}
171
tr.issue.even.priority-5 td.priority{background-color: #FFBBBB; border-color: #FFA0A0; font-weight: bold;}
172

  
173
/* Issue status colors */
174
/* new */
175
tr.issue.odd.status-1 td.status{background: #eaf7ff; font-weight: bold; border-color: #add7f3;}
176
tr.issue.even.status-1 td.status{background: #f2faff; font-weight: bold; border-color: #add7f3;}
177
/* in progress */
178
tr.issue.odd.status-2 td.status{background: #fffbca; border-color: #d7d290;}
179
tr.issue.even.status-2 td.status{background: #fffcdb; border-color: #d7d290;}
180
/* resolved */ 
181
tr.issue.odd.status-3 td.status{background: #d6ffd0; border-color: #a5d690; font-style: italic;}
182
tr.issue.even.status-3 td.status{background: #e2ffde; border-color: #a5d690; font-style: italic;}
183
/* feedback */
184
tr.issue.odd.status-4 td.status{background: #d6ffd0; border-color: #a5d690;}
185
tr.issue.even.status-4 td.status{background: #e2ffde; border-color: #a5d690;}
186
/* closed */
187
tr.issue.odd.status-5 td.status{background: #d6ffd0; font-weight:bold; border-color: #a5d690;}
188
tr.issue.even.status-5 td.status{background: #e2ffde; font-weight:bold; border-color: #a5d690;}
189
/* rejected */
190
tr.issue.odd.status-6 td.status{background: #FF9999; font-weight: bold; border-color: #FF8888;}
191
tr.issue.even.status-6 td.status{background: #FFBBBB; font-weight: bold; border-color: #FFA0A0;}
192

  
193
/* issue tracker icons */
194
/* default */
195
tr.issue td.tracker:before{content:"";display:block;float:left;background:url("../images/page_white.png") no-repeat;width:16px;height:16px;}
196
/* bug */
197
tr.issue.tracker-1 td.tracker:before{background:url("../images/bug.png") no-repeat;}
198
/* feature */
199
tr.issue.tracker-2 td.tracker:before{background:url("../images/brick_add.png") no-repeat;}
200
/* support */
201
tr.issue.tracker-3 td.tracker:before{background:url("../images/shield.png") no-repeat;}
202

  
203
/* issue due_date */
204
tr.issue td.id:before{content:"";display:block;float:left;width:16px;height:16px;margin-right:2px;}
205
tr.issue.open.timed td.id:before{background:url("../images/clock.png") no-repeat;}
206
tr.issue.open.overdue td.id:before{background:url("../images/clock_red.png") no-repeat;}
207
tr.issue.open.overdue td.id a,tr.issue.open.overdue td.due_date{color:#F33;}
208

  
149 209
tr.issue { text-align: center; white-space: nowrap; }
150 210
tr.issue td.subject, tr.issue td.category, td.assigned_to, tr.issue td.string, tr.issue td.text, tr.issue td.relations { white-space: normal; }
151 211
tr.issue td.subject, tr.issue td.relations { text-align: left; }
(9-9/29)