2016-10-19 14:43:07 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(".pro_info_p,.proInfoP").mouseover(function(){
|
|
|
|
$(this).children(".pic_edit2").css("display","inline-block");
|
|
|
|
});
|
|
|
|
$(".pro_info_p,.proInfoP").mouseout(function(){
|
|
|
|
$(this).children(".pic_edit2").css("display","none");
|
|
|
|
});
|
|
|
|
$(".pic_edit2").click(function(){
|
|
|
|
$(this).parent().hide();
|
|
|
|
$(this).parent().next().show();
|
|
|
|
});
|
|
|
|
$(".issueEdit").blur(function(){
|
|
|
|
$(this).hide();
|
|
|
|
$(this).prev().show();
|
|
|
|
var editValue = $(this).children("option:selected").text();
|
|
|
|
$(this).prev().children(":first").text(editValue);
|
|
|
|
});
|
|
|
|
function stopPropagation(e) {
|
|
|
|
if (e.stopPropagation)
|
|
|
|
e.stopPropagation();
|
|
|
|
else
|
|
|
|
e.cancelBubble = true;
|
|
|
|
};
|
|
|
|
$(document).bind('click',function(){
|
|
|
|
$('.issueEdit').css('display','none');
|
|
|
|
$('.proInfoP,.pro_info_p').show();
|
|
|
|
});
|
|
|
|
$('.issueEdit,.pic_edit2').bind('click',function(e){
|
|
|
|
stopPropagation(e);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function remote_function(id) {
|
|
|
|
$(id).submit();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="proInfoBox2 mb10 mt10">
|
|
|
|
<ul class="fl">
|
|
|
|
<%#= labelled_fields_for :issue, @issue do |f| %>
|
|
|
|
<%#= f.select :status_id, ([["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0])),
|
|
|
|
{:include_blank => false, :selected => @status_id ? @status_id : 0 },
|
|
|
|
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit"} %>
|
|
|
|
<%# end %>
|
|
|
|
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "status"},:remote=>'true', :method => :put, :id=>"issue_query_form_#{activity.id}", :class => 'query_form') do %>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 状态 : </p>
|
2016-10-19 14:43:07 +08:00
|
|
|
<p class="proInfoP"><span><%= activity.status.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a></p>
|
|
|
|
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
|
|
|
{:include_blank => false, :selected => @status_id ? @status_id : 0 },
|
2016-10-21 11:09:54 +08:00
|
|
|
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w130 undis issueEdit",:style=>"white-space:nowrap; overflow:hidden;"}
|
2016-10-19 14:43:07 +08:00
|
|
|
)
|
|
|
|
%>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "assigned"},:remote=>'true', :method => :put, :id=>"issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 指派 : </p>
|
2016-10-19 14:43:07 +08:00
|
|
|
<span class="pro_info_p" style="width:130px;">
|
2016-10-27 09:27:48 +08:00
|
|
|
<% unless activity.assigned_to.nil? %>
|
|
|
|
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %>
|
|
|
|
<% end %>
|
2016-10-19 14:43:07 +08:00
|
|
|
<a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span>
|
|
|
|
<%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project),
|
|
|
|
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},
|
2016-10-21 11:09:54 +08:00
|
|
|
{:onchange=>"remote_function('#issue_query_assign_form_#{activity.id}');", :id =>"assigned_to_id", :name => "assigned_to_id",:class=>"w130 undis issueEdit"}) %>
|
2016-10-19 14:43:07 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class="fl">
|
|
|
|
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "prior"},:remote=>'true', :method => :put, :id=>"issue_query_prior_form_#{activity.id}", :class => 'query_form') do %>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 优先级 : </p>
|
|
|
|
<span class="proInfoP"><span><%= activity.priority.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
2016-10-19 14:43:07 +08:00
|
|
|
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
|
|
|
{:include_blank => false,:selected=>@priority_id ? @priority_id : 0},
|
2016-10-21 11:09:54 +08:00
|
|
|
{:onchange=>"remote_function('#issue_query_prior_form_#{activity.id}');",:id=>"priority_id",:name=>"priority_id",:class=>"w130 undis issueEdit"}) %>
|
2016-10-19 14:43:07 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "ratio"},:remote=>'true', :method => :put, :id=>"issue_query_done_form_#{activity.id}", :class => 'query_form') do %>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 完成度 : </p>
|
|
|
|
<span class="proInfoP" style="width:130px;"><span><%= activity.done_ratio %>%</span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
2016-10-19 14:43:07 +08:00
|
|
|
<%= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
|
|
|
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
|
2016-10-21 11:09:54 +08:00
|
|
|
{:onchange=>"remote_function('#issue_query_done_form_#{activity.id}');",:id=>"done_ratio",:name=>"done_ratio",:class=>"w130 undis issueEdit"}) %>
|
2016-10-19 14:43:07 +08:00
|
|
|
<% end %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<ul class="fl ">
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 开始 : </p>
|
|
|
|
<p class="proInfoP"><span><%= format_date(activity.start_date) %></span></p>
|
2016-10-19 14:43:07 +08:00
|
|
|
</li>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 周期 : </p>
|
|
|
|
<span class="proInfoP" style="width:130px;"><%= l_hours(activity.estimated_hours) %></span> </li>
|
2016-10-19 14:43:07 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<ul class="fl ml20">
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> 计划完成 : </p>
|
|
|
|
<span class="proInfoP" style="width:130px;"><span><%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %></span></span> </li>
|
2016-10-19 14:43:07 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<li>
|
2016-10-19 11:17:34 +08:00
|
|
|
<p class="label"> <%=l(:milestone)%> : </p>
|
|
|
|
<span class="proInfoP" style="width:130px;"><%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %> </span> </li>
|
2016-10-19 14:43:07 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<!--pro_info_box end-->
|
|
|
|
</div>
|