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

init filter links

parent 1e78ceea
...@@ -78,4 +78,15 @@ module IssuesHelper ...@@ -78,4 +78,15 @@ module IssuesHelper
"" ""
end end
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 end
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%i.icon-tags %i.icon-tags
%span.light labels: %span.light labels:
- if params[:label_name] - if params[:label_name].present?
%strong= params[:label_name] %strong= params[:label_name]
- else - else
Any Any
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
%ul.dropdown-menu %ul.dropdown-menu
- issue_label_names.each do |label_name| - issue_label_names.each do |label_name|
%li %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)}"} %span{class: "label #{label_css_class(label_name)}"}
%i.icon-tag %i.icon-tag
= label_name = label_name
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
%ul.dropdown-menu %ul.dropdown-menu
- @project.users.sort_by(&:name).each do |user| - @project.users.sort_by(&:name).each do |user|
%li %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" = image_tag gravatar_icon(user.email), class: "avatar s16"
= user.name = user.name
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
%ul.dropdown-menu %ul.dropdown-menu
- issues_active_milestones.each do |milestone| - issues_active_milestones.each do |milestone|
%li %li
= link_to '#' do = link_to project_issues_with_filter_path(@project, milestone_id: milestone.id) do
%strong= milestone.title %strong= milestone.title
%small.light= milestone.expires_at %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