Commit 2e130476 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'gt-move-clone-button-to-the-tree-controls-area' into 'master'

Move the clone button to the tree controls area

See merge request gitlab-org/gitlab!17752
parents 658809ca a9d539a1
...@@ -21,10 +21,6 @@ ...@@ -21,10 +21,6 @@
margin-left: 8px; margin-left: 8px;
} }
.btn-group {
margin-left: 10px;
}
.control { .control {
float: left; float: left;
margin-left: 10px; margin-left: 10px;
......
...@@ -208,7 +208,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -208,7 +208,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
AnchorData.new(false, AnchorData.new(false,
statistic_icon + _('New file'), statistic_icon + _('New file'),
project_new_blob_path(project, default_branch || 'master'), project_new_blob_path(project, default_branch || 'master'),
'success') 'missing')
end end
end end
......
...@@ -49,13 +49,6 @@ ...@@ -49,13 +49,6 @@
= render 'projects/buttons/star' = render 'projects/buttons/star'
= render 'projects/buttons/fork' = 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) - if can?(current_user, :download_code, @project)
%nav.project-stats %nav.project-stats
.nav-links.quick-links .nav-links.quick-links
......
- project = project || @project - project = project || @project
- dropdown_class = local_assigns.fetch(:dropdown_class, '')
.git-clone-holder.js-git-clone-holder.input-group .git-clone-holder.js-git-clone-holder
%a#clone-dropdown.input-group-text.btn.btn-primary.btn-xs.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } %a#clone-dropdown.btn.btn-primary.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } }
%span.append-right-4.js-clone-dropdown-label %span.append-right-4.js-clone-dropdown-label
= _('Clone') = _('Clone')
= sprite_icon("arrow-down", css_class: "icon") = 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? - if ssh_enabled?
%li %li
%label.label-bold %label.label-bold
......
...@@ -11,9 +11,14 @@ ...@@ -11,9 +11,14 @@
- if @project.can_current_user_push_code? - if @project.can_current_user_push_code?
%p.append-bottom-0 %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-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 = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
......
...@@ -101,3 +101,9 @@ ...@@ -101,3 +101,9 @@
= render "projects/buttons/xcode_link" = render "projects/buttons/xcode_link"
= render 'projects/buttons/download', project: @project, ref: @ref = 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'
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.btn-group.mobile-git-clone.js-mobile-git-clone.btn-block .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") = 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") = 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 } } %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } }
- if ssh_enabled? - if ssh_enabled?
......
---
title: Move the clone button to the tree controls area
merge_request: 17752
author: Ablay Keldibek
type: changed
...@@ -21550,9 +21550,6 @@ msgstr "" ...@@ -21550,9 +21550,6 @@ msgstr ""
msgid "You can create a new one or check them in your Personal Access Tokens settings %{pat_link}" msgid "You can create a new one or check them in your Personal Access Tokens settings %{pat_link}"
msgstr "" 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" msgid "You can create new ones at your %{pat_link_start}Personal Access Tokens%{pat_link_end} settings"
msgstr "" msgstr ""
...@@ -21568,6 +21565,9 @@ msgstr "" ...@@ -21568,6 +21565,9 @@ msgstr ""
msgid "You can filter by 'days to merge' by clicking on the columns in the chart." msgid "You can filter by 'days to merge' by clicking on the columns in the chart."
msgstr "" 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." msgid "You can invite a new member to <strong>%{project_name}</strong> or invite another group."
msgstr "" msgstr ""
......
...@@ -297,7 +297,7 @@ describe ProjectPresenter do ...@@ -297,7 +297,7 @@ describe ProjectPresenter do
is_link: false, is_link: false,
label: a_string_including("New file"), label: a_string_including("New file"),
link: presenter.project_new_blob_path(project, 'master'), link: presenter.project_new_blob_path(project, 'master'),
class_modifier: 'success' class_modifier: 'missing'
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment