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
98eaa4b4
Commit
98eaa4b4
authored
Nov 10, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed tooltip from clone dropdown
parent
af687aa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
29 deletions
+27
-29
app/assets/javascripts/project.js
app/assets/javascripts/project.js
+2
-1
app/helpers/button_helper.rb
app/helpers/button_helper.rb
+20
-28
changelogs/unreleased/39455-clone-dropdown-should-not-have-a-tooltip.yml
...leased/39455-clone-dropdown-should-not-have-a-tooltip.yml
+5
-0
No files found.
app/assets/javascripts/project.js
View file @
98eaa4b4
...
...
@@ -17,13 +17,14 @@ export default class Project {
$
(
'
a
'
,
$cloneOptions
).
on
(
'
click
'
,
(
e
)
=>
{
const
$this
=
$
(
e
.
currentTarget
);
const
url
=
$this
.
attr
(
'
href
'
);
const
activeText
=
$this
.
find
(
'
.dropdown-menu-inner-title
'
).
text
();
e
.
preventDefault
();
$
(
'
.is-active
'
,
$cloneOptions
).
not
(
$this
).
removeClass
(
'
is-active
'
);
$this
.
toggleClass
(
'
is-active
'
);
$projectCloneField
.
val
(
url
);
$cloneBtnText
.
text
(
$this
.
text
()
);
$cloneBtnText
.
text
(
activeText
);
$
(
'
#modal-geo-info
'
).
data
({
cloneUrlSecondary
:
$this
.
attr
(
'
href
'
),
...
...
app/helpers/button_helper.rb
View file @
98eaa4b4
...
...
@@ -57,44 +57,36 @@ module ButtonHelper
end
def
http_clone_button
(
project
,
placement
=
'right'
,
append_link:
true
)
klass
=
'http-selector'
klass
<<
' has-tooltip'
if
current_user
.
try
(
:require_extra_setup_for_git_auth?
)
protocol
=
gitlab_config
.
protocol
.
upcase
tooltip_title
=
if
current_user
.
try
(
:require_password_creation
_for_git
?
)
protocol_description
=
if
current_user
.
try
(
:require_password_creation?
)
_
(
"Set a password on your account to pull or push via %{protocol}."
)
%
{
protocol:
protocol
}
else
_
(
"Create a personal access token on your account to pull or push via %{protocol}."
)
%
{
protocol:
protocol
}
end
content_tag
(
append_link
?
:a
:
:span
),
protocol
,
class:
klass
,
href:
(
project
.
http_url_to_repo
if
append_link
),
data:
{
html:
true
,
placement:
placement
,
container:
'body'
,
title:
tooltip_title
,
primary_url:
(
geo_primary_http_url_to_repo
(
project
)
if
Gitlab
::
Geo
.
secondary?
)
}
protocol_element_output
=
content_tag
(
:strong
,
protocol
,
class:
'dropdown-menu-inner-title'
)
if
current_user
.
try
(
:require_password_creation?
)
||
current_user
.
try
(
:require_personal_access_token_creation_for_git_auth?
)
protocol_element_output
<<
content_tag
(
:span
,
protocol_description
,
class:
'dropdown-menu-inner-content'
)
end
content_tag
(
append_link
?
:a
:
:span
)
,
protocol_element_output
,
class:
'http-selector'
,
href:
(
project
.
http_url_to_repo
if
append_link
)
end
def
ssh_clone_button
(
project
,
placement
=
'right'
,
append_link:
true
)
klass
=
'ssh-selector'
klass
<<
' has-tooltip'
if
current_user
.
try
(
:require_ssh_key?
)
def
ssh_clone_button
(
project
,
append_link:
true
)
ssh_description
=
_
(
'Add an SSH key to your profile to pull or push via SSH.'
)
ssh_element_output
=
content_tag
(
:strong
,
'SSH'
,
class:
'dropdown-menu-inner-title'
)
ssh_element_output
<<
content_tag
(
:span
,
ssh_description
,
class:
'dropdown-menu-inner-content'
)
if
current_user
.
try
(
:require_ssh_key?
)
content_tag
(
append_link
?
:a
:
:span
),
'SSH'
,
class:
klass
,
href:
(
project
.
ssh_url_to_repo
if
append_link
),
data:
{
html:
true
,
placement:
placement
,
container:
'body'
,
title:
_
(
'Add an SSH key to your profile to pull or push via SSH.'
),
primary_url:
(
geo_primary_ssh_url_to_repo
(
project
)
if
Gitlab
::
Geo
.
secondary?
)
}
content_tag
(
append_link
?
:a
:
:span
),
ssh_element_output
,
class:
'ssh-selector'
,
href:
(
project
.
ssh_url_to_repo
if
append_link
)
end
def
kerberos_clone_button
(
project
)
...
...
changelogs/unreleased/39455-clone-dropdown-should-not-have-a-tooltip.yml
0 → 100644
View file @
98eaa4b4
---
title
:
Removed tooltip from clone dropdown
merge_request
:
15334
author
:
type
:
other
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