Commit 188a74c3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

init filter links

parent 1e78ceea
......@@ -78,4 +78,15 @@ module IssuesHelper
""
end
end
def project_issues_with_filter_path(project, opts)
default_opts = {
status: params[:status],
label_name: params[:label_name],
milestone_id: params[:milestone_id],
assignee_id: params[:assignee_id],
}
project_issues_path(@project, default_opts.merge(opts))
end
end
......@@ -19,7 +19,7 @@
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%i.icon-tags
%span.light labels:
- if params[:label_name]
- if params[:label_name].present?
%strong= params[:label_name]
- else
Any
......@@ -27,7 +27,7 @@
%ul.dropdown-menu
- issue_label_names.each do |label_name|
%li
= link_to '#' do
= link_to project_issues_with_filter_path(@project, label_name: label_name) do
%span{class: "label #{label_css_class(label_name)}"}
%i.icon-tag
= label_name
......@@ -43,7 +43,7 @@
%ul.dropdown-menu
- @project.users.sort_by(&:name).each do |user|
%li
= link_to '#' do
= link_to project_issues_with_filter_path(@project, assignee_id: user.id) do
= image_tag gravatar_icon(user.email), class: "avatar s16"
= user.name
......@@ -59,7 +59,7 @@
%ul.dropdown-menu
- issues_active_milestones.each do |milestone|
%li
= link_to '#' do
= link_to project_issues_with_filter_path(@project, milestone_id: milestone.id) do
%strong= milestone.title
%small.light= milestone.expires_at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment