1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-20 15:31:12 +00:00

Don't paginate the board view for now (#29482).

Subprojects may appear as root projects if their parents are on a previous page.

git-svn-id: http://svn.redmine.org/redmine/trunk@18866 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2019-10-26 07:09:52 +00:00
parent 49222d01fb
commit 5a72c19e5d
3 changed files with 9 additions and 4 deletions

View File

@ -52,9 +52,14 @@ class ProjectsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
# TODO: see what to do with the board view and pagination
if @query.display_type == 'board'
@entries = scope.to_a
else
@entry_count = scope.count @entry_count = scope.count
@entry_pages = Paginator.new @entry_count, per_page_option, params['page'] @entry_pages = Paginator.new @entry_count, per_page_option, params['page']
@entries = scope.offset(@entry_pages.offset).limit(@entry_pages.per_page).to_a @entries = scope.offset(@entry_pages.offset).limit(@entry_pages.per_page).to_a
end
} }
format.api { format.api {
@offset, @limit = api_offset_and_limit @offset, @limit = api_offset_and_limit

View File

@ -33,3 +33,4 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>

View File

@ -15,7 +15,6 @@
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% else %> <% else %>
<%= render :partial => @query.display_type, :locals => { :entries => @entries }%> <%= render :partial => @query.display_type, :locals => { :entries => @entries }%>
<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
<% end %> <% end %>
<% end %> <% end %>