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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
912cc7b8
Commit
912cc7b8
authored
Aug 03, 2016
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add file icon and blob link.
parent
ad0b5ffb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
app/assets/javascripts/merge_conflict_data_provider.js.es6
app/assets/javascripts/merge_conflict_data_provider.js.es6
+7
-3
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+6
-4
No files found.
app/assets/javascripts/merge_conflict_data_provider.js.es6
View file @
912cc7b8
...
...
@@ -52,7 +52,9 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setParallelLines(data) {
data.files.forEach( (file) => {
file.filePath = this.getFilePath(file);
file.filePath = this.getFilePath(file);
file.iconClass = `fa-${file.blob_icon}`;
file.blobPath = file.blob_path;
file.parallelLines = [];
const linesObj = { left: [], right: [] };
...
...
@@ -120,8 +122,10 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
setInlineLines(data) {
data.files.forEach( (file) => {
file.iconClass = `fa-${file.blob_icon}`;
file.blobPath = file.blob_path;
file.filePath = this.getFilePath(file);
file.inlineLines = []
file.filePath = this.getFilePath(file);
file.sections.forEach( (section) => {
let currentLineType = 'new';
...
...
@@ -309,7 +313,7 @@ window.MergeConflictDataProvider = class MergeConflictDataProvider {
getFilePath(file) {
const { old_path, new_path } = file;
return old_path === new_path ? new_path : `${old_path}
→
${new_path}`;
return old_path === new_path ? new_path : `${old_path}
→
${new_path}`;
}
}
app/views/projects/merge_requests/conflicts.html.haml
View file @
912cc7b8
...
...
@@ -39,9 +39,10 @@
.files
{
"v-if"
=>
"isParallel"
}
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%span
{{{file.filePath}}}
%i
.fa.fa-fw.fa
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blob
Link
"
}
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blob
Path
"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight.white
...
...
@@ -82,9 +83,10 @@
.files
{
"v-if"
=>
"!isParallel"
}
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%span
{{{file.filePath}}}
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
.file-actions
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blob
Link
"
}
%a
.btn.view-file.btn-file-option
{
":href"
=>
"file.blob
Path
"
}
View file @{{conflictsData.shortCommitSha}}
.diff-content.diff-wrap-lines
...
...
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