summaryrefslogtreecommitdiff
path: root/app/helpers/explore_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-02-03 20:13:26 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-02-03 20:13:26 +0100
commit73bd729ecca27a293c47101dd399e628e221ce2d (patch)
treebe4068dbdc2098a0ad638cf2588285ef25b48cba /app/helpers/explore_helper.rb
parentd506b3f958654534de93f443b9a81ba4434c0b71 (diff)
downloadgitlab-ce-73bd729ecca27a293c47101dd399e628e221ce2d.tar.gz
Add sort dropdown to dashboard projects pagedashboard-sort-dropdown
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/explore_helper.rb')
-rw-r--r--app/helpers/explore_helper.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/explore_helper.rb b/app/helpers/explore_helper.rb
index 0d291f9a87e..3648757428b 100644
--- a/app/helpers/explore_helper.rb
+++ b/app/helpers/explore_helper.rb
@@ -10,8 +10,19 @@ module ExploreHelper
options = exist_opts.merge(options)
- path = explore_projects_path
+ path = if explore_controller?
+ explore_projects_path
+ elsif current_action?(:starred)
+ starred_dashboard_projects_path
+ else
+ dashboard_projects_path
+ end
+
path << "?#{options.to_param}"
path
end
+
+ def explore_controller?
+ controller.class.name.split("::").first == "Explore"
+ end
end