diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index b72a191db..4dfb1b799 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -67,29 +67,25 @@ module IssuesHelper
s.html_safe
end
- #获取跟踪类型
- #REDO:时间紧需要优化,两个方法可以综合成一个
+ #获取跟踪类型及样式
+ #REDO:时间紧可以优化.
def get_issue_type(value)
+ issuetype = []
if value == "缺陷" || value == 1
- class_type = "red_btn_cir ml10"
+ issuetype << "red_btn_cir ml10"
+ issuetype << "缺陷"
elsif value == "功能" || value == 2
- class_type = "blue_btn_cir ml10"
+ issuetype << "blue_btn_cir ml10"
+ issuetype << "功能"
elsif value == "支持" || value == 3
- class_type = "green_btn_cir ml10"
+ issuetype << "green_btn_cir ml10"
+ issuetype << "支持"
+ elsif value == "任务" || value == 4
+ issuetype << "orange_btn_cir ml10"
+ issuetype << "任务"
else
- class_type = "orange_btn_cir ml10"
- end
- end
-
- def get_issue_typevalue(value)
- if value == "缺陷" || value == 1
- assign = "缺陷"
- elsif value == "功能" || value == 2
- assign = "功能"
- elsif value == "支持" || value == 3
- assign = "支持"
- else
- assign = "任务"
+ issuetype << "bgreen_btn_cir ml10"
+ issuetype << "周报"
end
end
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index fa34ecb3b..616e205c4 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -12,7 +12,7 @@
<%= 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_typevalue(column_content[1])}".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
+ <%=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" %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 1d1802172..cff5aae06 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -14,7 +14,7 @@
<%= @issue.subject %>
- <%= get_issue_typevalue(@issue.tracker_id) %>
+ <%= get_issue_type(@issue.tracker_id)[1] %>
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 4624b26c9..ebc92a972 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -173,10 +173,11 @@ a:hover.blue_u_btn{background:#64bdd9; color:#fff;}
.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
/*.upbtn{ margin:42px 0 0 10px; border:none; color:#999; }*/
-.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
-.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
-.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
-.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;}
+.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
+.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;}
/* commonpic */
.pic_date{ display:block; background:url(../images/new_project/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;}
.pic_add{ display:block; background:url(../images/new_project/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;}