Commit 8eeebf0de601f3a05e3fe4d273ead7aaf3257a2c
1 parent
a1b9b1d8
Exists in
spb-stable
and in
3 other branches
Generate labels set from issues page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/controllers/projects/labels_controller.rb
| @@ -13,7 +13,7 @@ class Projects::LabelsController < Projects::ApplicationController | @@ -13,7 +13,7 @@ class Projects::LabelsController < Projects::ApplicationController | ||
| 13 | def generate | 13 | def generate |
| 14 | Gitlab::IssuesLabels.generate(@project) | 14 | Gitlab::IssuesLabels.generate(@project) |
| 15 | 15 | ||
| 16 | - redirect_to project_labels_path(@project) | 16 | + redirect_to project_issues_path(@project) |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | protected | 19 | protected |
app/views/shared/_project_filter.html.haml
| @@ -40,6 +40,12 @@ | @@ -40,6 +40,12 @@ | ||
| 40 | .pull-right | 40 | .pull-right |
| 41 | %i.icon-remove | 41 | %i.icon-remove |
| 42 | 42 | ||
| 43 | + - if issue_label_names.empty? | ||
| 44 | + .light-well | ||
| 45 | + Add first label to your issues | ||
| 46 | + %br | ||
| 47 | + or #{link_to 'generate', generate_project_labels_path(@project), method: :post} default set of labels | ||
| 48 | + | ||
| 43 | %fieldset | 49 | %fieldset |
| 44 | - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? | 50 | - if %w(state scope milestone_id assignee_id label_name).select { |k| params[k].present? }.any? |
| 45 | = link_to project_entities_path, class: 'cgray pull-right' do | 51 | = link_to project_entities_path, class: 'cgray pull-right' do |