项目issue添加周报功能
This commit is contained in:
parent
c711e29cd5
commit
fa563b60d5
|
@ -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
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %>
|
||||
<span class="fl"><%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>):</span>
|
||||
<div class="problem_tit_div fl">
|
||||
<%=link_to "#{column_content[4]}<span class = '#{get_issue_type(column_content[1])}'>#{get_issue_typevalue(column_content[1])}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
|
||||
<%=link_to "#{column_content[4]}<span class = '#{get_issue_type(column_content[1])[0]}'>#{get_issue_type(column_content[1])[1]}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="talk_txt fl">
|
||||
<p class="pro_page_tit" style="word-break:break-all;">
|
||||
<%= @issue.subject %>
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)}" %>'><%= get_issue_typevalue(@issue.tracker_id) %></span>
|
||||
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]}" %>'><%= get_issue_type(@issue.tracker_id)[1] %></span>
|
||||
</p><br/>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -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;}
|
||||
|
|
Loading…
Reference in New Issue