]> source.dussan.org Git - redmine.git/commitdiff
Don't paginate the board view for now (#29482).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Oct 2019 07:09:52 +0000 (07:09 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Oct 2019 07:09:52 +0000 (07:09 +0000)
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

app/controllers/projects_controller.rb
app/views/projects/_list.html.erb
app/views/projects/index.html.erb

index 2e4fc53030bc761206d940f7e4aea30a241ef8d6..c5c98d6fda5bd21c01a9d76ae3295ebde093a901 100644 (file)
@@ -52,9 +52,14 @@ class ProjectsController < ApplicationController
 
     respond_to do |format|
       format.html {
-        @entry_count = scope.count
-        @entry_pages = Paginator.new @entry_count, per_page_option, params['page']
-        @entries = scope.offset(@entry_pages.offset).limit(@entry_pages.per_page).to_a
+        # 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_pages = Paginator.new @entry_count, per_page_option, params['page']
+          @entries = scope.offset(@entry_pages.offset).limit(@entry_pages.per_page).to_a
+        end
       }
       format.api  {
         @offset, @limit = api_offset_and_limit
index 8a1efc204c1133a65fa46b84a5309f85ea2317b3..298ec8ca7477db6916e862fb0b85baf063931a9d 100644 (file)
@@ -33,3 +33,4 @@
 </tbody>
 </table>
 </div>
+<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
index 067c9bdee19fcd2eca54f6668ff84a178719c794..59fc4e6e2adadfdf049c2641d5c74801108d29d5 100644 (file)
@@ -15,7 +15,6 @@
     <p class="nodata"><%= l(:label_no_data) %></p>
   <% else %>
     <%= render :partial => @query.display_type, :locals => { :entries => @entries }%>
-    <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
   <% end %>
 <% end %>