summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-06 21:12:01 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-06 21:12:01 +0300
commit512cd02335de9de22aab688743a01fa868229f0d (patch)
tree6996e941f796450bcb25150f502eb861bddeeaf4 /app/helpers
parent21c70354f609c292d302c433f9f9bcea31674ab9 (diff)
downloadgitlab-ce-512cd02335de9de22aab688743a01fa868229f0d.tar.gz
Dashboard/Group issues and mr pages refactoring
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/dashboard_helper.rb11
-rw-r--r--app/helpers/groups_helper.rb16
2 files changed, 4 insertions, 23 deletions
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb
index e3be07c9fe0..35c7bcbd2cf 100644
--- a/app/helpers/dashboard_helper.rb
+++ b/app/helpers/dashboard_helper.rb
@@ -1,5 +1,5 @@
module DashboardHelper
- def dashboard_filter_path(entity, options={})
+ def filter_path(entity, options={})
exist_opts = {
status: params[:status],
project_id: params[:project_id],
@@ -7,12 +7,9 @@ module DashboardHelper
options = exist_opts.merge(options)
- case entity
- when 'issue' then
- issues_dashboard_path(options)
- when 'merge_request'
- merge_requests_dashboard_path(options)
- end
+ path = request.path
+ path << "?#{options.to_param}"
+ path
end
def entities_per_project project, entity
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
index 2ffbff7af8d..8573c59dc94 100644
--- a/app/helpers/groups_helper.rb
+++ b/app/helpers/groups_helper.rb
@@ -1,20 +1,4 @@
module GroupsHelper
- def group_filter_path(entity, options={})
- exist_opts = {
- status: params[:status],
- project_id: params[:project_id],
- }
-
- options = exist_opts.merge(options)
-
- case entity
- when 'issue' then
- issues_group_path(@group, options)
- when 'merge_request'
- merge_requests_group_path(@group, options)
- end
- end
-
def remove_user_from_group_message(group, user)
"You are going to remove #{user.name} from #{group.name} Group. Are you sure?"
end