GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

explore_helper.rb 666 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
module ExploreHelper
  def explore_projects_filter_path(options={})
    exist_opts = {
      sort: params[:sort],
      scope: params[:scope],
      group: params[:group],
      tag: params[:tag],
      visibility_level: params[:visibility_level],
    }

    options = exist_opts.merge(options)

13 14 15 16 17 18 19 20
    path = if explore_controller?
             explore_projects_path
           elsif current_action?(:starred)
             starred_dashboard_projects_path
           else
             dashboard_projects_path
           end

21 22 23
    path << "?#{options.to_param}"
    path
  end
24 25 26 27

  def explore_controller?
    controller.class.name.split("::").first == "Explore"
  end
28
end