BigW Consortium Gitlab

dashboard_helper.rb 583 Bytes
Newer Older
1
module DashboardHelper
2 3 4 5 6
  def projects_dashboard_filter_path(options={})
    exist_opts = {
      sort: params[:sort],
      scope: params[:scope],
      group: params[:group],
7 8
      tag: params[:tag],
      visibility_level: params[:visibility_level],
9 10 11 12 13 14 15 16
    }

    options = exist_opts.merge(options)

    path = request.path
    path << "?#{options.to_param}"
    path
  end
17

18 19
  def assigned_issues_dashboard_path
    issues_dashboard_path(assignee_id: current_user.id)
20 21
  end

22 23
  def assigned_mrs_dashboard_path
    merge_requests_dashboard_path(assignee_id: current_user.id)
24
  end
25
end