Restyle labels filter to match common style

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-02-18 20:48:02 +02:00
parent 638f8541dc
commit a718a9af3e
No known key found for this signature in database
GPG key ID: 627C5F589F467F17
3 changed files with 14 additions and 13 deletions

View file

@ -83,9 +83,9 @@ module ProjectsHelper
def label_filter_class(label_name) def label_filter_class(label_name)
if selected_label?(label_name) if selected_label?(label_name)
'list-group-item active' 'label-filter-item active'
else else
'list-group-item' 'label-filter-item light'
end end
end end

View file

@ -29,15 +29,16 @@
- if defined?(labels) - if defined?(labels)
%fieldset %fieldset
%legend Labels %legend Labels
%ul.list-group %ul.nav.nav-pills.nav-stacked.nav-small.labels-filter
- issue_label_names.each do |label_name| - issue_label_names.each do |label_name|
= link_to labels_filter_path(label_name), class: label_filter_class(label_name) do %li{class: label_filter_class(label_name)}
%span{class: "label #{label_css_class(label_name)}"} = link_to labels_filter_path(label_name) do
%i.icon-tag %span{class: "label #{label_css_class(label_name)}"}
= label_name %i.icon-tag
- if selected_label?(label_name) = label_name
.pull-right - if selected_label?(label_name)
%i.icon-remove .pull-right
%i.icon-remove
%fieldset %fieldset
- if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any?

View file

@ -4,19 +4,19 @@ class ProjectFilterLabels < Spinach::FeatureSteps
include SharedPaths include SharedPaths
Then 'I should see "bug" in labels filter' do Then 'I should see "bug" in labels filter' do
within ".list-group" do within ".labels-filter" do
page.should have_content "bug" page.should have_content "bug"
end end
end end
And 'I should see "feature" in labels filter' do And 'I should see "feature" in labels filter' do
within ".list-group" do within ".labels-filter" do
page.should have_content "feature" page.should have_content "feature"
end end
end end
And 'I should see "enhancement" in labels filter' do And 'I should see "enhancement" in labels filter' do
within ".list-group" do within ".labels-filter" do
page.should have_content "enhancement" page.should have_content "enhancement"
end end
end end