debian-mirror-gitlab/app/views/projects/merge_requests/_code_dropdown.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
2.2 KiB
Text
Raw Normal View History

2023-03-04 22:38:38 +05:30
.gl-md-ml-3.dropdown.gl-dropdown{ class: "gl-display-none! gl-md-display-flex!" }
2022-07-16 23:28:13 +05:30
#js-check-out-modal{ data: how_merge_modal_data(@merge_request) }
= button_tag type: 'button', class: "btn dropdown-toggle btn-confirm gl-button gl-dropdown-toggle", data: { toggle: 'dropdown', qa_selector: 'mr_code_dropdown' } do
2023-03-04 22:38:38 +05:30
%span.gl-dropdown-button-text= _('Code')
2022-07-16 23:28:13 +05:30
= sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon gl-ml-2 gl-mr-0!"
.dropdown-menu.dropdown-menu-right
2023-03-04 22:38:38 +05:30
.gl-dropdown-inner
.gl-dropdown-contents
2022-07-16 23:28:13 +05:30
%ul
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-section-header
2022-07-16 23:28:13 +05:30
%header.dropdown-header
= _('Review changes')
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-item
2022-07-16 23:28:13 +05:30
%button.dropdown-item.js-check-out-modal-trigger{ type: 'button' }
2023-03-04 22:38:38 +05:30
.gl-dropdown-item-text-wrapper
2022-07-16 23:28:13 +05:30
= _('Check out branch')
- if current_user
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-item
2023-01-13 00:05:48 +05:30
= link_to ide_merge_request_path(@merge_request), class: 'dropdown-item', target: '_blank', data: { qa_selector: 'open_in_web_ide_button' } do
2023-03-04 22:38:38 +05:30
.gl-dropdown-item-text-wrapper
2022-07-16 23:28:13 +05:30
= _('Open in Web IDE')
- if Gitlab::CurrentSettings.gitpod_enabled && current_user&.gitpod_enabled
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-item
2023-01-13 00:05:48 +05:30
= link_to "#{Gitlab::CurrentSettings.gitpod_url}##{merge_request_url(@merge_request)}", target: '_blank', class: 'dropdown-item' do
2023-03-04 22:38:38 +05:30
.gl-dropdown-item-text-wrapper
2022-07-16 23:28:13 +05:30
= _('Open in Gitpod')
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-divider
2022-07-16 23:28:13 +05:30
%hr.dropdown-divider
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-section-header
2022-07-16 23:28:13 +05:30
%header.dropdown-header
= _('Download')
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-item
2022-07-16 23:28:13 +05:30
= link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { qa_selector: 'download_email_patches_menu_item' } do
2023-03-04 22:38:38 +05:30
.gl-dropdown-item-text-wrapper
2022-07-16 23:28:13 +05:30
= _('Email patches')
2023-03-04 22:38:38 +05:30
%li.gl-dropdown-item
2022-07-23 23:45:48 +05:30
= link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { qa_selector: 'download_plain_diff_menu_item' } do
2023-03-04 22:38:38 +05:30
.gl-dropdown-item-text-wrapper
2022-07-16 23:28:13 +05:30
= _('Plain diff')