app/models/issue.rb | 4 +- app/views/issues/show.html.erb | 123 +++++++++++++++++++------------------ app/views/versions/index.html.erb | 4 +- public/images/brick_add.png | Bin 0 -> 729 bytes public/images/bug.png | Bin 0 -> 774 bytes public/images/clock.png | Bin 0 -> 882 bytes public/images/clock_red.png | Bin 0 -> 889 bytes public/images/issue.png | Bin 0 -> 649 bytes public/images/lock.png | Bin 0 -> 749 bytes public/images/page_white.png | Bin 0 -> 294 bytes public/images/private.png | Bin 0 -> 619 bytes public/images/shield.png | Bin 0 -> 702 bytes public/stylesheets/application.css | 110 ++++++++++++++++++++++++++++----- 13 files changed, 162 insertions(+), 79 deletions(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index ce1fa75..988a0ca 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -961,8 +961,10 @@ class Issue < ActiveRecord::Base # Returns a string of css classes that apply to the issue def css_classes - s = "issue tracker-#{tracker_id} status-#{status_id} #{priority.try(:css_classes)}" + s = "issue tracker-#{tracker_id} tracker-#{tracker.name.downcase} status-#{status_id} status-#{status.name.downcase} #{priority.try(:css_classes)}" + s << ' open' unless closed? s << ' closed' if closed? + s << ' timed' unless due_date.blank? s << ' overdue' if overdue? s << ' child' if child? s << ' parent' unless leaf? diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 83b4f56..dd5d290 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,6 +1,6 @@ <%= render :partial => 'action_menu' %> -

<%= issue_heading(@issue) %>

+

<%= issue_heading(@issue) %>

<% if @prev_issue_id || @next_issue_id %> @@ -21,68 +21,69 @@ <%= avatar(@issue.author, :size => "50") %> -
-<%= render_issue_subject_with_tree(@issue) %> -
-

- <%= authoring @issue.created_on, @issue.author %>. - <% if @issue.created_on != @issue.updated_on %> - <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. - <% end %> -

- - -<%= issue_fields_rows do |rows| - rows.left l(:field_status), h(@issue.status.name), :class => 'status' - rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority' - - unless @issue.disabled_core_fields.include?('assigned_to_id') - 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' - end - unless @issue.disabled_core_fields.include?('category_id') - rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category' - end - unless @issue.disabled_core_fields.include?('fixed_version_id') - rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version' - end - - unless @issue.disabled_core_fields.include?('start_date') - rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date' - end - unless @issue.disabled_core_fields.include?('due_date') - rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' - end - unless @issue.disabled_core_fields.include?('done_ratio') - rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress' - end - unless @issue.disabled_core_fields.include?('estimated_hours') - unless @issue.estimated_hours.nil? - rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours' - end - end - if User.current.allowed_to?(:view_time_entries, @project) - 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' - end -end %> -<%= render_custom_fields_rows(@issue) %> -<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> -
- -<% if @issue.description? || @issue.attachments.any? -%> -
-<% if @issue.description? %> -
-
- <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> +
+ <%= render_issue_subject_with_tree(@issue) %>
+ +

+ <%= authoring @issue.created_on, @issue.author %>. + <% if @issue.created_on != @issue.updated_on %> + <%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. + <% end %> +

+ + + <%= issue_fields_rows do |rows| + rows.left l(:field_status), h(@issue.status.name), :class => 'status status-'+@issue.status.name.downcase+' status-'+@issue.status_id.to_s + rows.left l(:field_priority), h(@issue.priority.name), :class => 'priority priority-'+@issue.priority.name.downcase+' priority-'+@issue.priority_id.to_s + + unless @issue.disabled_core_fields.include?('assigned_to_id') + 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' + end + unless @issue.disabled_core_fields.include?('category_id') + rows.left l(:field_category), h(@issue.category ? @issue.category.name : "-"), :class => 'category' + end + unless @issue.disabled_core_fields.include?('fixed_version_id') + rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version' + end + + unless @issue.disabled_core_fields.include?('start_date') + rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date' + end + unless @issue.disabled_core_fields.include?('due_date') + rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' + end + unless @issue.disabled_core_fields.include?('done_ratio') + rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress' + end + unless @issue.disabled_core_fields.include?('estimated_hours') + unless @issue.estimated_hours.nil? + rows.right l(:field_estimated_hours), l_hours(@issue.estimated_hours), :class => 'estimated-hours' + end + end + if User.current.allowed_to?(:view_time_entries, @project) + 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' + end + end %> + <%= render_custom_fields_rows(@issue) %> + <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> +
+ + <% if @issue.description? || @issue.attachments.any? -%> +
+ <% if @issue.description? %> +
+
+ <%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> +
-

<%=l(:field_description)%>

-
- <%= textilizable @issue, :description, :attachments => @issue.attachments %> +

<%=l(:field_description)%>

+
+ <%= textilizable @issue, :description, :attachments => @issue.attachments %> +
-
-<% end %> -<%= link_to_attachments @issue, :thumbnails => true %> + <% end %> + <%= link_to_attachments @issue, :thumbnails => true %> <% end -%> <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> @@ -155,4 +156,4 @@ end %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> <% end %> -<%= context_menu issues_context_menu_path %> +<%= context_menu issues_context_menu_path %> \ No newline at end of file diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index d28963a..7821878 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -20,7 +20,7 @@ <% issues.each do |issue| -%> <%= check_box_tag 'ids[]', issue.id, false, :id => nil %> - <%= link_to_issue(issue, :project => (@project != issue.project)) %> + <%= link_to_issue(issue, :project => (@project != issue.project)) %> <% end -%> @@ -65,4 +65,4 @@ <% html_title(l(:label_roadmap)) %> -<%= context_menu issues_context_menu_path %> +<%= context_menu issues_context_menu_path %> \ No newline at end of file diff --git a/public/images/brick_add.png b/public/images/brick_add.png new file mode 100644 index 0000000..fac186b Binary files /dev/null and b/public/images/brick_add.png differ diff --git a/public/images/bug.png b/public/images/bug.png new file mode 100644 index 0000000..2d5fb90 Binary files /dev/null and b/public/images/bug.png differ diff --git a/public/images/clock.png b/public/images/clock.png new file mode 100644 index 0000000..e2672c2 Binary files /dev/null and b/public/images/clock.png differ diff --git a/public/images/clock_red.png b/public/images/clock_red.png new file mode 100644 index 0000000..2842cc3 Binary files /dev/null and b/public/images/clock_red.png differ diff --git a/public/images/issue.png b/public/images/issue.png new file mode 100644 index 0000000..779ad58 Binary files /dev/null and b/public/images/issue.png differ diff --git a/public/images/lock.png b/public/images/lock.png new file mode 100644 index 0000000..2ebc4f6 Binary files /dev/null and b/public/images/lock.png differ diff --git a/public/images/page_white.png b/public/images/page_white.png new file mode 100644 index 0000000..8b8b1ca Binary files /dev/null and b/public/images/page_white.png differ diff --git a/public/images/private.png b/public/images/private.png new file mode 100644 index 0000000..f24a41b Binary files /dev/null and b/public/images/private.png differ diff --git a/public/images/shield.png b/public/images/shield.png new file mode 100644 index 0000000..3cb4e25 Binary files /dev/null and b/public/images/shield.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 31e56b8..f31501e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -165,6 +165,75 @@ tr.issue.idnt-7 td.subject {padding-left: 9.5em;} tr.issue.idnt-8 td.subject {padding-left: 11em;} tr.issue.idnt-9 td.subject {padding-left: 12.5em;} +/* Issue priority colors */ +/* default */ +tr.issue.odd td, tr.issue.even td{color:#484848; padding: 5px;} +tr.issue.context-menu-selection.odd td, tr.issue.context-menu-selection.even td{color:#F8F8F8; padding: 5px;} +/* special color fields */ +tr.issue.odd td.priority, tr.issue.even td.priority, +tr.issue.odd td.status, tr.issue.even td.status{color:#484848;} + +/* low */ +tr.issue.odd.priority-1 td.priority{background: #d6ffd0; border-color: #a5d690;} +tr.issue.even.priority-1 td.priority{background: #e2ffde; border-color: #a5d690;} +/* normal */ +tr.issue.odd.priority-2 td.priority{background: #eaf7ff; border-color: #add7f3;} +tr.issue.even.priority-2 td.priority{background: #f2faff; border-color: #add7f3;} +/* high */ +tr.issue.odd.priority-3 td.priority{background: #fffbca; border-color: #d7d290;} +tr.issue.even.priority-3 td.priority{background: #fffcdb;border-color: #d7d290;} +/* urgent */ +tr.issue.odd.priority-4 td.priority{background-color: #FF9999; border-color:#FF8888;} +tr.issue.even.priority-4 td.priority{background-color: #FFBBBB; border-color:#FFA0A0;} +/* immediate */ +tr.issue.odd.priority-5 td.priority{background-color: #FF9999; border-color: #FF8888; font-weight: bold;} +tr.issue.even.priority-5 td.priority{background-color: #FFBBBB; border-color: #FFA0A0; font-weight: bold;} + +/* Issue status colors */ +/* new */ +tr.issue.odd.status-1 td.status{background: #eaf7ff; font-weight: bold; border-color: #add7f3;} +tr.issue.even.status-1 td.status{background: #f2faff; font-weight: bold; border-color: #add7f3;} +/* in progress */ +tr.issue.odd.status-2 td.status{background: #fffbca; border-color: #d7d290;} +tr.issue.even.status-2 td.status{background: #fffcdb; border-color: #d7d290;} +/* resolved */ +tr.issue.odd.status-3 td.status{background: #d6ffd0; border-color: #a5d690; font-style: italic;} +tr.issue.even.status-3 td.status{background: #e2ffde; border-color: #a5d690; font-style: italic;} +/* feedback */ +tr.issue.odd.status-4 td.status{background: #d6ffd0; border-color: #a5d690;} +tr.issue.even.status-4 td.status{background: #e2ffde; border-color: #a5d690;} +/* closed */ +tr.issue.odd.status-5 td.status{background: #d6ffd0; font-weight:bold; border-color: #a5d690;} +tr.issue.even.status-5 td.status{background: #e2ffde; font-weight:bold; border-color: #a5d690;} +/* rejected */ +tr.issue.odd.status-6 td.status{background: #FF9999; font-weight: bold; border-color: #FF8888;} +tr.issue.even.status-6 td.status{background: #FFA5A5; font-weight: bold; border-color: #FFA0A0;} + +/* issue tracker icons */ +/* default */ +tr.issue td.tracker:before, table.related-issues td.issue a:before, +h2.tracker:before{content:"";display:block;float:left;background:url("../images/page_white.png") no-repeat;width:16px;height:16px;} +h2.tracker:before{margin:4px 2px 0 0;} +/* bug */ +tr.issue.tracker-1 td.tracker:before, table.related-issues td.issue a.tracker-1:before, +h2.tracker.tracker-1:before{background:url("../images/bug.png") no-repeat;} +/* feature */ +tr.issue.tracker-2 td.tracker:before, table.related-issues td.issue a.tracker-2:before, +h2.tracker.tracker-2:before{background:url("../images/brick_add.png") no-repeat;} +/* support */ +tr.issue.tracker-3 td.tracker:before, table.related-issues td.issue a.tracker-3:before, +h2.tracker.tracker-3:before{background:url("../images/shield.png") no-repeat;} + +/* issue due_date */ +tr.issue td.id:before{content:"";display:block;float:left;width:16px;height:16px;margin-right:2px;background:url("../images/issue.png") no-repeat;} +tr.issue.open.timed td.id:before{background:url("../images/clock.png") no-repeat;} +tr.issue.open.overdue td.id:before{background:url("../images/clock_red.png") no-repeat;} +tr.issue.open.overdue td.id a,tr.issue.open.overdue td.due_date{color:#FF3333;} +tr.issue.private td.id:before{background:url("../images/private.png") no-repeat;} +tr.issue.closed td.id:before{background:url("../images/lock.png") no-repeat;} + +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);} + tr.entry { border: 1px solid #f8f8f8; } tr.entry td { white-space: nowrap; } tr.entry td.filename { width: 30%; } @@ -279,7 +348,6 @@ span.search_for_watchers {display:block;} span.search_for_watchers, span.add_attachment {font-size:80%; line-height:2.5em;} span.search_for_watchers a, span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; } - .highlight { background-color: #FCFD8D;} .highlight.token-1 { background-color: #faa;} .highlight.token-2 { background-color: #afa;} @@ -318,7 +386,7 @@ blockquote blockquote { margin-left: 0;} acronym { border-bottom: 1px dotted; cursor: help; } textarea.wiki-edit {width:99%; resize:vertical;} li p {margin-top: 0;} -div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;} +div.issue {background:#F8F8F8; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;} p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;} p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; } p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; } @@ -327,10 +395,29 @@ div.issue div.subject div div { padding-left: 16px; } div.issue div.subject p {margin: 0; margin-bottom: 0.1em; font-size: 90%; color: #999;} div.issue div.subject>div>p { margin-top: 0.5em; } div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;} -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;} +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;} div.issue .next-prev-links {color:#999;} div.issue table.attributes th {width:22%;} div.issue table.attributes td {width:28%;} +/* Highlight for priority and status in issue#show */ +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;} +div.issue td.status-1{background-color:#eaf7ff;} +div.issue td.status-2{background-color:#fffbca;} +div.issue td.status-3{background-color:#d6ffd0;} +div.issue td.status-4{background-color:#d6ffd0;} +div.issue td.status-5{background-color:#d6ffd0;} +div.issue td.status-6{background-color:#FF9999;} +div.issue td.priority-1{background-color:#d6ffd0;} +div.issue td.priority-2{background-color:#eaf7ff;} +div.issue td.priority-3{background-color:#fffbca;} +div.issue td.priority-4{background-color:#FF9999;} +div.issue td.priority-5{background-color:#FF9999;} + + + + + + #issue_tree table.issues, #relations table.issues { border: 0; } #issue_tree td.checkbox, #relations td.checkbox {display:none;} @@ -692,19 +779,12 @@ img.ui-datepicker-trigger { } /***** Progress bar *****/ -table.progress { - border-collapse: collapse; - border-spacing: 0pt; - empty-cells: show; - text-align: center; - float:left; - margin: 1px 6px 1px 0px; -} +table.progress{border-collapse:collapse;border-spacing:0pt;empty-cells:show;text-align:center;float:left;margin:1px 6px 1px 0px;} table.progress td { height: 1em; } -table.progress td.closed { background: #BAE0BA none repeat scroll 0%; } -table.progress td.done { background: #D3EDD3 none repeat scroll 0%; } -table.progress td.todo { background: #eee none repeat scroll 0%; } +table.progress td.closed { background: #628DB6 none repeat scroll 0%; } +table.progress td.done { background: #7CB2E6 none repeat scroll 0%; } +table.progress td.todo { background: #EEE none repeat scroll 0%; } p.percent {font-size: 80%;} p.progress-info {clear: left; font-size: 80%; margin-top:-4px; color:#777;} @@ -1151,4 +1231,4 @@ h2 img { vertical-align:middle; } width:1px; height:1px; overflow:hidden; -} +} \ No newline at end of file