diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 09:51:59 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-09 09:51:59 +0100 |
commit | c674ffe0e045e46fd0f2754b77b1042444d95388 (patch) | |
tree | ed4f8e01fff7be78054bccc2f10e2cdc342e12ca /app/helpers | |
parent | e8cd04e831a2db36c4029f2c193fc40d2568c79e (diff) | |
parent | 7a311c23494b26d5212cac98318273fc9d2c69d1 (diff) | |
download | gitlab-ce-c674ffe0e045e46fd0f2754b77b1042444d95388.tar.gz |
Merge branch 'improve-archived-projects'
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/explore_helper.rb | 12 | ||||
-rw-r--r-- | app/helpers/sorting_helper.rb | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/app/helpers/explore_helper.rb b/app/helpers/explore_helper.rb index 3648757428b..337b0aacbb5 100644 --- a/app/helpers/explore_helper.rb +++ b/app/helpers/explore_helper.rb @@ -1,5 +1,5 @@ module ExploreHelper - def explore_projects_filter_path(options={}) + def filter_projects_path(options={}) exist_opts = { sort: params[:sort], scope: params[:scope], @@ -9,15 +9,7 @@ module ExploreHelper } options = exist_opts.merge(options) - - path = if explore_controller? - explore_projects_path - elsif current_action?(:starred) - starred_dashboard_projects_path - else - dashboard_projects_path - end - + path = request.path path << "?#{options.to_param}" path end diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb index f9026b887da..2f2d2721d6d 100644 --- a/app/helpers/sorting_helper.rb +++ b/app/helpers/sorting_helper.rb @@ -16,6 +16,16 @@ module SortingHelper } end + def projects_sort_options_hash + { + sort_value_name => sort_title_name, + sort_value_recently_updated => sort_title_recently_updated, + sort_value_oldest_updated => sort_title_oldest_updated, + sort_value_recently_created => sort_title_recently_created, + sort_value_oldest_created => sort_title_oldest_created, + } + end + def sort_title_oldest_updated 'Oldest updated' end |