diff options
Diffstat (limited to 'app/views/projects/merge_requests/conflicts')
6 files changed, 5 insertions, 98 deletions
diff --git a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml b/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml deleted file mode 100644 index cb1cb41eb71..00000000000 --- a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -.content-block.oneline-block.files-changed{ "v-if" => "!isLoading && !hasError" } - .inline-parallel-buttons{ "v-if" => "showDiffViewTypeSwitcher" } - .btn-group - %button.btn.gl-button{ ":class" => "{'active': !isParallel}", "@click" => "handleViewTypeChange('inline')" } - = _('Inline') - %button.btn.gl-button{ ":class" => "{'active': isParallel}", "@click" => "handleViewTypeChange('parallel')" } - = _('Side-by-side') - - .js-toggle-container - .commit-stat-summary - = _('Showing %{conflict_start}%{conflicts_text}%{strong_end} between %{ref_start}%{source_branch}%{strong_end} and %{ref_start}%{target_branch}%{strong_end}').html_safe % { conflict_start: '<strong class="cred">'.html_safe, ref_start: '<strong class="ref-name">'.html_safe, strong_end: '</strong>'.html_safe, conflicts_text: '{{conflictsCountText}}', source_branch: '{{conflictsData.sourceBranch}}', target_branch: '{{conflictsData.targetBranch}}' } diff --git a/app/views/projects/merge_requests/conflicts/_file_actions.html.haml b/app/views/projects/merge_requests/conflicts/_file_actions.html.haml deleted file mode 100644 index 220ddf1bad3..00000000000 --- a/app/views/projects/merge_requests/conflicts/_file_actions.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.file-actions.d-flex.align-items-center.gl-ml-auto.gl-align-self-start - .btn-group.gl-mr-3{ "v-if" => "file.type === 'text'" } - %button.btn.gl-button{ ":class" => "{ 'active': file.resolveMode == 'interactive' }", - '@click' => "onClickResolveModeButton(file, 'interactive')", - type: 'button' } - = _('Interactive mode') - %button.btn.gl-button{ ':class' => "{ 'active': file.resolveMode == 'edit' }", - '@click' => "onClickResolveModeButton(file, 'edit')", - type: 'button' } - = _('Edit inline') - %a.btn.gl-button.view-file{ ":href" => "file.blobPath" } - = _('View file @%{commit_sha}') % { commit_sha: '{{conflictsData.shortCommitSha}}' } diff --git a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml deleted file mode 100644 index 87356f33b1e..00000000000 --- a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- branch_name = link_to @merge_request.source_branch, project_tree_path(@merge_request.project, @merge_request.source_branch), class: "ref-name" -- translation =_('You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}') % { use_ours: '<code>Use Ours</code>', use_theirs: '<code>Use Theirs</code>', branch_name: branch_name } - -%hr -.resolve-conflicts-form - .form-group.row - .col-md-4 - %h4= _('Resolve conflicts on source branch') - .resolve-info{ "v-pre": true } - = translation.html_safe - .col-md-8 - %label.label-bold{ "for" => "commit-message" } - #{ _('Commit message') } - .commit-message-container - .max-width-marker - %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" } - .form-group.row - .offset-md-4.col-md-8 - .row - .col-6 - %button.btn.gl-button.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } - %span {{commitButtonText}} - .col-6.text-right - = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "gl-button btn btn-default" diff --git a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml b/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml deleted file mode 100644 index 4ba5ec5795a..00000000000 --- a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%diff-file-editor{ "inline-template" => "true", ":file" => "file", ":on-cancel-discard-confirmation" => "cancelDiscardConfirmation", ":on-accept-discard-confirmation" => "acceptDiscardConfirmation" } - .diff-editor-wrap{ "v-show" => "file.showEditor" } - .discard-changes-alert-wrap{ "v-if" => "file.promptDiscardConfirmation" } - .discard-changes-alert - Are you sure you want to discard your changes? - .discard-actions - %button.btn.btn-sm.btn-danger-secondary.gl-button{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes - %button.btn.btn-default.btn-sm.gl-button{ "@click" => "cancelDiscardConfirmation(file)" } Cancel - .editor-wrap{ ":class" => "classObject" } - .editor{ "style" => "height: 350px", data: { 'editor-loading': true } } diff --git a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml b/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml deleted file mode 100644 index 7bd5c437942..00000000000 --- a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%inline-conflict-lines{ "inline-template" => "true", ":file" => "file" } - %table.diff-wrap-lines.code.code-commit.js-syntax-highlight - %tr.line_holder.diff-inline{ "v-for" => "line in file.inlineLines" } - %td.diff-line-num.new_line{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader" } - %a {{line.new_line}} - %td.diff-line-num.old_line{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader" } - %a {{line.old_line}} - %td.line_content{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader", "v-html" => "line.richText" } - %td.diff-line-num.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %td.diff-line-num.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %td.line_content.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %strong{ "v-html" => "line.richText" } - %button.btn{ "@click" => "handleSelected(file, line.id, line.section)" } - {{line.buttonTitle}} diff --git a/app/views/projects/merge_requests/conflicts/show.html.haml b/app/views/projects/merge_requests/conflicts/show.html.haml index 827df540629..e02f126d165 100644 --- a/app/views/projects/merge_requests/conflicts/show.html.haml +++ b/app/views/projects/merge_requests/conflicts/show.html.haml @@ -1,5 +1,6 @@ - page_title _("Merge Conflicts"), "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge Requests") - add_page_specific_style 'page_bundles/merge_conflicts' + = render "projects/merge_requests/mr_title" .merge-request-details.issuable-details @@ -7,30 +8,7 @@ = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, source_branch: @merge_request.source_branch -#conflicts{ "v-cloak" => "true", data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json), - resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request) } } - .loading{ "v-if" => "isLoading" } - .spinner.spinner-md - - .nothing-here-block{ "v-if" => "hasError" } - {{conflictsData.errorMessage}} - - = render partial: "projects/merge_requests/conflicts/commit_stats" - - .files-wrapper{ "v-if" => "!isLoading && !hasError" } - .files - .diff-file.file-holder.conflict{ "v-for" => "file in conflictsData.files" } - .js-file-title.file-title.file-title-flex-parent.cursor-default - .file-header-content - %file-icon{ ':file-name': 'file.filePath', ':size': '18', 'css-classes': 'gl-mr-2' } - %strong.file-title-name {{file.filePath}} - = render partial: 'projects/merge_requests/conflicts/file_actions' - .diff-content.diff-wrap-lines - .file-content{ "v-show" => "!isParallel && file.resolveMode === 'interactive' && file.type === 'text'" } - = render partial: "projects/merge_requests/conflicts/components/inline_conflict_lines" - .file-content{ "v-show" => "isParallel && file.resolveMode === 'interactive' && file.type === 'text'" } - %parallel-conflict-lines{ ":file" => "file" } - %div{ "v-show" => "file.resolveMode === 'edit' || file.type === 'text-editor'" } - = render partial: "projects/merge_requests/conflicts/components/diff_file_editor" - - = render partial: "projects/merge_requests/conflicts/submit_form" +#conflicts{ data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json), + resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request), + source_branch_path: project_tree_path(@merge_request.project, @merge_request.source_branch), + merge_request_path: project_merge_request_path(@merge_request.project, @merge_request) } } |