Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-08-18 13:50:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-18 13:50:51 +0300
commitdb384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch)
tree34beaef37df5f47ccbcf5729d7583aae093cffa0 /app/controllers/projects/labels_controller.rb
parent54fd7b1bad233e3944434da91d257fa7f63c3996 (diff)
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'app/controllers/projects/labels_controller.rb')
-rw-r--r--app/controllers/projects/labels_controller.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb
index 649bead0b6d..67cff16a76b 100644
--- a/app/controllers/projects/labels_controller.rb
+++ b/app/controllers/projects/labels_controller.rb
@@ -79,10 +79,13 @@ class Projects::LabelsController < Projects::ApplicationController
end
def destroy
- @label.destroy
- @labels = find_labels
-
- redirect_to project_labels_path(@project), status: :found, notice: 'Label was removed'
+ if @label.destroy
+ redirect_to project_labels_path(@project), status: :found,
+ notice: format(_('%{label_name} was removed'), label_name: @label.name)
+ else
+ redirect_to project_labels_path(@project), status: :found,
+ alert: @label.errors.full_messages.to_sentence
+ end
end
def remove_priority