diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index aae150728..4f0821449 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -68,24 +68,36 @@ module IssuesHelper end #获取跟踪类型及样式 - #REDO:时间紧可以优化. def get_issue_type(value) issuetype = [] if value == "缺陷" || value == 1 - issuetype << "red_btn_cir ml10" - issuetype << "缺陷" + issuetype << "issues fl" elsif value == "功能" || value == 2 - issuetype << "blue_btn_cir ml10" - issuetype << "功能" + issuetype << "duty fl" elsif value == "支持" || value == 3 - issuetype << "green_btn_cir ml10" - issuetype << "支持" + issuetype << "support fl" elsif value == "任务" || value == 4 + issuetype << "function fl" + else + issuetype << "weekly fl" + end + end + + # 获取优先级样式 + def get_issue_priority(value) + issuetype = [] + if value == "紧急" || value == 1 + issuetype << "red_btn_cir ml10" + issuetype << "紧急" + elsif value == "正常" || value == 3 + issuetype << "green_btn_cir ml10" + issuetype << "正常" + elsif value == "高" || value == 4 issuetype << "orange_btn_cir ml10" - issuetype << "任务" + issuetype << "高" else issuetype << "bgreen_btn_cir ml10" - issuetype << "周报" + issuetype << "低" end end diff --git a/app/models/option_number.rb b/app/models/option_number.rb index 0ddea1bff..b4a3caac4 100644 --- a/app/models/option_number.rb +++ b/app/models/option_number.rb @@ -1,5 +1,6 @@ class OptionNumber < ActiveRecord::Base - attr_accessible :attachment, :changeset, :document, :follow, :issue_done_ratio, :issues_status, :memo, :messages_for_issues, :post_issue, :praise_by_one, :praise_by_three, :praise_by_two, :replay_for_memo, :replay_for_message, :score_type, :total_score, :tread, :tread_by_one, :tread_by_three, :tread_by_two, :user_id + attr_accessible :attachment, :changeset, :document, :follow, :issue_done_ratio, :issues_status, :memo, :messages_for_issues, :post_issue, + :praise_by_one, :praise_by_three, :praise_by_two, :replay_for_memo, :replay_for_message, :score_type, :total_score, :tread, :tread_by_one, :tread_by_three, :tread_by_two, :user_id def self.get_user_option_number user_id result = nil diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 0fcb37021..4549b32e0 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -7,12 +7,12 @@
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> <% unless issue.author.nil? || issue.author.name == "Anonymous" %> - +
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):
- <%=link_to "#{column_content[4]}#{get_issue_type(column_content[1])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %> + <%=link_to "#{column_content[4]}#{get_issue_priority(column_content[3])[1]}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>

diff --git a/public/images/public_icon.png b/public/images/public_icon.png index 1fa463e4e..b915af086 100644 Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 5574dc82a..28399462d 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -95,6 +95,12 @@ a.pro_mes_w_news{ height:20px; float:right;display:block; color:#999999;} .pro_info_box ul li{ height:24px;} .pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} +/*问题状态图片*/ +.issues{ background:url(../images/public_icon.png) -66px 5px no-repeat; width:16px; height:21px;} +.duty{ background:url(../images/public_icon.png) -66px -18px no-repeat; width:16px; height:21px;} +.support{ background:url(../images/public_icon.png) -66px -45px no-repeat; width:16px; height:21px;} +.function{ background:url(../images/public_icon.png) -66px -70px no-repeat; width:16px; height:21px;} +.weekly{ background:url(../images/public_icon.png) -66px -95px no-repeat; width:16px; height:21px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist li{float: left;}