Commit a718a9af3e9a4f7431cab066fc81f3311f9fe639
1 parent
638f8541
Exists in
spb-stable
and in
3 other branches
Restyle labels filter to match common style
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
14 additions
and
13 deletions
Show diff stats
app/helpers/projects_helper.rb
@@ -83,9 +83,9 @@ module ProjectsHelper | @@ -83,9 +83,9 @@ module ProjectsHelper | ||
83 | 83 | ||
84 | def label_filter_class(label_name) | 84 | def label_filter_class(label_name) |
85 | if selected_label?(label_name) | 85 | if selected_label?(label_name) |
86 | - 'list-group-item active' | 86 | + 'label-filter-item active' |
87 | else | 87 | else |
88 | - 'list-group-item' | 88 | + 'label-filter-item light' |
89 | end | 89 | end |
90 | end | 90 | end |
91 | 91 |
app/views/shared/_project_filter.html.haml
@@ -29,15 +29,16 @@ | @@ -29,15 +29,16 @@ | ||
29 | - if defined?(labels) | 29 | - if defined?(labels) |
30 | %fieldset | 30 | %fieldset |
31 | %legend Labels | 31 | %legend Labels |
32 | - %ul.list-group | 32 | + %ul.nav.nav-pills.nav-stacked.nav-small.labels-filter |
33 | - issue_label_names.each do |label_name| | 33 | - issue_label_names.each do |label_name| |
34 | - = link_to labels_filter_path(label_name), class: label_filter_class(label_name) do | ||
35 | - %span{class: "label #{label_css_class(label_name)}"} | ||
36 | - %i.icon-tag | ||
37 | - = label_name | ||
38 | - - if selected_label?(label_name) | ||
39 | - .pull-right | ||
40 | - %i.icon-remove | 34 | + %li{class: label_filter_class(label_name)} |
35 | + = link_to labels_filter_path(label_name) do | ||
36 | + %span{class: "label #{label_css_class(label_name)}"} | ||
37 | + %i.icon-tag | ||
38 | + = label_name | ||
39 | + - if selected_label?(label_name) | ||
40 | + .pull-right | ||
41 | + %i.icon-remove | ||
41 | 42 | ||
42 | %fieldset | 43 | %fieldset |
43 | - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? | 44 | - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? |
features/steps/project/project_filter_labels.rb
@@ -4,19 +4,19 @@ class ProjectFilterLabels < Spinach::FeatureSteps | @@ -4,19 +4,19 @@ class ProjectFilterLabels < Spinach::FeatureSteps | ||
4 | include SharedPaths | 4 | include SharedPaths |
5 | 5 | ||
6 | Then 'I should see "bug" in labels filter' do | 6 | Then 'I should see "bug" in labels filter' do |
7 | - within ".list-group" do | 7 | + within ".labels-filter" do |
8 | page.should have_content "bug" | 8 | page.should have_content "bug" |
9 | end | 9 | end |
10 | end | 10 | end |
11 | 11 | ||
12 | And 'I should see "feature" in labels filter' do | 12 | And 'I should see "feature" in labels filter' do |
13 | - within ".list-group" do | 13 | + within ".labels-filter" do |
14 | page.should have_content "feature" | 14 | page.should have_content "feature" |
15 | end | 15 | end |
16 | end | 16 | end |
17 | 17 | ||
18 | And 'I should see "enhancement" in labels filter' do | 18 | And 'I should see "enhancement" in labels filter' do |
19 | - within ".list-group" do | 19 | + within ".labels-filter" do |
20 | page.should have_content "enhancement" | 20 | page.should have_content "enhancement" |
21 | end | 21 | end |
22 | end | 22 | end |