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
a9d539a1
Commit
a9d539a1
authored
Jan 29, 2020
by
George Tsiolis
Committed by
Paul Slaughter
Jan 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the clone button to the tree controls area
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17752
parent
658809ca
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
27 additions
and
21 deletions
+27
-21
app/assets/stylesheets/pages/tree.scss
app/assets/stylesheets/pages/tree.scss
+0
-4
app/presenters/project_presenter.rb
app/presenters/project_presenter.rb
+1
-1
app/views/projects/_home_panel.html.haml
app/views/projects/_home_panel.html.haml
+0
-7
app/views/projects/buttons/_clone.html.haml
app/views/projects/buttons/_clone.html.haml
+4
-3
app/views/projects/empty.html.haml
app/views/projects/empty.html.haml
+6
-1
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+6
-0
app/views/shared/_mobile_clone_panel.html.haml
app/views/shared/_mobile_clone_panel.html.haml
+1
-1
changelogs/unreleased/gt-move-clone-button-to-the-tree-controls-area.yml
...leased/gt-move-clone-button-to-the-tree-controls-area.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/presenters/project_presenter_spec.rb
spec/presenters/project_presenter_spec.rb
+1
-1
No files found.
app/assets/stylesheets/pages/tree.scss
View file @
a9d539a1
...
...
@@ -21,10 +21,6 @@
margin-left
:
8px
;
}
.btn-group
{
margin-left
:
10px
;
}
.control
{
float
:
left
;
margin-left
:
10px
;
...
...
app/presenters/project_presenter.rb
View file @
a9d539a1
...
...
@@ -208,7 +208,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
AnchorData
.
new
(
false
,
statistic_icon
+
_
(
'New file'
),
project_new_blob_path
(
project
,
default_branch
||
'master'
),
'
success
'
)
'
missing
'
)
end
end
...
...
app/views/projects/_home_panel.html.haml
View file @
a9d539a1
...
...
@@ -49,13 +49,6 @@
=
render
'projects/buttons/star'
=
render
'projects/buttons/fork'
-
if
can?
(
current_user
,
:download_code
,
@project
)
.project-clone-holder.d-inline-flex.d-md-none.btn-block
=
render
"shared/mobile_clone_panel"
.project-clone-holder.d-none.d-md-inline-flex
=
render
"projects/buttons/clone"
-
if
can?
(
current_user
,
:download_code
,
@project
)
%nav
.project-stats
.nav-links.quick-links
...
...
app/views/projects/buttons/_clone.html.haml
View file @
a9d539a1
-
project
=
project
||
@project
-
dropdown_class
=
local_assigns
.
fetch
(
:dropdown_class
,
''
)
.git-clone-holder.js-git-clone-holder
.input-group
%a
#clone-dropdown
.
input-group-text.btn.btn-primary.btn-xs
.clone-dropdown-btn.qa-clone-dropdown
{
href:
'#'
,
data:
{
toggle:
'dropdown'
}
}
.git-clone-holder.js-git-clone-holder
%a
#clone-dropdown
.
btn.btn-primary
.clone-dropdown-btn.qa-clone-dropdown
{
href:
'#'
,
data:
{
toggle:
'dropdown'
}
}
%span
.append-right-4.js-clone-dropdown-label
=
_
(
'Clone'
)
=
sprite_icon
(
"arrow-down"
,
css_class:
"icon"
)
%ul
.p-3.dropdown-menu.dropdown-menu-
right.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options
%ul
.p-3.dropdown-menu.dropdown-menu-
large.dropdown-menu-selectable.clone-options-dropdown.qa-clone-options
{
class:
dropdown_class
}
-
if
ssh_enabled?
%li
%label
.label-bold
...
...
app/views/projects/empty.html.haml
View file @
a9d539a1
...
...
@@ -11,9 +11,14 @@
-
if
@project
.
can_current_user_push_code?
%p
.append-bottom-0
=
_
(
'You can
create files directly in GitLab using
one of the following options.'
)
=
_
(
'You can
get started by cloning the repository or start adding files to it with
one of the following options.'
)
.project-buttons.qa-quick-actions
.project-clone-holder.d-block.d-md-none.mt-2.mr-2
=
render
"shared/mobile_clone_panel"
.project-clone-holder.d-none.d-md-inline-block.mt-2.mr-2.float-left
=
render
"projects/buttons/clone"
=
render
'stat_anchor_list'
,
anchors:
@project
.
empty_repo_statistics_buttons
-
if
can?
(
current_user
,
:push_code
,
@project
)
...
...
app/views/projects/tree/_tree_header.html.haml
View file @
a9d539a1
...
...
@@ -101,3 +101,9 @@
=
render
"projects/buttons/xcode_link"
=
render
'projects/buttons/download'
,
project:
@project
,
ref:
@ref
.project-clone-holder.d-block.d-md-none.mt-sm-2.mt-md-0
>
=
render
"shared/mobile_clone_panel"
.project-clone-holder.d-none.d-md-inline-block
>
=
render
"projects/buttons/clone"
,
dropdown_class:
'dropdown-menu-right'
app/views/shared/_mobile_clone_panel.html.haml
View file @
a9d539a1
...
...
@@ -4,7 +4,7 @@
.btn-group.mobile-git-clone.js-mobile-git-clone.btn-block
=
clipboard_button
(
button_text:
default_clone_label
,
text:
default_url_to_repo
(
project
),
hide_button_icon:
true
,
class:
"btn-primary flex-fill bold justify-content-center input-group-text clone-dropdown-btn js-clone-dropdown-label"
)
%button
.btn.btn-primary.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
%button
.btn.btn-primary.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center
.w-auto.ml-0
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
=
sprite_icon
(
"arrow-down"
,
css_class:
"dropdown-btn-icon icon"
)
%ul
.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown
{
data:
{
dropdown:
true
}
}
-
if
ssh_enabled?
...
...
changelogs/unreleased/gt-move-clone-button-to-the-tree-controls-area.yml
0 → 100644
View file @
a9d539a1
---
title
:
Move the clone button to the tree controls area
merge_request
:
17752
author
:
Ablay Keldibek
type
:
changed
locale/gitlab.pot
View file @
a9d539a1
...
...
@@ -21550,9 +21550,6 @@ msgstr ""
msgid "You can create a new one or check them in your Personal Access Tokens settings %{pat_link}"
msgstr ""
msgid "You can create files directly in GitLab using one of the following options."
msgstr ""
msgid "You can create new ones at your %{pat_link_start}Personal Access Tokens%{pat_link_end} settings"
msgstr ""
...
...
@@ -21568,6 +21565,9 @@ msgstr ""
msgid "You can filter by 'days to merge' by clicking on the columns in the chart."
msgstr ""
msgid "You can get started by cloning the repository or start adding files to it with one of the following options."
msgstr ""
msgid "You can invite a new member to <strong>%{project_name}</strong> or invite another group."
msgstr ""
...
...
spec/presenters/project_presenter_spec.rb
View file @
a9d539a1
...
...
@@ -297,7 +297,7 @@ describe ProjectPresenter do
is_link:
false
,
label:
a_string_including
(
"New file"
),
link:
presenter
.
project_new_blob_path
(
project
,
'master'
),
class_modifier:
'
success
'
class_modifier:
'
missing
'
)
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