diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-03 20:13:26 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-03 20:13:26 +0100 |
commit | 73bd729ecca27a293c47101dd399e628e221ce2d (patch) | |
tree | be4068dbdc2098a0ad638cf2588285ef25b48cba /app/helpers/explore_helper.rb | |
parent | d506b3f958654534de93f443b9a81ba4434c0b71 (diff) | |
download | gitlab-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.rb | 13 |
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 |