Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
bdbff152
Commit
bdbff152
authored
Aug 08, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate inline haml vue templates into new files.
parent
709c308e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
107 deletions
+104
-107
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+11
-107
app/views/projects/merge_requests/conflicts/_commit_stats.html.haml
...projects/merge_requests/conflicts/_commit_stats.html.haml
+20
-0
app/views/projects/merge_requests/conflicts/_inline_view.html.haml
.../projects/merge_requests/conflicts/_inline_view.html.haml
+29
-0
app/views/projects/merge_requests/conflicts/_parallel_view.html.haml
...rojects/merge_requests/conflicts/_parallel_view.html.haml
+26
-0
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
.../projects/merge_requests/conflicts/_submit_form.html.haml
+18
-0
No files found.
app/views/projects/merge_requests/conflicts.html.haml
View file @
bdbff152
-
page_title
"Merge Conflicts"
,
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
"
,
"Merge Requests"
-
class_bindings
=
"{
|
'head': line.isHead,
|
'origin': line.isOrigin,
|
'match': line.hasMatch,
|
'selected': line.isSelected,
|
'unselected': line.isUnselected }"
-
page_title
"Merge Conflicts"
,
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
"
,
"Merge Requests"
=
render
"projects/merge_requests/show/mr_title"
=
render
"projects/merge_requests/show/mr_title"
.merge-request-details.issuable-details
.merge-request-details.issuable-details
...
@@ -7,14 +13,6 @@
...
@@ -7,14 +13,6 @@
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
-
class_bindings
=
"{
|
'head': line.isHead,
|
'origin': line.isOrigin,
|
'match': line.hasMatch,
|
'selected': line.isSelected,
|
'unselected': line.isUnselected }"
#conflicts
{
"v-cloak"
=>
"true"
}
#conflicts
{
"v-cloak"
=>
"true"
}
.loading
{
"v-if"
=>
"isLoading"
}
.loading
{
"v-if"
=>
"isLoading"
}
%i
.fa.fa-spinner.fa-spin
%i
.fa.fa-spinner.fa-spin
...
@@ -22,103 +20,9 @@
...
@@ -22,103 +20,9 @@
.content-block.oneline-block
{
"v-if"
=>
"hasError"
}
.content-block.oneline-block
{
"v-if"
=>
"hasError"
}
%p
{{conflictsData.errorMessage}}
%p
{{conflictsData.errorMessage}}
.content-block.oneline-block.files-changed
{
"v-if"
=>
"!isLoading && !hasError"
}
=
render
partial:
"projects/merge_requests/conflicts/commit_stats.html.haml"
.inline-parallel-buttons
.btn-group
%a
.btn
{
|
":class"
=>
"{'active': !isParallel}"
,
|
"@click"
=>
"handleViewTypeChange('inline')"
}
Inline
%a
.btn
{
|
":class"
=>
"{'active': isParallel}"
,
|
"@click"
=>
"handleViewTypeChange('parallel')"
}
Side-by-side
.js-toggle-container
.commit-stat-summary
Showing
%strong
.cred
{{conflictsCount}} conflicts
for
%strong
{{conflictsData.source_branch}}
into
%strong
{{conflictsData.target_branch}}
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
.files
{
"v-show"
=>
"isParallel"
}
=
render
partial:
"projects/merge_requests/conflicts/parallel_view.html.haml"
,
locals:
{
class_bindings:
class_bindings
}
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
=
render
partial:
"projects/merge_requests/conflicts/inline_view.html.haml"
,
locals:
{
class_bindings:
class_bindings
}
.file-title
=
render
partial:
"projects/merge_requests/conflicts/submit_form.html.haml"
%i
.fa.fa-fw.fa
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"v-for"
=>
"line in section"
}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.line_content.header
{
":class"
=>
"#{class_bindings}"
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(line.id, line.section)"
}
{{line.buttonTitle}}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.old_line
{
":class"
=>
"#{class_bindings}"
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
"#{class_bindings}"
}
{{{line.richText}}}
.files
{
"v-show"
=>
"!isParallel"
}
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.new_line
{
":class"
=>
"#{class_bindings}"
}
%a
{{line.new_line}}
%td
.diff-line-num.old_line
{
":class"
=>
"#{class_bindings}"
}
%a
{{line.old_line}}
%td
.line_content
{
":class"
=>
"#{class_bindings}"
}
{{{line.richText}}}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.line_content.header
{
":class"
=>
"#{class_bindings}"
}
%strong
{{{line.richText}}}
%button
.btn
{
"@click"
=>
"handleSelected(line.id, line.section)"
}
{{line.buttonTitle}}
.content-block.oneline-block.files-changed
%strong
.resolved-count
{{resolvedCount}}
of
%strong
.total-count
{{conflictsCount}}
conflicts have been resolved
.commit-message-container.form-group
.max-width-marker
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
,
"v-model"
=>
"conflictsData.commitMessage"
}
{{{conflictsData.commitMessage}}}
%button
{
type:
"button"
,
class:
"btn btn-success js-submit-button"
,
":disabled"
=>
"!allResolved"
,
"@click"
=>
"commit()"
}
%span
Commit conflict resolution
%a
.fa.fa-spin.fa-spinner
{
":class"
=>
"{'hidden': !isSubmitting}"
}
/ FIXME: Hardcoded path
%a
.btn.btn-cancel
{
"href"
=>
"diffs"
}
Cancel
app/views/projects/merge_requests/conflicts/_commit_stats.html.haml
0 → 100644
View file @
bdbff152
.content-block.oneline-block.files-changed
{
"v-if"
=>
"!isLoading && !hasError"
}
.inline-parallel-buttons
.btn-group
%a
.btn
{
|
":class"
=>
"{'active': !isParallel}"
,
|
"@click"
=>
"handleViewTypeChange('inline')"
}
Inline
%a
.btn
{
|
":class"
=>
"{'active': isParallel}"
,
|
"@click"
=>
"handleViewTypeChange('parallel')"
}
Side-by-side
.js-toggle-container
.commit-stat-summary
Showing
%strong
.cred
{{conflictsCount}} conflicts
for
%strong
{{conflictsData.source_branch}}
into
%strong
{{conflictsData.target_branch}}
app/views/projects/merge_requests/conflicts/_inline_view.html.haml
0 → 100644
View file @
bdbff152
.files
{
"v-show"
=>
"!isParallel"
}
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.new_line
{
":class"
=>
"#{class_bindings}"
}
%a
{{line.new_line}}
%td
.diff-line-num.old_line
{
":class"
=>
"#{class_bindings}"
}
%a
{{line.old_line}}
%td
.line_content
{
":class"
=>
"#{class_bindings}"
}
{{{line.richText}}}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.line_content.header
{
":class"
=>
"#{class_bindings}"
}
%strong
{{{line.richText}}}
%button
.btn
{
"@click"
=>
"handleSelected(line.id, line.section)"
}
{{line.buttonTitle}}
app/views/projects/merge_requests/conflicts/_parallel_view.html.haml
0 → 100644
View file @
bdbff152
.files
{
"v-show"
=>
"isParallel"
}
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw.fa
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blobPath"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"v-for"
=>
"line in section"
}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
"#{class_bindings}"
}
%td
.line_content.header
{
":class"
=>
"#{class_bindings}"
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(line.id, line.section)"
}
{{line.buttonTitle}}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.old_line
{
":class"
=>
"#{class_bindings}"
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
"#{class_bindings}"
}
{{{line.richText}}}
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
0 → 100644
View file @
bdbff152
.content-block.oneline-block.files-changed
%strong
.resolved-count
{{resolvedCount}}
of
%strong
.total-count
{{conflictsCount}}
conflicts have been resolved
.commit-message-container.form-group
.max-width-marker
%textarea
.form-control.js-commit-message
{
":disabled"
=>
"!allResolved"
,
"v-model"
=>
"conflictsData.commitMessage"
}
{{{conflictsData.commitMessage}}}
%button
{
type:
"button"
,
class:
"btn btn-success js-submit-button"
,
":disabled"
=>
"!allResolved"
,
"@click"
=>
"commit()"
}
%span
Commit conflict resolution
%a
.fa.fa-spin.fa-spinner
{
":class"
=>
"{'hidden': !isSubmitting}"
}
/ FIXME: Hardcoded path
%a
.btn.btn-cancel
{
"href"
=>
"diffs"
}
Cancel
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment