BigW Consortium Gitlab

Commit fdd8e450 by Dmitriy Zaporozhets

Merge branch 'remove-remove-label' into 'master'

Remove labels via ajax See merge request !1019
parents 1d63464c 540596b7
...@@ -50,7 +50,10 @@ class Projects::LabelsController < Projects::ApplicationController ...@@ -50,7 +50,10 @@ class Projects::LabelsController < Projects::ApplicationController
def destroy def destroy
@label.destroy @label.destroy
redirect_to project_labels_path(@project), notice: 'Label was removed' respond_to do |format|
format.html { redirect_to project_labels_path(@project), notice: 'Label was removed' }
format.js { render nothing: true }
end
end end
protected protected
......
...@@ -7,4 +7,4 @@ ...@@ -7,4 +7,4 @@
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to 'Edit', edit_project_label_path(@project, label), class: 'btn' = link_to 'Edit', edit_project_label_path(@project, label), class: 'btn'
= link_to 'Remove', project_label_path(@project, label), class: 'btn btn-remove', method: :delete, data: {confirm: "Remove this label? Are you sure?"} = link_to 'Remove', project_label_path(@project, label), class: 'btn btn-remove remove-row', method: :delete, remote: true, data: {confirm: "Remove this label? Are you sure?"}
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