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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8073f361
Commit
8073f361
authored
Jan 25, 2021
by
Mehul Sharma
Committed by
Stan Hu
Jan 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New partial for SSH Key Deletion
parent
e7e638b5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
5 deletions
+34
-5
app/views/profiles/keys/_key.html.haml
app/views/profiles/keys/_key.html.haml
+1
-3
app/views/profiles/keys/_key_details.html.haml
app/views/profiles/keys/_key_details.html.haml
+1
-1
app/views/shared/ssh_keys/_key_delete.html.haml
app/views/shared/ssh_keys/_key_delete.html.haml
+6
-0
changelogs/unreleased/267522-sshkey-delete-parital.yml
changelogs/unreleased/267522-sshkey-delete-parital.yml
+5
-0
ee/app/views/shared/credentials_inventory/ssh_keys/_ssh_key.html.haml
.../shared/credentials_inventory/ssh_keys/_ssh_key.html.haml
+1
-1
spec/views/shared/ssh_keys/_key_details.html.haml_spec.rb
spec/views/shared/ssh_keys/_key_details.html.haml_spec.rb
+20
-0
No files found.
app/views/profiles/keys/_key.html.haml
View file @
8073f361
...
...
@@ -27,6 +27,4 @@
=
s_
(
'Profiles|Created%{time_ago}'
.
html_safe
)
%
{
time_ago:
time_ago_with_tooltip
(
key
.
created_at
,
html_class:
'gl-ml-2'
)}
-
if
key
.
can_delete?
.gl-ml-3
=
button_to
'#'
,
class:
"btn btn-default gl-button btn-default-tertiary js-confirm-modal-button"
,
data:
ssh_key_delete_modal_data
(
key
,
path_to_key
(
key
,
is_admin
))
do
%span
.sr-only
=
_
(
'Delete'
)
=
sprite_icon
(
'remove'
)
=
render
'shared/ssh_keys/key_delete'
,
html_class:
"btn btn-default gl-button btn-default-tertiary js-confirm-modal-button"
,
button_data:
ssh_key_delete_modal_data
(
key
,
path_to_key
(
key
,
is_admin
))
app/views/profiles/keys/_key_details.html.haml
View file @
8073f361
...
...
@@ -38,4 +38,4 @@
.col-md-12
.float-right
-
if
@key
.
can_delete?
=
button_to
_
(
'Delete'
),
'#'
,
class:
"btn btn-danger gl-button delete-key js-confirm-modal-button"
,
data:
ssh_key_delete_modal_data
(
@key
,
path_to_key
(
@key
,
is_admin
))
=
render
'shared/ssh_keys/key_delete'
,
text:
_
(
'Delete'
),
html_class:
"btn btn-danger gl-button delete-key js-confirm-modal-button"
,
button_
data:
ssh_key_delete_modal_data
(
@key
,
path_to_key
(
@key
,
is_admin
))
app/views/shared/ssh_keys/_key_delete.html.haml
0 → 100644
View file @
8073f361
-
if
defined?
(
text
)
=
button_to
text
,
'#'
,
class:
html_class
,
data:
button_data
-
else
=
button_to
'#'
,
class:
html_class
,
data:
button_data
do
%span
.sr-only
=
_
(
'Delete'
)
=
sprite_icon
(
'remove'
)
changelogs/unreleased/267522-sshkey-delete-parital.yml
0 → 100644
View file @
8073f361
---
title
:
New Shared Partial for SSH Key Deletion
merge_request
:
50825
author
:
Mehul Sharma
type
:
other
ee/app/views/shared/credentials_inventory/ssh_keys/_ssh_key.html.haml
View file @
8073f361
...
...
@@ -22,4 +22,4 @@
.table-section.section-5
.table-mobile-header
{
role:
'rowheader'
}
.table-mobile-content
=
button_to
_
(
'Delete'
),
'#'
,
class:
"btn btn-danger btn-danger-secondary btn-md btn-secondary gl-button js-confirm-modal-button"
,
data:
ssh_key_delete_modal_data
(
ssh_key
,
ssh_key_delete_path
(
ssh_key
))
=
render
'shared/ssh_keys/key_delete'
,
text:
_
(
'Delete'
),
html_class:
"btn btn-danger btn-danger-secondary btn-md btn-secondary gl-button js-confirm-modal-button"
,
button_
data:
ssh_key_delete_modal_data
(
ssh_key
,
ssh_key_delete_path
(
ssh_key
))
spec/views/shared/ssh_keys/_key_details.html.haml_spec.rb
0 → 100644
View file @
8073f361
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'shared/ssh_keys/_key_delete.html.haml'
do
context
'when the text parameter is used'
do
it
'has text'
do
render
'shared/ssh_keys/key_delete.html.haml'
,
text:
'Button'
,
html_class:
''
,
button_data:
''
expect
(
rendered
).
to
have_button
(
'Button'
)
end
end
context
'when the text parameter is not used'
do
it
'does not have text'
do
render
'shared/ssh_keys/key_delete.html.haml'
,
html_class:
''
,
button_data:
''
expect
(
rendered
).
to
have_button
(
'Delete'
)
end
end
end
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