This commit is contained in:
cxt 2015-12-29 16:32:35 +08:00
commit 5d2c760a8e
3 changed files with 7 additions and 6 deletions

View File

@ -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,

View File

@ -40,14 +40,14 @@
<%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
<% if issues.count == 10%>
<!--<div id="show_more_issues" class="loadMore mt10 f_grey">点击展开更多<%#=link_to "", project_issues_path({:project_id => project.id,:page => issue_pages.page}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %></div>-->
<%= link_to "点击展开更多",project_issues_path({:project_id => project.id,:page => issue_pages.page}.merge(params)),:id => "show_more_issues",:remote => "true",:class => "loadMore mt10 f_grey"%>
<div id="show_more_issues" class="loadMore mt10 f_grey">展开更多<%=link_to "", project_issues_path({:project_id => project.id}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %></div>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
<!--<ul class="wlist">-->
<!--<%#= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => true, :flag => true %>-->
<!--</ul>-->
<!--<script type="text/javascript">
<script type="text/javascript">
$("#show_more_issues").mouseover(function(){
$("#more_issues_link").click();
});
</script>-->
</script>

View File

@ -161,7 +161,7 @@
<div class="cl"></div>
<ul class="copyright mt10">
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Riserved</li>
<li class="fl mr30">Copyright&nbsp;&copy;&nbsp;2007-2015,&nbsp;All Rights Reserved</li>
<li>ICP备09019772</li>
</ul>
</div>