summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects_controller.rb11
-rw-r--r--app/views/projects/_list.html.erb1
-rw-r--r--app/views/projects/index.html.erb1
3 files changed, 9 insertions, 4 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 2e4fc5303..c5c98d6fd 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -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
diff --git a/app/views/projects/_list.html.erb b/app/views/projects/_list.html.erb
index 8a1efc204..298ec8ca7 100644
--- a/app/views/projects/_list.html.erb
+++ b/app/views/projects/_list.html.erb
@@ -33,3 +33,4 @@
</tbody>
</table>
</div>
+<span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 067c9bdee..59fc4e6e2 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -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 %>