From b13ae8f599378215f66a71273fa2f7f4cb23a6d9 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 16 Dec 2015 15:55:40 +0800 Subject: [PATCH] issue --- app/controllers/issues_controller.rb | 2 +- app/views/issues/_list.html.erb | 15 ++++++++++++--- app/views/issues/index.html.erb | 16 ++++++++-------- app/views/issues/index.js.erb | 5 ++--- public/javascripts/application.js | 4 ++++ 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 1eb39fb32..48bf3b568 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -81,7 +81,7 @@ 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'] + @issue_pages = Paginator.new @issue_count, @limit, params['page'].to_i + 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 327cc2c75..c071d57d8 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -39,6 +39,15 @@ <%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %> <% end %> - \ No newline at end of file + <% if issues.count == 10%> +
展开更多<%=link_to "", project_issues_path(:project_id => project.id,:page => issue_pages.page),: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%> + + + + \ No newline at end of file diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index df7f9dddc..7c358aaed 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -144,19 +144,19 @@

<% else %>
- <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count} %> + <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} %>
<% end %> -
- <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> - <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> - <%= f.link_to 'PDF', :url => params %> - <% end %> -
+ + + + + + +