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
67ef62a6
Commit
67ef62a6
authored
Nov 13, 2017
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UX adjustments and spec corrections
parent
614b8679
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
9 deletions
+15
-9
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+4
-0
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+2
-2
app/helpers/button_helper.rb
app/helpers/button_helper.rb
+2
-2
spec/helpers/button_helper_spec.rb
spec/helpers/button_helper_spec.rb
+7
-5
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
67ef62a6
...
...
@@ -414,6 +414,10 @@
.clone-dropdown-btn
{
background-color
:
$white-light
;
}
.clone-options-dropdown
{
min-width
:
240px
;
}
}
.project-repo-buttons
{
...
...
app/helpers/application_settings_helper.rb
View file @
67ef62a6
...
...
@@ -31,9 +31,9 @@ module ApplicationSettingsHelper
def
enabled_project_button
(
project
,
protocol
)
case
protocol
when
'ssh'
ssh_clone_button
(
project
,
'bottom'
,
append_link:
false
)
ssh_clone_button
(
project
,
append_link:
false
)
else
http_clone_button
(
project
,
'bottom'
,
append_link:
false
)
http_clone_button
(
project
,
append_link:
false
)
end
end
...
...
app/helpers/button_helper.rb
View file @
67ef62a6
...
...
@@ -56,7 +56,7 @@ module ButtonHelper
end
end
def
http_clone_button
(
project
,
placement
=
'right'
,
append_link:
true
)
def
http_clone_button
(
project
,
append_link:
true
)
protocol
=
gitlab_config
.
protocol
.
upcase
protocol_description
=
...
...
@@ -79,7 +79,7 @@ module ButtonHelper
end
def
ssh_clone_button
(
project
,
append_link:
true
)
ssh_description
=
_
(
'Add an SSH key to your profile to pull or push via SSH.'
)
ssh_description
=
_
(
"You won't be able to pull or push project code via SSH until you add an SSH key to your profile"
)
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?
)
...
...
spec/helpers/button_helper_spec.rb
View file @
67ef62a6
...
...
@@ -26,9 +26,10 @@ describe ButtonHelper do
context
'when user has password automatically set'
do
let
(
:user
)
{
create
(
:user
,
password_automatically_set:
true
)
}
it
'shows a password tooltip'
do
expect
(
element
.
attr
(
'class'
)).
to
include
(
has_tooltip_class
)
expect
(
element
.
attr
(
'data-title'
)).
to
eq
(
'Set a password on your account to pull or push via HTTP.'
)
it
'shows the password text on the dropdown'
do
expect
(
element
.
children
.
length
).
to
eq
(
2
)
expect
(
element
.
children
[
1
].
name
).
to
eq
(
'span'
)
expect
(
element
.
children
[
1
].
children
[
0
].
text
).
to
eq
(
'Set a password on your account to pull or push via HTTP.'
)
end
end
end
...
...
@@ -40,8 +41,9 @@ describe ButtonHelper do
context
'when user has no personal access tokens'
do
it
'has a personal access token tooltip '
do
expect
(
element
.
attr
(
'class'
)).
to
include
(
has_tooltip_class
)
expect
(
element
.
attr
(
'data-title'
)).
to
eq
(
'Create a personal access token on your account to pull or push via HTTP.'
)
expect
(
element
.
children
.
length
).
to
eq
(
2
)
expect
(
element
.
children
[
1
].
name
).
to
eq
(
'span'
)
expect
(
element
.
children
[
1
].
children
[
0
].
text
).
to
eq
(
'Create a personal access token on your account to pull or push via HTTP.'
)
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