From c821826bd8f4cef5b89c8f164f2ad07590d27f58 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 28 Dec 2015 15:17:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=99=84=E4=BB=B6=E6=8F=8F=E8=BF=B0-?= =?UTF-8?q?=E3=80=8B=E8=BF=BD=E5=8A=A0=E7=90=86=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_revise_attachment.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/student_work/_revise_attachment.html.erb b/app/views/student_work/_revise_attachment.html.erb index 2279856da..dabf9715a 100644 --- a/app/views/student_work/_revise_attachment.html.erb +++ b/app/views/student_work/_revise_attachment.html.erb @@ -9,7 +9,7 @@ <%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 2} %> 追加时间:<%=format_time revise_attachment.created_on.to_s %>  (<%=revise_attachment_status @homework,revise_attachment %>)
<% unless revise_attachment.description == "" %> - 附件描述:

<%=revise_attachment.description %>

+ 追加理由:

<%=revise_attachment.description %>

<% end %>
@@ -24,7 +24,7 @@ <%= render :partial => 'work_attachments_status', :locals => {:attachments => work.attachments.where("attachtype = 7"), :status => 1} %> 追加时间:<%=format_time revise_attachment.created_on.to_s %>
<% unless revise_attachment.description == "" %> - 附件描述:

<%=revise_attachment.description %>

+ 追加理由:

<%=revise_attachment.description %>

<% end %> <% end %> From 5ce9a5109d5e81ce4239dca044e65a685734ab80 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 28 Dec 2015 16:55:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?issue=E5=AD=98=E5=9C=A8=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 3 ++- app/views/issues/_list.html.erb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 9b81ac775..77dc1a9aa 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -81,7 +81,8 @@ class IssuesController < ApplicationController @status_id = params[:status_id] @subject = params[:subject] @issue_count = @query.issue_count - @issue_pages = Paginator.new @issue_count, @limit, params['page'].to_i + 1 + @issue_pages = Paginator.new @issue_count, @limit, params['page'] + params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1 @offset ||= @issue_pages.offset @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], :order => sort_clause, diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index fd6171f18..58fbda6d6 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -40,7 +40,7 @@ <%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %> <% end %> <% if issues.count == 10%> -
展开更多<%=link_to "", project_issues_path({:project_id => project.id,:page => issue_pages.page}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
+
展开更多<%=link_to "", project_issues_path({:project_id => project.id}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> <% end%>