Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
f3dcd4ed09
|
@ -461,8 +461,8 @@ class AdminController < ApplicationController
|
||||||
scope = User.order('last_login_on desc')
|
scope = User.order('last_login_on desc')
|
||||||
scope = scope.where("last_login_on>= '#{params[:startdate]} 00:00:00'") if params[:startdate].present?
|
scope = scope.where("last_login_on>= '#{params[:startdate]} 00:00:00'") if params[:startdate].present?
|
||||||
scope =scope.where("last_login_on <= '#{params[:enddate]} 23:59:59'") if params[:enddate].present?
|
scope =scope.where("last_login_on <= '#{params[:enddate]} 23:59:59'") if params[:enddate].present?
|
||||||
@user = scope
|
@users = scope
|
||||||
@user = paginateHelper @user,30
|
@users = paginateHelper @users,30
|
||||||
@page = (params['page'] || 1).to_i - 1
|
@page = (params['page'] || 1).to_i - 1
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @count=@page * 30 %>
|
<% @count=@page * 30 %>
|
||||||
<% for user in @user do %>
|
<% for user in @users do %>
|
||||||
<tr>
|
<tr>
|
||||||
<% @count +=1 %>
|
<% @count +=1 %>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
|
|
|
@ -1,115 +1,115 @@
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(".pro_info_p,.proInfoP").mouseover(function(){
|
$(".pro_info_p,.proInfoP").mouseover(function(){
|
||||||
$(this).children(".pic_edit2").css("display","inline-block");
|
$(this).children(".pic_edit2").css("display","inline-block");
|
||||||
});
|
});
|
||||||
$(".pro_info_p,.proInfoP").mouseout(function(){
|
$(".pro_info_p,.proInfoP").mouseout(function(){
|
||||||
$(this).children(".pic_edit2").css("display","none");
|
$(this).children(".pic_edit2").css("display","none");
|
||||||
});
|
});
|
||||||
$(".pic_edit2").click(function(){
|
$(".pic_edit2").click(function(){
|
||||||
$(this).parent().hide();
|
$(this).parent().hide();
|
||||||
$(this).parent().next().show();
|
$(this).parent().next().show();
|
||||||
});
|
});
|
||||||
$(".issueEdit").blur(function(){
|
$(".issueEdit").blur(function(){
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
$(this).prev().show();
|
$(this).prev().show();
|
||||||
var editValue = $(this).children("option:selected").text();
|
var editValue = $(this).children("option:selected").text();
|
||||||
$(this).prev().children(":first").text(editValue);
|
$(this).prev().children(":first").text(editValue);
|
||||||
});
|
});
|
||||||
function stopPropagation(e) {
|
function stopPropagation(e) {
|
||||||
if (e.stopPropagation)
|
if (e.stopPropagation)
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
else
|
else
|
||||||
e.cancelBubble = true;
|
e.cancelBubble = true;
|
||||||
};
|
};
|
||||||
$(document).bind('click',function(){
|
$(document).bind('click',function(){
|
||||||
$('.issueEdit').css('display','none');
|
$('.issueEdit').css('display','none');
|
||||||
$('.proInfoP,.pro_info_p').show();
|
$('.proInfoP,.pro_info_p').show();
|
||||||
});
|
});
|
||||||
$('.issueEdit,.pic_edit2').bind('click',function(e){
|
$('.issueEdit,.pic_edit2').bind('click',function(e){
|
||||||
stopPropagation(e);
|
stopPropagation(e);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function remote_function(id) {
|
function remote_function(id) {
|
||||||
$(id).submit();
|
$(id).submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="proInfoBox2 mb10 mt10">
|
<div class="proInfoBox2 mb10 mt10">
|
||||||
<ul class="fl">
|
<ul class="fl">
|
||||||
<%#= labelled_fields_for :issue, @issue do |f| %>
|
<%#= labelled_fields_for :issue, @issue do |f| %>
|
||||||
<%#= f.select :status_id, ([["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0])),
|
<%#= f.select :status_id, ([["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0])),
|
||||||
{:include_blank => false, :selected => @status_id ? @status_id : 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"} %>
|
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit"} %>
|
||||||
<%# end %>
|
<%# 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 %>
|
<%= 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>
|
<li>
|
||||||
<p class="label03"> 状态 : </p>
|
<p class="label03"> 状态 : </p>
|
||||||
<p class="proInfoP"><span><%= activity.status.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a></p>
|
<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]),
|
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||||
{:include_blank => false, :selected => @status_id ? @status_id : 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"}
|
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit",:style=>"white-space:nowrap; overflow:hidden;"}
|
||||||
)
|
)
|
||||||
%>
|
%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<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 %>
|
<%= 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>
|
<li>
|
||||||
<p class="label03"> 指派 : </p>
|
<p class="label03"> 指派 : </p>
|
||||||
<span class="pro_info_p">
|
<span class="pro_info_p">
|
||||||
<%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:50px; display:inline-block;" %>
|
<%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:50px; display:inline-block;" %>
|
||||||
<a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span>
|
<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),
|
<%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project),
|
||||||
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},
|
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},
|
||||||
{:onchange=>"remote_function('#issue_query_assign_form_#{activity.id}');", :id =>"assigned_to_id", :name => "assigned_to_id",:class=>"w70 undis issueEdit"}) %>
|
{:onchange=>"remote_function('#issue_query_assign_form_#{activity.id}');", :id =>"assigned_to_id", :name => "assigned_to_id",:class=>"w70 undis issueEdit"}) %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl">
|
<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 %>
|
<%= 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>
|
<li>
|
||||||
<p class="label03"> 优先级 : </p>
|
<p class="label03"> 优先级 : </p>
|
||||||
<span class="proInfoP" style="width:70px;"><span><%= activity.priority.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
<span class="proInfoP" style="width:70px;"><span><%= activity.priority.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
||||||
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
||||||
{:include_blank => false,:selected=>@priority_id ? @priority_id : 0},
|
{:include_blank => false,:selected=>@priority_id ? @priority_id : 0},
|
||||||
{:onchange=>"remote_function('#issue_query_prior_form_#{activity.id}');",:id=>"priority_id",:name=>"priority_id",:class=>"w70 undis issueEdit"}) %>
|
{:onchange=>"remote_function('#issue_query_prior_form_#{activity.id}');",:id=>"priority_id",:name=>"priority_id",:class=>"w70 undis issueEdit"}) %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<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 %>
|
<%= 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>
|
<li>
|
||||||
<p class="label03"> 完成度 : </p>
|
<p class="label03"> 完成度 : </p>
|
||||||
<span class="proInfoP" style="width:70px;"><span><%= activity.done_ratio %>%</span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
<span class="proInfoP" style="width:70px;"><span><%= activity.done_ratio %>%</span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
|
||||||
<%= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
<%= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
|
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
|
||||||
{:onchange=>"remote_function('#issue_query_done_form_#{activity.id}');",:id=>"done_ratio",:name=>"done_ratio",:class=>"w70 undis issueEdit"}) %>
|
{:onchange=>"remote_function('#issue_query_done_form_#{activity.id}');",:id=>"done_ratio",:name=>"done_ratio",:class=>"w70 undis issueEdit"}) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl ">
|
<ul class="fl ">
|
||||||
<li>
|
<li>
|
||||||
<p class="label03" style="width:50px;"> 开始 : </p>
|
<p class="label03" style="width:50px;"> 开始 : </p>
|
||||||
<p class="proInfoP" style="width:100px;"><span><%= format_date(activity.start_date) %></span></p>
|
<p class="proInfoP" style="width:100px;"><span><%= format_date(activity.start_date) %></span></p>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li>
|
<li>
|
||||||
<p class="label03" style="width:50px;"> 周期 : </p>
|
<p class="label03" style="width:50px;"> 周期 : </p>
|
||||||
<span class="proInfoP" style="width:100px;"><%= l_hours(activity.estimated_hours) %></span> </li>
|
<span class="proInfoP" style="width:100px;"><%= l_hours(activity.estimated_hours) %></span> </li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl ml20">
|
<ul class="fl ml20">
|
||||||
<li>
|
<li>
|
||||||
<p class="label03"> 计划完成 : </p>
|
<p class="label03"> 计划完成 : </p>
|
||||||
<span class="proInfoP" style="width:120px;"><span><%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %></span></span> </li>
|
<span class="proInfoP" style="width:120px;"><span><%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %></span></span> </li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li>
|
<li>
|
||||||
<p class="label03"> 目标版本 : </p>
|
<p class="label03"> 目标版本 : </p>
|
||||||
<span class="proInfoP" style="width:120px;"><%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %> </span> </li>
|
<span class="proInfoP" style="width:120px;"><%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %> </span> </li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<!--pro_info_box end-->
|
<!--pro_info_box end-->
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue