Commit 9b5728057e1d0a47fd2923c3b2fa2248edebafac
1 parent
67798492
Exists in
spb-stable
and in
3 other branches
Restyle issue/mr top filters for list
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
7 changed files
with
154 additions
and
141 deletions
Show diff stats
app/assets/stylesheets/generic/common.scss
@@ -112,6 +112,7 @@ pre.well-pre { | @@ -112,6 +112,7 @@ pre.well-pre { | ||
112 | .dropdown-menu > li > a:hover, | 112 | .dropdown-menu > li > a:hover, |
113 | .dropdown-menu > li > a:focus { | 113 | .dropdown-menu > li > a:focus { |
114 | background: #29b; | 114 | background: #29b; |
115 | + color: #FFF | ||
115 | } | 116 | } |
116 | 117 | ||
117 | .breadcrumb > li + li:before { | 118 | .breadcrumb > li + li:before { |
app/assets/stylesheets/sections/issues.scss
@@ -14,8 +14,8 @@ | @@ -14,8 +14,8 @@ | ||
14 | 14 | ||
15 | .issue-check { | 15 | .issue-check { |
16 | float: left; | 16 | float: left; |
17 | - padding: 8px 0; | ||
18 | padding-right: 8px; | 17 | padding-right: 8px; |
18 | + margin-bottom: 10px; | ||
19 | min-width: 15px; | 19 | min-width: 15px; |
20 | } | 20 | } |
21 | 21 | ||
@@ -38,13 +38,21 @@ | @@ -38,13 +38,21 @@ | ||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | -input.check_all_issues { | 41 | +.check-all-holder { |
42 | + height: 32px; | ||
42 | float: left; | 43 | float: left; |
43 | - padding: 0; | ||
44 | - margin: 0; | ||
45 | - margin-right: 10px; | ||
46 | - position: relative; | ||
47 | - top: 13px; | 44 | + margin-right: 12px; |
45 | + padding: 6px 10px; | ||
46 | + border: 1px solid #ccc; | ||
47 | + @include border-radius(4px); | ||
48 | + | ||
49 | + | ||
50 | + input.check_all_issues { | ||
51 | + padding: 0; | ||
52 | + margin: 0; | ||
53 | + position: relative; | ||
54 | + top: 3px; | ||
55 | + } | ||
48 | } | 56 | } |
49 | 57 | ||
50 | .issues_content { | 58 | .issues_content { |
@@ -91,6 +99,13 @@ input.check_all_issues { | @@ -91,6 +99,13 @@ input.check_all_issues { | ||
91 | .update_selected_issues { | 99 | .update_selected_issues { |
92 | margin-left: 4px; | 100 | margin-left: 4px; |
93 | } | 101 | } |
102 | + | ||
103 | + .select2-container .select2-choice { | ||
104 | + height: 32px; | ||
105 | + line-height: 28px; | ||
106 | + color: #444 !important; | ||
107 | + font-weight: 500; | ||
108 | + } | ||
94 | } | 109 | } |
95 | } | 110 | } |
96 | 111 |
app/helpers/issues_helper.rb
@@ -70,11 +70,11 @@ module IssuesHelper | @@ -70,11 +70,11 @@ module IssuesHelper | ||
70 | end | 70 | end |
71 | 71 | ||
72 | def bulk_update_milestone_options | 72 | def bulk_update_milestone_options |
73 | - options_for_select(["None (backlog)", nil]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id]) | 73 | + options_for_select(["None (backlog)"]) + options_from_collection_for_select(project_active_milestones, "id", "title", params[:milestone_id]) |
74 | end | 74 | end |
75 | 75 | ||
76 | def bulk_update_assignee_options | 76 | def bulk_update_assignee_options |
77 | - options_for_select(["None (unassigned)", nil]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id]) | 77 | + options_for_select(["None (unassigned)"]) + options_from_collection_for_select(@project.team.members, "id", "name", params[:assignee_id]) |
78 | end | 78 | end |
79 | 79 | ||
80 | def assignee_options object | 80 | def assignee_options object |
app/views/projects/issues/_head.html.haml
@@ -17,10 +17,10 @@ | @@ -17,10 +17,10 @@ | ||
17 | 17 | ||
18 | %li.pull-right | 18 | %li.pull-right |
19 | .pull-right | 19 | .pull-right |
20 | - = form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'inline issue-search-form' do | 20 | + = form_tag project_issues_path(@project), method: :get, id: "issue_search_form", class: 'pull-left issue-search-form' do |
21 | .append-right-10.hidden-xs.hidden-sm | 21 | .append-right-10.hidden-xs.hidden-sm |
22 | = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } | 22 | = search_field_tag :issue_search, nil, { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input input-mn-300' } |
23 | - if can? current_user, :write_issue, @project | 23 | - if can? current_user, :write_issue, @project |
24 | - = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new", title: "New Issue", id: "new_issue_link" do | 24 | + = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do |
25 | %i.icon-plus | 25 | %i.icon-plus |
26 | New Issue | 26 | New Issue |
app/views/projects/issues/_issues.html.haml
1 | -.ui-box | ||
2 | - .title | 1 | +.append-bottom-10 |
2 | + .check-all-holder | ||
3 | = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left" | 3 | = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left" |
4 | - .clearfix | ||
5 | - .issues_bulk_update.hide | ||
6 | - = form_tag bulk_update_project_issues_path(@project), method: :post do | ||
7 | - %span Update selected issues with | ||
8 | - = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status") | ||
9 | - = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee') | ||
10 | - = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone") | ||
11 | - = hidden_field_tag 'update[issues_ids]', [] | ||
12 | - = hidden_field_tag :status, params[:status] | ||
13 | - = button_tag "Save", class: "btn update_selected_issues btn-small btn-save" | ||
14 | - .issues-filters | ||
15 | - %span Filter by | ||
16 | - .dropdown.inline.prepend-left-10 | ||
17 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
18 | - %i.icon-tags | ||
19 | - %span.light labels: | ||
20 | - - if params[:label_name].present? | ||
21 | - %strong= params[:label_name] | ||
22 | - - else | ||
23 | - Any | ||
24 | - %b.caret | ||
25 | - %ul.dropdown-menu | ||
26 | - %li | ||
27 | - = link_to project_filter_path(label_name: nil) do | ||
28 | - Any | ||
29 | - - issue_label_names.each do |label_name| | ||
30 | - %li | ||
31 | - = link_to project_filter_path(label_name: label_name) do | ||
32 | - %span{class: "label #{label_css_class(label_name)}"} | ||
33 | - %i.icon-tag | ||
34 | - = label_name | ||
35 | - .dropdown.inline.prepend-left-10 | ||
36 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
37 | - %i.icon-user | ||
38 | - %span.light assignee: | ||
39 | - - if @assignee.present? | ||
40 | - %strong= @assignee.name | ||
41 | - - elsif params[:assignee_id] == "0" | ||
42 | - Unassigned | ||
43 | - - else | ||
44 | - Any | ||
45 | - %b.caret | ||
46 | - %ul.dropdown-menu | ||
47 | - %li | ||
48 | - = link_to project_filter_path(assignee_id: nil) do | ||
49 | - Any | ||
50 | - = link_to project_filter_path(assignee_id: 0) do | ||
51 | - Unassigned | ||
52 | - - @assignees.sort_by(&:name).each do |user| | ||
53 | - %li | ||
54 | - = link_to project_filter_path(assignee_id: user.id) do | ||
55 | - = image_tag avatar_icon(user.email), class: "avatar s16", alt: '' | ||
56 | - = user.name | 4 | + .issues-filters |
5 | + .dropdown.inline | ||
6 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
7 | + %i.icon-tags | ||
8 | + %span.light labels: | ||
9 | + - if params[:label_name].present? | ||
10 | + %strong= params[:label_name] | ||
11 | + - else | ||
12 | + Any | ||
13 | + %b.caret | ||
14 | + %ul.dropdown-menu | ||
15 | + %li | ||
16 | + = link_to project_filter_path(label_name: nil) do | ||
17 | + Any | ||
18 | + - issue_label_names.each do |label_name| | ||
19 | + %li | ||
20 | + = link_to project_filter_path(label_name: label_name) do | ||
21 | + %span{class: "label #{label_css_class(label_name)}"} | ||
22 | + %i.icon-tag | ||
23 | + = label_name | ||
24 | + .dropdown.inline.prepend-left-10 | ||
25 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
26 | + %i.icon-user | ||
27 | + %span.light assignee: | ||
28 | + - if @assignee.present? | ||
29 | + %strong= @assignee.name | ||
30 | + - elsif params[:assignee_id] == "0" | ||
31 | + Unassigned | ||
32 | + - else | ||
33 | + Any | ||
34 | + %b.caret | ||
35 | + %ul.dropdown-menu | ||
36 | + %li | ||
37 | + = link_to project_filter_path(assignee_id: nil) do | ||
38 | + Any | ||
39 | + = link_to project_filter_path(assignee_id: 0) do | ||
40 | + Unassigned | ||
41 | + - @assignees.sort_by(&:name).each do |user| | ||
42 | + %li | ||
43 | + = link_to project_filter_path(assignee_id: user.id) do | ||
44 | + = image_tag avatar_icon(user.email), class: "avatar s16", alt: '' | ||
45 | + = user.name | ||
57 | 46 | ||
58 | - .dropdown.inline.prepend-left-10 | ||
59 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
60 | - %i.icon-time | ||
61 | - %span.light milestone: | ||
62 | - - if @milestone.present? | ||
63 | - %strong= @milestone.title | ||
64 | - - elsif params[:milestone_id] == "0" | ||
65 | - None (backlog) | ||
66 | - - else | ||
67 | - Any | ||
68 | - %b.caret | ||
69 | - %ul.dropdown-menu | ||
70 | - %li | ||
71 | - = link_to project_filter_path(milestone_id: nil) do | ||
72 | - Any | ||
73 | - = link_to project_filter_path(milestone_id: 0) do | ||
74 | - None (backlog) | ||
75 | - - project_active_milestones.each do |milestone| | ||
76 | - %li | ||
77 | - = link_to project_filter_path(milestone_id: milestone.id) do | ||
78 | - %strong= milestone.title | ||
79 | - %small.light= milestone.expires_at | 47 | + .dropdown.inline.prepend-left-10 |
48 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
49 | + %i.icon-time | ||
50 | + %span.light milestone: | ||
51 | + - if @milestone.present? | ||
52 | + %strong= @milestone.title | ||
53 | + - elsif params[:milestone_id] == "0" | ||
54 | + None (backlog) | ||
55 | + - else | ||
56 | + Any | ||
57 | + %b.caret | ||
58 | + %ul.dropdown-menu | ||
59 | + %li | ||
60 | + = link_to project_filter_path(milestone_id: nil) do | ||
61 | + Any | ||
62 | + = link_to project_filter_path(milestone_id: 0) do | ||
63 | + None (backlog) | ||
64 | + - project_active_milestones.each do |milestone| | ||
65 | + %li | ||
66 | + = link_to project_filter_path(milestone_id: milestone.id) do | ||
67 | + %strong= milestone.title | ||
68 | + %small.light= milestone.expires_at | ||
80 | 69 | ||
81 | - .pull-right | ||
82 | - = render 'shared/sort_dropdown' | 70 | + .pull-right |
71 | + = render 'shared/sort_dropdown' | ||
83 | 72 | ||
73 | + .clearfix | ||
74 | + .issues_bulk_update.hide | ||
75 | + = form_tag bulk_update_project_issues_path(@project), method: :post do | ||
76 | + = select_tag('update[status]', options_for_select(['Open', 'Closed']), prompt: "Status") | ||
77 | + = project_users_select_tag('update[assignee_id]', placeholder: 'Assignee') | ||
78 | + = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone") | ||
79 | + = hidden_field_tag 'update[issues_ids]', [] | ||
80 | + = hidden_field_tag :status, params[:status] | ||
81 | + = button_tag "Update issues", class: "btn update_selected_issues btn-save" | ||
84 | 82 | ||
83 | +.ui-box | ||
85 | %ul.well-list.issues-list | 84 | %ul.well-list.issues-list |
86 | = render @issues | 85 | = render @issues |
87 | - if @issues.blank? | 86 | - if @issues.blank? |
app/views/projects/merge_requests/index.html.haml
@@ -10,59 +10,57 @@ | @@ -10,59 +10,57 @@ | ||
10 | .col-md-3 | 10 | .col-md-3 |
11 | = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project) | 11 | = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project) |
12 | .col-md-9 | 12 | .col-md-9 |
13 | - .ui-box | ||
14 | - .title | ||
15 | - .mr-filters | ||
16 | - %span Filter by | ||
17 | - .dropdown.inline.prepend-left-10 | ||
18 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
19 | - %i.icon-user | ||
20 | - %span.light assignee: | ||
21 | - - if @assignee.present? | ||
22 | - %strong= @assignee.name | ||
23 | - - elsif params[:assignee_id] == "0" | ||
24 | - Unassigned | ||
25 | - - else | ||
26 | - Any | ||
27 | - %b.caret | ||
28 | - %ul.dropdown-menu | ||
29 | - %li | ||
30 | - = link_to project_filter_path(assignee_id: nil) do | ||
31 | - Any | ||
32 | - = link_to project_filter_path(assignee_id: 0) do | ||
33 | - Unassigned | ||
34 | - - @assignees.sort_by(&:name).each do |user| | ||
35 | - %li | ||
36 | - = link_to project_filter_path(assignee_id: user.id) do | ||
37 | - = image_tag avatar_icon(user.email), class: "avatar s16", alt: '' | ||
38 | - = user.name | 13 | + .mr-filters.append-bottom-10 |
14 | + .dropdown.inline | ||
15 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
16 | + %i.icon-user | ||
17 | + %span.light assignee: | ||
18 | + - if @assignee.present? | ||
19 | + %strong= @assignee.name | ||
20 | + - elsif params[:assignee_id] == "0" | ||
21 | + Unassigned | ||
22 | + - else | ||
23 | + Any | ||
24 | + %b.caret | ||
25 | + %ul.dropdown-menu | ||
26 | + %li | ||
27 | + = link_to project_filter_path(assignee_id: nil) do | ||
28 | + Any | ||
29 | + = link_to project_filter_path(assignee_id: 0) do | ||
30 | + Unassigned | ||
31 | + - @assignees.sort_by(&:name).each do |user| | ||
32 | + %li | ||
33 | + = link_to project_filter_path(assignee_id: user.id) do | ||
34 | + = image_tag avatar_icon(user.email), class: "avatar s16", alt: '' | ||
35 | + = user.name | ||
39 | 36 | ||
40 | - .dropdown.inline.prepend-left-10 | ||
41 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | ||
42 | - %i.icon-time | ||
43 | - %span.light milestone: | ||
44 | - - if @milestone.present? | ||
45 | - %strong= @milestone.title | ||
46 | - - elsif params[:milestone_id] == "0" | ||
47 | - None (backlog) | ||
48 | - - else | ||
49 | - Any | ||
50 | - %b.caret | ||
51 | - %ul.dropdown-menu | ||
52 | - %li | ||
53 | - = link_to project_filter_path(milestone_id: nil) do | ||
54 | - Any | ||
55 | - = link_to project_filter_path(milestone_id: 0) do | ||
56 | - None (backlog) | ||
57 | - - project_active_milestones.each do |milestone| | ||
58 | - %li | ||
59 | - = link_to project_filter_path(milestone_id: milestone.id) do | ||
60 | - %strong= milestone.title | ||
61 | - %small.light= milestone.expires_at | 37 | + .dropdown.inline.prepend-left-10 |
38 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
39 | + %i.icon-time | ||
40 | + %span.light milestone: | ||
41 | + - if @milestone.present? | ||
42 | + %strong= @milestone.title | ||
43 | + - elsif params[:milestone_id] == "0" | ||
44 | + None (backlog) | ||
45 | + - else | ||
46 | + Any | ||
47 | + %b.caret | ||
48 | + %ul.dropdown-menu | ||
49 | + %li | ||
50 | + = link_to project_filter_path(milestone_id: nil) do | ||
51 | + Any | ||
52 | + = link_to project_filter_path(milestone_id: 0) do | ||
53 | + None (backlog) | ||
54 | + - project_active_milestones.each do |milestone| | ||
55 | + %li | ||
56 | + = link_to project_filter_path(milestone_id: milestone.id) do | ||
57 | + %strong= milestone.title | ||
58 | + %small.light= milestone.expires_at | ||
62 | 59 | ||
63 | - .pull-right | ||
64 | - = render 'shared/sort_dropdown' | 60 | + .pull-right |
61 | + = render 'shared/sort_dropdown' | ||
65 | 62 | ||
63 | + .ui-box | ||
66 | %ul.well-list.mr-list | 64 | %ul.well-list.mr-list |
67 | = render @merge_requests | 65 | = render @merge_requests |
68 | - if @merge_requests.blank? | 66 | - if @merge_requests.blank? |
app/views/shared/_sort_dropdown.html.haml
1 | .dropdown.inline.prepend-left-10 | 1 | .dropdown.inline.prepend-left-10 |
2 | - %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"} | 2 | + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} |
3 | %span.light sort: | 3 | %span.light sort: |
4 | - if @sort.present? | 4 | - if @sort.present? |
5 | = @sort | 5 | = @sort |