summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-09 09:51:59 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-09 09:51:59 +0100
commitc674ffe0e045e46fd0f2754b77b1042444d95388 (patch)
treeed4f8e01fff7be78054bccc2f10e2cdc342e12ca /app/helpers
parente8cd04e831a2db36c4029f2c193fc40d2568c79e (diff)
parent7a311c23494b26d5212cac98318273fc9d2c69d1 (diff)
downloadgitlab-ce-c674ffe0e045e46fd0f2754b77b1042444d95388.tar.gz
Merge branch 'improve-archived-projects'
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/explore_helper.rb12
-rw-r--r--app/helpers/sorting_helper.rb10
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