From 16cb4add09365267eb0eefebd59fd9b5ae287e4e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 22 Jan 2016 18:48:40 +0800 Subject: [PATCH] =?UTF-8?q?issue=E5=B1=80=E9=83=A8=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 4 ++-- app/views/users/_project_issue.html.erb | 2 ++ app/views/users/_project_issue_detail.html.erb | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 72dd0a741..eb78c4c5b 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -81,7 +81,7 @@ class IssuesController < ApplicationController @priority_id = params[:priority_id] @status_id = params[:status_id] @subject = params[:subject] - @done_ratio = parmas[:done_ratio] + @done_ratio = params[:done_ratio] @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1 @@ -222,7 +222,7 @@ class IssuesController < ApplicationController def update if params[:issue_detail] - issue = Issue.find(params[:issue_id]) + issue = Issue.find(params[:id]) issue = update_user_issue_detail(issue, params) @saved = update_user_issue_detail(issue, params) return diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 618dc3185..725a064cc 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -52,9 +52,11 @@ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%# 局部刷新:修改xissue属性 %> + <% unless params[:action] == "index" %>
<%= render :partial => 'users/project_issue_detail', :locals => {:activity => activity} %>
+ <% end %>
diff --git a/app/views/users/_project_issue_detail.html.erb b/app/views/users/_project_issue_detail.html.erb index e46761bd1..b682a74ea 100644 --- a/app/views/users/_project_issue_detail.html.erb +++ b/app/views/users/_project_issue_detail.html.erb @@ -42,7 +42,7 @@ {: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', :issue_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 %>
  •  状态  : 

    <%= activity.status.name %>

    @@ -54,7 +54,7 @@
  • <% end %>
    - <%= form_tag({:controller => 'issues', :action => 'update', :issue_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 %>
  •  指派  : 

    @@ -68,7 +68,7 @@
      - <%= form_tag({:controller => 'issues', :action => 'update', :issue_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 %>
    •  优先级  : 

      <%= activity.priority.name %> @@ -78,7 +78,7 @@
    • <% end %>
      - <%= form_tag({:controller => 'issues', :action => 'update', :issue_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 %>
    •  完成度  : 

      <%= activity.done_ratio %>%