summaryrefslogtreecommitdiff
path: root/app/views/issues
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-08 10:00:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-08 10:00:19 +0300
commit1e78ceea496a8e031d82e9531d2122287602dcb3 (patch)
treee8e5c2e92cf5138ff8512b0175573aeb77059880 /app/views/issues
parenta87f5c60a4552b8be5f7d5f9de3b4cda20ec648a (diff)
downloadgitlab-ce-1e78ceea496a8e031d82e9531d2122287602dcb3.tar.gz
replace selectboxes with filters
Diffstat (limited to 'app/views/issues')
-rw-r--r--app/views/issues/_issues.html.haml55
1 files changed, 52 insertions, 3 deletions
diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml
index 93fa9da2767..1438803efb2 100644
--- a/app/views/issues/_issues.html.haml
+++ b/app/views/issues/_issues.html.haml
@@ -14,9 +14,58 @@
= button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
.issues_filters
= form_tag project_issues_path(@project), method: :get, remote: true do
- = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
- = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
- = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
+ %span Filter by
+ .dropdown.inline.prepend-left-10
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %i.icon-tags
+ %span.light labels:
+ - if params[:label_name]
+ %strong= params[:label_name]
+ - else
+ Any
+ %b.caret
+ %ul.dropdown-menu
+ - issue_label_names.each do |label_name|
+ %li
+ = link_to '#' do
+ %span{class: "label #{label_css_class(label_name)}"}
+ %i.icon-tag
+ = label_name
+ .dropdown.inline.prepend-left-10
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %i.icon-user
+ %span.light assignee:
+ - if params[:assignee_id].present?
+ %strong= User.find(params[:assignee_id]).name
+ - else
+ Any
+ %b.caret
+ %ul.dropdown-menu
+ - @project.users.sort_by(&:name).each do |user|
+ %li
+ = link_to '#' do
+ = image_tag gravatar_icon(user.email), class: "avatar s16"
+ = user.name
+
+ .dropdown.inline.prepend-left-10
+ %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
+ %i.icon-time
+ %span.light milestone:
+ - if params[:milestone_id].present?
+ %strong= Milestone.find(params[:milestone_id]).title
+ - else
+ Any
+ %b.caret
+ %ul.dropdown-menu
+ - issues_active_milestones.each do |milestone|
+ %li
+ = link_to '#' do
+ %strong= milestone.title
+ %small.light= milestone.expires_at
+
+ -#= select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
+ -#= select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
+ -#= select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag :status, params[:status]
= hidden_field_tag :issue_search, params[:status], id: 'filter_issue_search'