summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/pagination_helper.rb21
-rw-r--r--app/views/dashboard/todos/index.html.haml2
-rw-r--r--app/views/shared/projects/_list.html.haml2
3 files changed, 2 insertions, 23 deletions
diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb
deleted file mode 100644
index 83dd76a01dd..00000000000
--- a/app/helpers/pagination_helper.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-module PaginationHelper
- def paginate_collection(collection, remote: nil)
- if collection.is_a?(Kaminari::PaginatableWithoutCount)
- paginate_without_count(collection)
- elsif collection.respond_to?(:total_pages)
- paginate_with_count(collection, remote: remote)
- end
- end
-
- def paginate_without_count(collection)
- render(
- 'kaminari/gitlab/without_count',
- previous_path: path_to_prev_page(collection),
- next_path: path_to_next_page(collection)
- )
- end
-
- def paginate_with_count(collection, remote: nil)
- paginate(collection, remote: remote, theme: 'gitlab')
- end
-end
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index a5686002328..4c4e9dabdaa 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -72,7 +72,7 @@
.js-todos-all
- if @todos.any?
.js-todos-list-container
- .js-todos-options{ data: { per_page: @todos.limit_value, current_page: @todos.current_page, total_pages: @todos.total_pages } }
+ .js-todos-options{ data: { per_page: @todos.limit_value, current_page: @todos.current_page } }
.panel.panel-default.panel-without-border.panel-without-margin
%ul.content-list.todos-list
= render @todos
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 0bedfea3502..109c99b0dda 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -23,6 +23,6 @@
= icon('lock fw', base: 'circle', class: 'fa-lg private-fork-icon')
%strong= pluralize(@private_forks_count, 'private fork')
%span  you have no access to.
- = paginate_collection(projects, remote: remote)
+ = paginate(projects, remote: remote)
- else
.nothing-here-block No projects found