Patch #13747 » redmine_issue_colors_and_icons_v4.diff
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? |
app/views/issues/show.html.erb | ||
---|---|---|
1 | 1 |
<%= render :partial => 'action_menu' %> |
2 | 2 | |
3 |
<h2><%= issue_heading(@issue) %></h2> |
|
3 |
<h2 class="<%= 'tracker tracker-'+@issue.tracker_id.to_s+' tracker-'+@issue.tracker.name.downcase %>"><%= issue_heading(@issue) %></h2>
|
|
4 | 4 | |
5 | 5 |
<div class="<%= @issue.css_classes %> details"> |
6 | 6 |
<% if @prev_issue_id || @next_issue_id %> |
... | ... | |
21 | 21 | |
22 | 22 |
<%= avatar(@issue.author, :size => "50") %> |
23 | 23 | |
24 |
<div class="subject"> |
|
25 |
<%= render_issue_subject_with_tree(@issue) %> |
|
26 |
</div> |
|
27 |
<p class="author"> |
|
28 |
<%= authoring @issue.created_on, @issue.author %>. |
|
29 |
<% if @issue.created_on != @issue.updated_on %> |
|
30 |
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. |
|
31 |
<% end %> |
|
32 |
</p> |
|
33 | ||
34 |
<table class="attributes"> |
|
35 |
<%= issue_fields_rows do |rows| |
|
36 |
rows.left l(:field_status), h(@issue.status.name), :class => 'status' |
|
37 |
rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority' |
|
38 | ||
39 |
unless @issue.disabled_core_fields.include?('assigned_to_id') |
|
40 |
rows.left l(:field_assigned_to), avatar(@issue.assigned_to, :size => "14").to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to' |
|
41 |
end |
|
42 |
unless @issue.disabled_core_fields.include?('category_id') |
|
43 |
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category' |
|
44 |
end |
|
45 |
unless @issue.disabled_core_fields.include?('fixed_version_id') |
|
46 |
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version' |
|
47 |
end |
|
48 | ||
49 |
unless @issue.disabled_core_fields.include?('start_date') |
|
50 |
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date' |
|
51 |
end |
|
52 |
unless @issue.disabled_core_fields.include?('due_date') |
|
53 |
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' |
|
54 |
end |
|
55 |
unless @issue.disabled_core_fields.include?('done_ratio') |
|
56 |
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress' |
|
57 |
end |
|
58 |
unless @issue.disabled_core_fields.include?('estimated_hours') |
|
59 |
unless @issue.estimated_hours.nil? |
|
60 |
rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours' |
|
61 |
end |
|
62 |
end |
|
63 |
if User.current.allowed_to?(:view_time_entries, @project) |
|
64 |
rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), project_issue_time_entries_path(@project, @issue)) : "-"), :class => 'spent-time' |
|
65 |
end |
|
66 |
end %> |
|
67 |
<%= render_custom_fields_rows(@issue) %> |
|
68 |
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> |
|
69 |
</table> |
|
70 | ||
71 |
<% if @issue.description? || @issue.attachments.any? -%> |
|
72 |
<hr /> |
|
73 |
<% if @issue.description? %> |
|
74 |
<div class="description"> |
|
75 |
<div class="contextual"> |
|
76 |
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> |
|
24 |
<div class="subject"> |
|
25 |
<%= render_issue_subject_with_tree(@issue) %> |
|
77 | 26 |
</div> |
27 |
|
|
28 |
<p class="author"> |
|
29 |
<%= authoring @issue.created_on, @issue.author %>. |
|
30 |
<% if @issue.created_on != @issue.updated_on %> |
|
31 |
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. |
|
32 |
<% end %> |
|
33 |
</p> |
|
34 | ||
35 |
<table class="attributes"> |
|
36 |
<%= issue_fields_rows do |rows| |
|
37 |
rows.left l(:field_status), h(@issue.status.name), :class => 'status status-'+@issue.status.name.downcase+' status-'+@issue.status_id.to_s |
|
38 |
rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority priority-'+@issue.priority.name.downcase+' priority-'+@issue.priority_id.to_s |
|
39 | ||
40 |
unless @issue.disabled_core_fields.include?('assigned_to_id') |
|
41 |
rows.left l(:field_assigned_to), avatar(@issue.assigned_to, :size => "14").to_s.html_safe + (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to' |
|
42 |
end |
|
43 |
unless @issue.disabled_core_fields.include?('category_id') |
|
44 |
rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category' |
|
45 |
end |
|
46 |
unless @issue.disabled_core_fields.include?('fixed_version_id') |
|
47 |
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version' |
|
48 |
end |
|
49 | ||
50 |
unless @issue.disabled_core_fields.include?('start_date') |
|
51 |
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date' |
|
52 |
end |
|
53 |
unless @issue.disabled_core_fields.include?('due_date') |
|
54 |
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' |
|
55 |
end |
|
56 |
unless @issue.disabled_core_fields.include?('done_ratio') |
|
57 |
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress' |
|
58 |
end |
|
59 |
unless @issue.disabled_core_fields.include?('estimated_hours') |
|
60 |
unless @issue.estimated_hours.nil? |
|
61 |
rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours' |
|
62 |
end |
|
63 |
end |
|
64 |
if User.current.allowed_to?(:view_time_entries, @project) |
|
65 |
rows.right l(:label_spent_time), (@issue.total_spent_hours > 0 ? link_to(l_hours(@issue.total_spent_hours), project_issue_time_entries_path(@project, @issue)) : "-"), :class => 'spent-time' |
|
66 |
end |
|
67 |
end %> |
|
68 |
<%= render_custom_fields_rows(@issue) %> |
|
69 |
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> |
|
70 |
</table> |
|
71 | ||
72 |
<% if @issue.description? || @issue.attachments.any? -%> |
|
73 |
<hr /> |
|
74 |
<% if @issue.description? %> |
|
75 |
<div class="description"> |
|
76 |
<div class="contextual"> |
|
77 |
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> |
|
78 |
</div> |
|
78 | 79 | |
79 |
<p><strong><%=l(:field_description)%></strong></p> |
|
80 |
<div class="wiki"> |
|
81 |
<%= textilizable @issue, :description, :attachments => @issue.attachments %> |
|
80 |
<p><strong><%=l(:field_description)%></strong></p> |
|
81 |
<div class="wiki"> |
|
82 |
<%= textilizable @issue, :description, :attachments => @issue.attachments %> |
|
83 |
</div> |
|
82 | 84 |
</div> |
83 |
</div> |
|
84 |
<% end %> |
|
85 |
<%= link_to_attachments @issue, :thumbnails => true %> |
|
85 |
<% end %> |
|
86 |
<%= link_to_attachments @issue, :thumbnails => true %> |
|
86 | 87 |
<% end -%> |
87 | 88 | |
88 | 89 |
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> |
... | ... | |
155 | 156 |
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> |
156 | 157 |
<% end %> |
157 | 158 | |
158 |
<%= context_menu issues_context_menu_path %> |
|
159 |
<%= context_menu issues_context_menu_path %> |
app/views/versions/index.html.erb | ||
---|---|---|
20 | 20 |
<% issues.each do |issue| -%> |
21 | 21 |
<tr class="hascontextmenu"> |
22 | 22 |
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td> |
23 |
<td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td> |
|
23 |
<td class="issue"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
|
24 | 24 |
</tr> |
25 | 25 |
<% end -%> |
26 | 26 |
</table> |
... | ... | |
65 | 65 | |
66 | 66 |
<% html_title(l(:label_roadmap)) %> |
67 | 67 | |
68 |
<%= context_menu issues_context_menu_path %> |
|
68 |
<%= context_menu issues_context_menu_path %> |
public/stylesheets/application.css | ||
---|---|---|
165 | 165 |
tr.issue.idnt-8 td.subject {padding-left: 11em;} |
166 | 166 |
tr.issue.idnt-9 td.subject {padding-left: 12.5em;} |
167 | 167 | |
168 |
/* Issue priority colors */ |
|
169 |
/* default */ |
|
170 |
tr.issue.odd td, tr.issue.even td{color:#484848; padding: 5px;} |
|
171 |
tr.issue.context-menu-selection.odd td, tr.issue.context-menu-selection.even td{color:#F8F8F8; padding: 5px;} |
|
172 |
/* special color fields */ |
|
173 |
tr.issue.odd td.priority, tr.issue.even td.priority, |
|
174 |
tr.issue.odd td.status, tr.issue.even td.status{color:#484848;} |
|
175 | ||
176 |
/* low */ |
|
177 |
tr.issue.odd.priority-1 td.priority{background: #d6ffd0; border-color: #a5d690;} |
|
178 |
tr.issue.even.priority-1 td.priority{background: #e2ffde; border-color: #a5d690;} |
|
179 |
/* normal */ |
|
180 |
tr.issue.odd.priority-2 td.priority{background: #eaf7ff; border-color: #add7f3;} |
|
181 |
tr.issue.even.priority-2 td.priority{background: #f2faff; border-color: #add7f3;} |
|
182 |
/* high */ |
|
183 |
tr.issue.odd.priority-3 td.priority{background: #fffbca; border-color: #d7d290;} |
|
184 |
tr.issue.even.priority-3 td.priority{background: #fffcdb;border-color: #d7d290;} |
|
185 |
/* urgent */ |
|
186 |
tr.issue.odd.priority-4 td.priority{background-color: #FF9999; border-color:#FF8888;} |
|
187 |
tr.issue.even.priority-4 td.priority{background-color: #FFBBBB; border-color:#FFA0A0;} |
|
188 |
/* immediate */ |
|
189 |
tr.issue.odd.priority-5 td.priority{background-color: #FF9999; border-color: #FF8888; font-weight: bold;} |
|
190 |
tr.issue.even.priority-5 td.priority{background-color: #FFBBBB; border-color: #FFA0A0; font-weight: bold;} |
|
191 | ||
192 |
/* Issue status colors */ |
|
193 |
/* new */ |
|
194 |
tr.issue.odd.status-1 td.status{background: #eaf7ff; font-weight: bold; border-color: #add7f3;} |
|
195 |
tr.issue.even.status-1 td.status{background: #f2faff; font-weight: bold; border-color: #add7f3;} |
|
196 |
/* in progress */ |
|
197 |
tr.issue.odd.status-2 td.status{background: #fffbca; border-color: #d7d290;} |
|
198 |
tr.issue.even.status-2 td.status{background: #fffcdb; border-color: #d7d290;} |
|
199 |
/* resolved */ |
|
200 |
tr.issue.odd.status-3 td.status{background: #d6ffd0; border-color: #a5d690; font-style: italic;} |
|
201 |
tr.issue.even.status-3 td.status{background: #e2ffde; border-color: #a5d690; font-style: italic;} |
|
202 |
/* feedback */ |
|
203 |
tr.issue.odd.status-4 td.status{background: #d6ffd0; border-color: #a5d690;} |
|
204 |
tr.issue.even.status-4 td.status{background: #e2ffde; border-color: #a5d690;} |
|
205 |
/* closed */ |
|
206 |
tr.issue.odd.status-5 td.status{background: #d6ffd0; font-weight:bold; border-color: #a5d690;} |
|
207 |
tr.issue.even.status-5 td.status{background: #e2ffde; font-weight:bold; border-color: #a5d690;} |
|
208 |
/* rejected */ |
|
209 |
tr.issue.odd.status-6 td.status{background: #FF9999; font-weight: bold; border-color: #FF8888;} |
|
210 |
tr.issue.even.status-6 td.status{background: #FFA5A5; font-weight: bold; border-color: #FFA0A0;} |
|
211 | ||
212 |
/* issue tracker icons */ |
|
213 |
/* default */ |
|
214 |
tr.issue td.tracker:before, table.related-issues td.issue a:before, |
|
215 |
h2.tracker:before{content:"";display:block;float:left;background:url("../images/page_white.png") no-repeat;width:16px;height:16px;} |
|
216 |
h2.tracker:before{margin:4px 2px 0 0;} |
|
217 |
/* bug */ |
|
218 |
tr.issue.tracker-1 td.tracker:before, table.related-issues td.issue a.tracker-1:before, |
|
219 |
h2.tracker.tracker-1:before{background:url("../images/bug.png") no-repeat;} |
|
220 |
/* feature */ |
|
221 |
tr.issue.tracker-2 td.tracker:before, table.related-issues td.issue a.tracker-2:before, |
|
222 |
h2.tracker.tracker-2:before{background:url("../images/brick_add.png") no-repeat;} |
|
223 |
/* support */ |
|
224 |
tr.issue.tracker-3 td.tracker:before, table.related-issues td.issue a.tracker-3:before, |
|
225 |
h2.tracker.tracker-3:before{background:url("../images/shield.png") no-repeat;} |
|
226 | ||
227 |
/* issue due_date */ |
|
228 |
tr.issue td.id:before{content:"";display:block;float:left;width:16px;height:16px;margin-right:2px;background:url("../images/issue.png") no-repeat;} |
|
229 |
tr.issue.open.timed td.id:before{background:url("../images/clock.png") no-repeat;} |
|
230 |
tr.issue.open.overdue td.id:before{background:url("../images/clock_red.png") no-repeat;} |
|
231 |
tr.issue.open.overdue td.id a,tr.issue.open.overdue td.due_date{color:#FF3333;} |
|
232 |
tr.issue.private td.id:before{background:url("../images/private.png") no-repeat;} |
|
233 |
tr.issue.closed td.id:before{background:url("../images/lock.png") no-repeat;} |
|
234 | ||
235 |
body.admin #header{background-color:#628DB6;background-repeat:repeat;background-size:15px 15px;background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);} |
|
236 | ||
168 | 237 |
tr.entry { border: 1px solid #f8f8f8; } |
169 | 238 |
tr.entry td { white-space: nowrap; } |
170 | 239 |
tr.entry td.filename { width: 30%; } |
... | ... | |
279 | 348 |
span.search_for_watchers, span.add_attachment {font-size:80%; line-height:2.5em;} |
280 | 349 |
span.search_for_watchers a, span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; } |
281 | 350 | |
282 | ||
283 | 351 |
.highlight { background-color: #FCFD8D;} |
284 | 352 |
.highlight.token-1 { background-color: #faa;} |
285 | 353 |
.highlight.token-2 { background-color: #afa;} |
... | ... | |
318 | 386 |
acronym { border-bottom: 1px dotted; cursor: help; } |
319 | 387 |
textarea.wiki-edit {width:99%; resize:vertical;} |
320 | 388 |
li p {margin-top: 0;} |
321 |
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
|
|
389 |
div.issue {background:#F8F8F8; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
|
|
322 | 390 |
p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;} |
323 | 391 |
p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; } |
324 | 392 |
p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; } |
... | ... | |
327 | 395 |
div.issue div.subject p {margin: 0; margin-bottom: 0.1em; font-size: 90%; color: #999;} |
328 | 396 |
div.issue div.subject>div>p { margin-top: 0.5em; } |
329 | 397 |
div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;} |
330 |
div.issue span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;}
|
|
398 |
div.issue span.private { position:relative; bottom: 2px; text-transform: uppercase; background: #d22; color: #fff; font-weight:bold; padding: 0px 2px; font-size: 60%; margin-right: 2px; border-radius: 2px;} |
|
331 | 399 |
div.issue .next-prev-links {color:#999;} |
332 | 400 |
div.issue table.attributes th {width:22%;} |
333 | 401 |
div.issue table.attributes td {width:28%;} |
402 |
/* Highlight for priority and status in issue#show */ |
|
403 |
div.issue td.priority,div.issue td.status{display:inline;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius: 5px;padding: 2px 5px;color:#484848;} |
|
404 |
div.issue td.status-1{background-color:#eaf7ff;} |
|
405 |
div.issue td.status-2{background-color:#fffbca;} |
|
406 |
div.issue td.status-3{background-color:#d6ffd0;} |
|
407 |
div.issue td.status-4{background-color:#d6ffd0;} |
|
408 |
div.issue td.status-5{background-color:#d6ffd0;} |
|
409 |
div.issue td.status-6{background-color:#FF9999;} |
|
410 |
div.issue td.priority-1{background-color:#d6ffd0;} |
|
411 |
div.issue td.priority-2{background-color:#eaf7ff;} |
|
412 |
div.issue td.priority-3{background-color:#fffbca;} |
|
413 |
div.issue td.priority-4{background-color:#FF9999;} |
|
414 |
div.issue td.priority-5{background-color:#FF9999;} |
|
415 | ||
416 | ||
417 | ||
418 | ||
419 | ||
420 | ||
334 | 421 | |
335 | 422 |
#issue_tree table.issues, #relations table.issues { border: 0; } |
336 | 423 |
#issue_tree td.checkbox, #relations td.checkbox {display:none;} |
... | ... | |
692 | 779 |
} |
693 | 780 | |
694 | 781 |
/***** Progress bar *****/ |
695 |
table.progress { |
|
696 |
border-collapse: collapse; |
|
697 |
border-spacing: 0pt; |
|
698 |
empty-cells: show; |
|
699 |
text-align: center; |
|
700 |
float:left; |
|
701 |
margin: 1px 6px 1px 0px; |
|
702 |
} |
|
782 |
table.progress{border-collapse:collapse;border-spacing:0pt;empty-cells:show;text-align:center;float:left;margin:1px 6px 1px 0px;} |
|
703 | 783 | |
704 | 784 |
table.progress td { height: 1em; } |
705 |
table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
|
|
706 |
table.progress td.done { background: #D3EDD3 none repeat scroll 0%; }
|
|
707 |
table.progress td.todo { background: #eee none repeat scroll 0%; }
|
|
785 |
table.progress td.closed { background: #628DB6 none repeat scroll 0%; }
|
|
786 |
table.progress td.done { background: #7CB2E6 none repeat scroll 0%; }
|
|
787 |
table.progress td.todo { background: #EEE none repeat scroll 0%; }
|
|
708 | 788 |
p.percent {font-size: 80%;} |
709 | 789 |
p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;} |
710 | 790 | |
... | ... | |
1151 | 1231 |
width:1px; |
1152 | 1232 |
height:1px; |
1153 | 1233 |
overflow:hidden; |
1154 |
} |
|
1234 |
} |