diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-08 13:43:21 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-08 13:43:21 +0300 |
commit | 646fbe92867037a7dd230be880783c3d8ede5dc1 (patch) | |
tree | 5b8d17fca6cb2523f910a1c8f1d24ad6ae5c76e7 /app/views/issues | |
parent | 188a74c3a2e16329eae9abc0006830dbfdea0472 (diff) | |
download | gitlab-ce-646fbe92867037a7dd230be880783c3d8ede5dc1.tar.gz |
bring more usability to issues filtering. Block issues area on loading filtered results
Diffstat (limited to 'app/views/issues')
-rw-r--r-- | app/views/issues/_filter.html.haml | 2 | ||||
-rw-r--r-- | app/views/issues/_issues.html.haml | 113 |
2 files changed, 63 insertions, 52 deletions
diff --git a/app/views/issues/_filter.html.haml b/app/views/issues/_filter.html.haml index b621f11bc5b..8495c323cb8 100644 --- a/app/views/issues/_filter.html.haml +++ b/app/views/issues/_filter.html.haml @@ -1,7 +1,7 @@ = form_tag project_issues_path(@project), method: 'get' do %fieldset %ul.nav.nav-pills.nav-stacked - %li{class: ("active" if !params[:status])} + %li{class: ("active" if !params[:status] || params[:status].blank?)} = link_to project_issues_path(@project, status: nil) do Open %li{class: ("active" if params[:status] == 'assigned-to-me')} diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index 4233e2466e5..cc8d8d9cae2 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -12,62 +12,73 @@ = hidden_field_tag 'update[issues_ids]', [] = hidden_field_tag :status, params[:status] = 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 - %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].present? - %strong= params[:label_name] - - else + .issues-filters + %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].present? + %strong= params[:label_name] + - else + Any + %b.caret + %ul.dropdown-menu + %li + = link_to project_issues_with_filter_path(@project, label_name: nil) do Any - %b.caret - %ul.dropdown-menu - - issue_label_names.each do |label_name| - %li - = 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 - .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 + - issue_label_names.each do |label_name| + %li + = 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 + .dropdown.inline.prepend-left-10 + %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} + %i.icon-user + %span.light assignee: + - if @assignee.present? + %strong= @assignee.name + - elsif params[:assignee_id] == "0" + Unassigned + - else + Any + %b.caret + %ul.dropdown-menu + %li + = link_to project_issues_with_filter_path(@project, assignee_id: nil) do Any - %b.caret - %ul.dropdown-menu - - @project.users.sort_by(&:name).each do |user| - %li - = link_to project_issues_with_filter_path(@project, assignee_id: user.id) do - = image_tag gravatar_icon(user.email), class: "avatar s16" - = user.name + = link_to project_issues_with_filter_path(@project, assignee_id: 0) do + Unassigned + - @project.users.sort_by(&:name).each do |user| + %li + = link_to project_issues_with_filter_path(@project, assignee_id: user.id) 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 + .dropdown.inline.prepend-left-10 + %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} + %i.icon-time + %span.light milestone: + - if @milestone.present? + %strong= @milestone.title + - elsif params[:milestone_id] == "0" + Unspecified + - else + Any + %b.caret + %ul.dropdown-menu + %li + = link_to project_issues_with_filter_path(@project, milestone_id: nil) do Any - %b.caret - %ul.dropdown-menu - - issues_active_milestones.each do |milestone| - %li - = link_to project_issues_with_filter_path(@project, milestone_id: milestone.id) do - %strong= milestone.title - %small.light= milestone.expires_at + = link_to project_issues_with_filter_path(@project, milestone_id: 0) do + Unspecified + - issues_active_milestones.each do |milestone| + %li + = link_to project_issues_with_filter_path(@project, milestone_id: milestone.id) 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' %ul.well-list.issues-list = render @issues |