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
Boxiang Sun
gitlab-ce
Commits
0ef1a582
Commit
0ef1a582
authored
Jan 26, 2018
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add modal for label deletion
parent
af6aaf39
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
3 deletions
+30
-3
app/assets/stylesheets/framework/modal.scss
app/assets/stylesheets/framework/modal.scss
+4
-0
app/views/shared/_delete_label_modal.html.haml
app/views/shared/_delete_label_modal.html.haml
+20
-0
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+6
-3
No files found.
app/assets/stylesheets/framework/modal.scss
View file @
0ef1a582
...
...
@@ -4,6 +4,10 @@
.page-title
{
margin-top
:
0
;
.label
{
font-size
:
initial
;
}
}
}
...
...
app/views/shared/_delete_label_modal.html.haml
0 → 100644
View file @
0ef1a582
.modal
{
id:
"modal-delete-label-#{label.id}"
,
tabindex:
-
1
}
.modal-dialog
.modal-content
.modal-header
%button
.close
{
data:
{
dismiss:
'modal'
}
}
×
%h3
.page-title
Delete
#{
render_colored_label
(
label
,
tooltip:
false
)
}
?
.modal-body
%p
%strong
#{
label
.
name
}
will be permanently deleted from
#{
label
.
group
.
name
}
. This cannot be undone.
.modal-footer
%a
{
href:
'#'
,
data:
{
dismiss:
'modal'
},
class:
'btn btn-default'
}
Cancel
=
link_to
'Delete label'
,
destroy_label_path
(
label
),
title:
'Delete'
,
method: :delete
,
class:
'btn btn-remove'
app/views/shared/_label.html.haml
View file @
0ef1a582
...
...
@@ -55,7 +55,8 @@
=
link_to
edit_label_path
(
label
),
title:
"Edit"
,
class:
'btn btn-transparent btn-action'
,
data:
{
toggle:
"tooltip"
}
do
%span
.sr-only
Edit
=
sprite_icon
(
'pencil'
)
=
link_to
destroy_label_path
(
label
),
title:
"Delete"
,
class:
'btn btn-transparent btn-action remove-row'
,
method: :delete
,
data:
{
confirm:
label_deletion_confirm_text
(
label
),
toggle:
"tooltip"
}
do
%span
{
data:
{
toggle:
'modal'
,
target:
"#modal-delete-label-#{label.id}"
}
}
=
link_to
"#"
,
title:
"Delete"
,
class:
'btn btn-transparent btn-action remove-row'
,
data:
{
toggle:
"tooltip"
}
do
%span
.sr-only
Delete
=
sprite_icon
(
'remove'
)
-
if
current_user
...
...
@@ -79,3 +80,5 @@
%button
.js-subscribe-button.label-subscribe-button.btn.btn-default
{
type:
'button'
,
data:
{
status:
status
,
url:
toggle_subscription_path
}
}
%span
=
label_subscription_toggle_button_text
(
label
,
@project
)
=
icon
(
'spinner spin'
,
class:
'label-subscribe-button-loading'
)
=
render
'shared/delete_label_modal'
,
label:
label
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