Commit 699ffeb8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'clickable-labels' into 'master'

Clickable labels

When I open issue with label `Ready for Merge` I usually want to see more issues with this label. I should visit project issues page and click on such label to see issues filtered. With this MR labels are clickable so you can get in one click from Issue show page to all issues with same labels

See merge request !1085
parents 412780cc 5913f744
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
.issue-labels .issue-labels
- issue.labels.each do |label| - issue.labels.each do |label|
= link_to project_issues_path(issue.project, label_name: label.name) do
= render_colored_label(label) = render_colored_label(label)
.issue-actions .issue-actions
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
.issue-show-labels.pull-right .issue-show-labels.pull-right
- @issue.labels.each do |label| - @issue.labels.each do |label|
= link_to project_issues_path(@project, label_name: label.name) do
= render_colored_label(label) = render_colored_label(label)
.voting_notes#notes= render "projects/notes/notes_with_form" .voting_notes#notes= render "projects/notes/notes_with_form"
...@@ -34,4 +34,5 @@ ...@@ -34,4 +34,5 @@
.merge-request-labels .merge-request-labels
- merge_request.labels.each do |label| - merge_request.labels.each do |label|
= link_to project_merge_requests_path(merge_request.project, label_name: label.name) do
= render_colored_label(label) = render_colored_label(label)
...@@ -5,4 +5,5 @@ ...@@ -5,4 +5,5 @@
.merge-request-show-labels.pull-right .merge-request-show-labels.pull-right
- @merge_request.labels.each do |label| - @merge_request.labels.each do |label|
= link_to project_merge_requests_path(@project, label_name: label.name) do
= render_colored_label(label) = render_colored_label(label)
...@@ -119,3 +119,10 @@ Feature: Project Issues ...@@ -119,3 +119,10 @@ Feature: Project Issues
Given I click link "New Issue" Given I click link "New Issue"
And I submit new issue "500 error on profile" And I submit new issue "500 error on profile"
Then I should see issue "500 error on profile" Then I should see issue "500 error on profile"
Scenario: Clickable labels
Given issue 'Release 0.4' has label 'bug'
And I visit project "Shop" issues page
When I click label 'bug'
And I should see "Release 0.4" in issues
And I should not see "Tweet control" in issues
...@@ -45,4 +45,3 @@ Feature: Project Labels ...@@ -45,4 +45,3 @@ Feature: Project Labels
And I visit project "Forum" new label page And I visit project "Forum" new label page
When I submit new label 'bug' When I submit new label 'bug'
Then I should see label 'bug' Then I should see label 'bug'
...@@ -218,6 +218,18 @@ class ProjectIssues < Spinach::FeatureSteps ...@@ -218,6 +218,18 @@ class ProjectIssues < Spinach::FeatureSteps
page.should_not have_content 'Bugfix1' page.should_not have_content 'Bugfix1'
end end
step 'issue \'Release 0.4\' has label \'bug\'' do
label = project.labels.create!(name: 'bug', color: '#990000')
issue = Issue.find_by!(title: 'Release 0.4')
issue.labels << label
end
step 'I click label \'bug\'' do
within ".issues-list" do
click_link 'bug'
end
end
def filter_issue(text) def filter_issue(text)
fill_in 'issue_search', with: text fill_in 'issue_search', with: text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment