diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/views/projects/merge_requests/show.html.haml | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/views/projects/merge_requests/show.html.haml')
-rw-r--r-- | app/views/projects/merge_requests/show.html.haml | 114 |
1 files changed, 1 insertions, 113 deletions
diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 203724fc1f1..1ef212ee5ce 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -1,113 +1 @@ -- @gfm_form = true -- unless moved_mr_sidebar_enabled? - - @content_class = "merge-request-container#{' limit-container-width' unless fluid_layout}" -- add_to_breadcrumbs _("Merge requests"), project_merge_requests_path(@project) -- breadcrumb_title @merge_request.to_reference -- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", _("Merge requests") -- page_description @merge_request.description_html -- page_card_attributes @merge_request.card_attributes -- suggest_changes_help_path = help_page_path('user/project/merge_requests/reviews/suggestions.md') -- mr_action = j(params[:tab].presence || 'show') -- add_page_specific_style 'page_bundles/design_management' -- add_page_specific_style 'page_bundles/merge_requests' -- add_page_specific_style 'page_bundles/pipelines' -- add_page_specific_style 'page_bundles/reports' -- add_page_specific_style 'page_bundles/ci_status' - -- add_page_startup_api_call @endpoint_metadata_url -- if mr_action == 'diffs' - - 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 } } - - if moved_mr_sidebar_enabled? - #js-merge-sticky-header{ data: { data: sticky_header_data.to_json } } - = render "projects/merge_requests/mr_title" - - .merge-request-details.issuable-details{ data: { id: @merge_request.project.id } } - = render "projects/merge_requests/mr_box" - .merge-request-tabs-holder{ class: "#{'js-tabs-affix' unless ENV['RAILS_ENV'] == 'test'} #{'gl-static' if moved_mr_sidebar_enabled?}" } - .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between{ class: "#{'is-merge-request' if Feature.enabled?(:moved_mr_sidebar, @project) && !fluid_layout}" } - %ul.merge-request-tabs.nav-tabs.nav.nav-links.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0{ class: "#{'gl-w-full gl-lg-w-auto!' if Feature.enabled?(:moved_mr_sidebar, @project)}" } - = render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do - = tab_link_for @merge_request, :show, force_link: @commit.present? do - = _("Overview") - = gl_badge_tag @merge_request.related_notes.user.count, { size: :sm } - - if @merge_request.source_project - = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", qa_selector: "commits_tab" do - = tab_link_for @merge_request, :commits do - = _("Commits") - = gl_badge_tag @commits_count, { size: :sm } - - if @project.builds_enabled? - = render "projects/merge_requests/tabs/tab", name: "pipelines", class: "pipelines-tab" do - = tab_link_for @merge_request, :pipelines do - = _("Pipelines") - = gl_badge_tag @number_of_pipelines, { size: :sm }, { class: 'js-pipelines-mr-count' } - = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do - = tab_link_for @merge_request, :diffs do - = _("Changes") - = gl_badge_tag @diffs_count, { size: :sm } - .d-flex.flex-wrap.align-items-center.justify-content-lg-end - #js-vue-discussion-counter{ data: { blocks_merge: @project.only_allow_merge_if_all_discussions_are_resolved?.to_s } } - - if moved_mr_sidebar_enabled? - - if !!@issuable_sidebar.dig(:current_user, :id) - .js-sidebar-todo-widget-root{ data: { project_path: @issuable_sidebar[:project_full_path], iid: @issuable_sidebar[:iid], id: @issuable_sidebar[:id] } } - .gl-ml-auto.gl-align-items-center.gl-display-none.gl-md-display-flex.gl-ml-3.js-expand-sidebar{ class: "gl-lg-display-none!" } - = render Pajamas::ButtonComponent.new(icon: 'chevron-double-lg-left', - button_options: { class: 'js-sidebar-toggle' }) do - = _('Expand') - .tab-content#diff-notes-app - #js-diff-file-finder - #js-code-navigation - = render "projects/merge_requests/tabs/pane", id: "notes", class: "notes voting_notes" do - %div{ class: "#{'merge-request-overview' if moved_mr_sidebar_enabled?}" } - %section - .issuable-discussion.js-vue-notes-event - - if @merge_request.description.present? - .detail-page-description.gl-pb-0 - = render "projects/merge_requests/description" - = render "projects/merge_requests/awards_block" - = render "projects/merge_requests/widget" - - if mr_action === "show" - - add_page_startup_api_call Feature.enabled?(:paginated_mr_discussions, @project) ? discussions_path(@merge_request, per_page: 20) : discussions_path(@merge_request) - - add_page_startup_api_call widget_project_json_merge_request_path(@project, @merge_request, format: :json) - - add_page_startup_api_call cached_widget_project_json_merge_request_path(@project, @merge_request, format: :json) - #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json, - endpoint_metadata: @endpoint_metadata_url, - noteable_data: serialize_issuable(@merge_request, serializer: 'noteable'), - noteable_type: 'MergeRequest', - notes_filters: UserPreference.notes_filters.to_json, - notes_filter_value: current_user&.notes_filter_for(@merge_request), - target_type: 'merge_request', - help_page_path: suggest_changes_help_path, - current_user_data: @current_user_data, - is_locked: @merge_request.discussion_locked.to_s } } - - if moved_mr_sidebar_enabled? - = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch - - = render "projects/merge_requests/tabs/pane", name: "commits", id: "commits", class: "commits" do - -# This tab is always loaded via AJAX - = render "projects/merge_requests/tabs/pane", name: "pipelines", id: "pipelines", class: "pipelines" do - - if @project.builds_enabled? - = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) - - params = request.query_parameters.merge(diff_head: true) - = render "projects/merge_requests/tabs/pane", name: "diffs", id: "js-diffs-app", class: "diffs", data: diffs_tab_pane_data(@project, @merge_request, params) - - .mr-loading-status - .loading.hide - = gl_loading_icon(size: 'lg') - -- unless moved_mr_sidebar_enabled? - = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch - -- if @merge_request.can_be_reverted?(current_user) - = render "projects/commit/change", type: 'revert', commit: @merge_request.merge_commit -- if @merge_request.can_be_cherry_picked? - = render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit - -#js-review-bar - -- if current_user && Feature.enabled?(:mr_experience_survey, current_user) - #js-mr-experience-survey{ data: { account_age: current_user.account_age_in_days } } - -= render 'projects/invite_members_modal', project: @project -= render 'shared/web_ide_path' += render 'page' |