Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
4c924107
Commit
4c924107
authored
Oct 18, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warn user deleting a group label affect all projects within the group
parent
007267ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/helpers/labels_helper.rb
app/helpers/labels_helper.rb
+7
-0
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+1
-1
No files found.
app/helpers/labels_helper.rb
View file @
4c924107
...
...
@@ -155,6 +155,13 @@ module LabelsHelper
label
.
subscribed?
(
current_user
)
?
'Unsubscribe'
:
'Subscribe'
end
def
label_deletion_confirm_text
(
label
)
case
label
when
GroupLabel
then
'Remove this label? This will affect all projects within the group. Are you sure?'
when
ProjectLabel
then
'Remove this label? Are you sure?'
end
end
# Required for Banzai::Filter::LabelReferenceFilter
module_function
:render_colored_label
,
:render_colored_cross_project_label
,
:text_color_for_bg
,
:escape_once
...
...
app/views/shared/_label.html.haml
View file @
4c924107
...
...
@@ -44,7 +44,7 @@
=
link_to
edit_label_path
(
label
),
title:
"Edit"
,
class:
'btn btn-transparent btn-action'
,
data:
{
toggle:
"tooltip"
}
do
%span
.sr-only
Edit
=
icon
(
'pencil-square-o'
)
=
link_to
destroy_label_path
(
label
),
title:
"Delete"
,
class:
'btn btn-transparent btn-action remove-row'
,
method: :delete
,
remote:
true
,
data:
{
confirm:
"Remove this label? Are you sure?"
,
toggle:
"tooltip"
}
do
=
link_to
destroy_label_path
(
label
),
title:
"Delete"
,
class:
'btn btn-transparent btn-action remove-row'
,
method: :delete
,
remote:
true
,
data:
{
confirm:
label_deletion_confirm_text
(
label
)
,
toggle:
"tooltip"
}
do
%span
.sr-only
Delete
=
icon
(
'trash-o'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment