issue列表增加优先级

修改issue列表界面
This commit is contained in:
huang 2015-07-07 11:29:40 +08:00
parent 3bb3cbe2bd
commit 7ebdf4a08d
5 changed files with 31 additions and 12 deletions

View File

@ -68,24 +68,36 @@ module IssuesHelper
end end
#获取跟踪类型及样式 #获取跟踪类型及样式
#REDO:时间紧可以优化.
def get_issue_type(value) def get_issue_type(value)
issuetype = [] issuetype = []
if value == "缺陷" || value == 1 if value == "缺陷" || value == 1
issuetype << "red_btn_cir ml10" issuetype << "issues fl"
issuetype << "缺陷"
elsif value == "功能" || value == 2 elsif value == "功能" || value == 2
issuetype << "blue_btn_cir ml10" issuetype << "duty fl"
issuetype << "功能"
elsif value == "支持" || value == 3 elsif value == "支持" || value == 3
issuetype << "green_btn_cir ml10" issuetype << "support fl"
issuetype << "支持"
elsif value == "任务" || value == 4 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 << "orange_btn_cir ml10"
issuetype << "任务" issuetype << ""
else else
issuetype << "bgreen_btn_cir ml10" issuetype << "bgreen_btn_cir ml10"
issuetype << "周报" issuetype << ""
end end
end end

View File

@ -1,5 +1,6 @@
class OptionNumber < ActiveRecord::Base 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 def self.get_user_option_number user_id
result = nil result = nil

View File

@ -7,12 +7,12 @@
<div class="problem_main"> <div class="problem_main">
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> <% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
<% unless issue.author.nil? || issue.author.name == "Anonymous" %> <% unless issue.author.nil? || issue.author.name == "Anonymous" %>
<span class="issues_icon fl"></span> <span class ="<%= get_issue_type(column_content[1])[0] %>"></span>
<div class="problem_txt fl"> <div class="problem_txt fl">
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> <%= 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> <span class="fl"><%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>)</span>
<div class="problem_tit_div fl break_word"> <div class="problem_tit_div fl break_word">
<%=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" %> <%=link_to "#{column_content[4]}<span class = '#{get_issue_priority(column_content[3])[0]}'>#{get_issue_priority(column_content[3])[1]}</span>".html_safe, issue_path(issue.id), :class => "problem_tit_a break_word",:target => "_blank" %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<p> <p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -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_box ul li{ height:24px;}
.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .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;} .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{ float:right; border-bottom:none; height:30px; margin-top:20px; }
ul.wlist li{float: left;} ul.wlist li{float: left;}