diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
commit | 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch) | |
tree | 3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /app/views/projects/merge_requests | |
parent | 9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'app/views/projects/merge_requests')
6 files changed, 35 insertions, 60 deletions
diff --git a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml index 9bfa0e7a309..a3536ead240 100644 --- a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml +++ b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml @@ -1,53 +1,15 @@ -- display_issuable_type = issuable_display_type(@merge_request) - -.btn-group.gl-md-ml-3.gl-display-flex.dropdown.gl-dropdown.gl-md-w-auto.gl-w-full - %span.js-sidebar-header-popover - = button_tag type: 'button', id: "new-actions-header-dropdown", class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret gl-display-none! gl-md-display-inline-flex!", title: _('Merge request actions'), 'aria-label': _('Merge request actions'), data: { toggle: 'dropdown', testid: 'merge-request-actions' } do - = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon" - = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do - %span.gl-dropdown-button-text= _('Merge request actions') - = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon" - .dropdown-menu.dropdown-menu-right - .gl-dropdown-inner - .gl-dropdown-contents - %ul - - if current_user && moved_mr_sidebar_enabled? - %li.gl-dropdown-item.js-sidebar-subscriptions-widget-root - %li.gl-dropdown-divider - %hr.dropdown-divider - - if can?(current_user, :update_merge_request, @merge_request) - %li.gl-dropdown-item{ class: "gl-md-display-none!" } - = link_to edit_project_merge_request_path(@project, @merge_request), class: 'dropdown-item' do - .gl-dropdown-item-text-wrapper - = _('Edit') - - if @merge_request.open? - %li.gl-dropdown-item - = link_to toggle_draft_merge_request_path(@merge_request), method: :put, class: 'dropdown-item js-draft-toggle-button' do - .gl-dropdown-item-text-wrapper - = @merge_request.draft? ? _('Mark as ready') : _('Mark as draft') - %li.gl-dropdown-item.js-close-item - = link_to close_issuable_path(@merge_request), method: :put, class: 'dropdown-item' do - .gl-dropdown-item-text-wrapper - = _('Close') - = display_issuable_type - - elsif !@merge_request.source_project_missing? && @merge_request.closed? - %li.gl-dropdown-item - = link_to reopen_issuable_path(@merge_request), method: :put, class: 'dropdown-item' do - .gl-dropdown-item-text-wrapper - = _('Reopen') - = display_issuable_type - - if moved_mr_sidebar_enabled? - %li.gl-dropdown-item.js-sidebar-lock-root - %li.gl-dropdown-item - %button.dropdown-item.js-copy-reference{ type: "button", data: { 'clipboard-text': @merge_request.to_reference(full: true) } } - .gl-dropdown-item-text-wrapper - = _('Copy reference') - - - unless current_controller?('conflicts') - - unless issuable_author_is_current_user(@merge_request) - - if moved_mr_sidebar_enabled? - %li.gl-dropdown-divider - %hr.dropdown-divider - .js-report-abuse-dropdown-item{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: @merge_request.author.id, reported_from_url: merge_request_url(@merge_request) } } - -#js-report-abuse-drawer +.js-mr-more-dropdown{ data: { + merge_request: @merge_request.to_json, + project_path: @project.full_path, + edit_url: edit_project_merge_request_path(@project, @merge_request), + is_current_user: issuable_author_is_current_user(@merge_request), + is_logged_in: current_user, + can_update_merge_request: can?(current_user, :update_merge_request, @merge_request), + open: @merge_request.open?, + merged: @merge_request.merged?, + source_project_missing: @merge_request.source_project_missing?, + clipboard_text: @merge_request.to_reference(full: true), + report_abuse_path: add_category_abuse_reports_path, + reported_user_id: @merge_request.author.id, + reported_from_url: merge_request_url(@merge_request), +} } diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index 9142893d400..7b815d996e0 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -25,7 +25,6 @@ %span.issuable-authored.d-none.d-sm-inline-block.gl-text-gray-500! · #{s_('IssueList|created %{timeAgoString} by %{user}').html_safe % { timeAgoString: time_ago_with_tooltip(merge_request.created_at, placement: 'bottom'), user: link_to_member(@project, merge_request.author, avatar: false, extra_class: 'gl-text-gray-500!') }} - = render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author - if merge_request.milestone %span.issuable-milestone.d-none.d-sm-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 15339becb74..dfa582f4c60 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -26,7 +26,7 @@ .detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions.gl-display-flex - if can_update_merge_request - = render Pajamas::ButtonComponent.new(href: edit_project_merge_request_path(@project, @merge_request), button_options: {class: "gl-display-none gl-md-display-block js-issuable-edit", data: { qa_selector: "edit_button" }}) do + = render Pajamas::ButtonComponent.new(href: edit_project_merge_request_path(@project, @merge_request), button_options: {class: "gl-display-none gl-md-display-block js-issuable-edit", data: { qa_selector: "edit_title_button" }}) do = _('Edit') - if @merge_request.source_project diff --git a/app/views/projects/merge_requests/_page.html.haml b/app/views/projects/merge_requests/_page.html.haml index 3e56148f777..5ea67376a86 100644 --- a/app/views/projects/merge_requests/_page.html.haml +++ b/app/views/projects/merge_requests/_page.html.haml @@ -16,7 +16,7 @@ - add_page_specific_style 'page_bundles/ci_status' - add_page_startup_api_call @endpoint_metadata_url -- if mr_action == 'diffs' && (!@file_by_file_default || !single_file_file_by_file?) +- if mr_action == 'diffs' && !@file_by_file_default - add_page_startup_api_call @endpoint_diff_batch_url .merge-request{ data: { mr_action: mr_action, url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project), lock_version: @merge_request.lock_version, diffs_batch_cache_key: @diffs_batch_cache_key } } diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 0570d22529b..07bae4d2396 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -1,6 +1,16 @@ %h1.page-title.gl-font-size-h-display = _('New merge request') +- if @saml_groups.present? + = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| + - c.with_body do + = s_('GroupSAML|Some branches are inaccessible because your SAML session has expired. To access the branches, select the group’s path to reauthenticate.') + - c.with_actions do + .gl-display-flex.gl-flex-wrap + - @saml_groups.each do |group| + = render Pajamas::ButtonComponent.new(href: sso_group_saml_providers_path(group, { token: group.saml_discovery_token, redirect: project_new_merge_request_branch_from_path(@source_project) }), button_options: { class: "gl-mr-3 gl-mb-3" }) do + = group.path + = gitlab_ui_form_for [@project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| - if params[:nav_source].present? = hidden_field_tag(:nav_source, params[:nav_source]) diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index 35e8b30e6e9..bec7cb3fd34 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -15,8 +15,10 @@ .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller - .fade-left= sprite_icon('chevron-lg-left', size: 12) - .fade-right= sprite_icon('chevron-lg-right', size: 12) + %button.fade-left{ type: 'button', title: _('Scroll left'), 'aria-label': _('Scroll left') } + = sprite_icon('chevron-lg-left', size: 12) + %button.fade-right{ type: 'button', title: _('Scroll right'), 'aria-label': _('Scroll right') } + = sprite_icon('chevron-lg-right', size: 12) %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0.js-tabs-affix %li.commits-tab.new-tab = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tabvue'} do @@ -32,8 +34,10 @@ .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller - .fade-left= sprite_icon('chevron-lg-left', size: 12) - .fade-right= sprite_icon('chevron-lg-right', size: 12) + %button.fade-left{ type: 'button', title: _('Scroll left'), 'aria-label': _('Scroll left') } + = sprite_icon('chevron-lg-left', size: 12) + %button.fade-right{ type: 'button', title: _('Scroll right'), 'aria-label': _('Scroll right') } + = sprite_icon('chevron-lg-right', size: 12) %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0.js-tabs-affix %li.commits-tab.new-tab = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tabvue'} do |