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
24fa4586
Commit
24fa4586
authored
Feb 16, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use /raw/ requests for image diffs
parent
15126fc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
app/views/projects/diffs/_image.html.haml
app/views/projects/diffs/_image.html.haml
+9
-9
No files found.
app/views/projects/diffs/_image.html.haml
View file @
24fa4586
-
diff
=
diff_file
.
diff
-
diff
=
diff_file
.
diff
-
file
.
load_all_data!
(
@project
.
repository
)
-
file_raw_path
=
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
id
,
diff
.
new_path
))
-
old_file_raw_path
=
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
parent_id
,
diff
.
old_path
))
-
if
diff
.
renamed_file
||
diff
.
new_file
||
diff
.
deleted_file
-
if
diff
.
renamed_file
||
diff
.
new_file
||
diff
.
deleted_file
.image
.image
%span
.wrap
%span
.wrap
.frame
{
class:
image_diff_class
(
diff
)}
.frame
{
class:
image_diff_class
(
diff
)}
%img
{
src:
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
src:
file_raw_path
}
%p
.image-info
=
"
#{
number_to_human_size
file
.
size
}
"
%p
.image-info
=
"
#{
number_to_human_size
file
.
size
}
"
-
else
-
else
-
old_file
.
load_all_data!
(
@project
.
repository
)
.image
.image
%div
.two-up.view
%div
.two-up.view
%span
.wrap
%span
.wrap
.frame.deleted
.frame.deleted
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
parent_id
,
diff
.
old_path
))}
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
parent_id
,
diff
.
old_path
))}
%img
{
src:
"data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"
}
%img
{
src:
old_file_raw_path
}
%p
.image-info.hide
%p
.image-info.hide
%span
.meta-filesize
=
"
#{
number_to_human_size
old_file
.
size
}
"
%span
.meta-filesize
=
"
#{
number_to_human_size
old_file
.
size
}
"
|
|
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
%span
.wrap
%span
.wrap
.frame.added
.frame.added
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
id
,
diff
.
new_path
))}
%a
{
href:
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@commit
.
id
,
diff
.
new_path
))}
%img
{
src:
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
src:
file_raw_path
}
%p
.image-info.hide
%p
.image-info.hide
%span
.meta-filesize
=
"
#{
number_to_human_size
file
.
size
}
"
%span
.meta-filesize
=
"
#{
number_to_human_size
file
.
size
}
"
|
|
...
@@ -38,10 +38,10 @@
...
@@ -38,10 +38,10 @@
%div
.swipe.view.hide
%div
.swipe.view.hide
.swipe-frame
.swipe-frame
.frame.deleted
.frame.deleted
%img
{
src:
"data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"
}
%img
{
src:
old_file_raw_path
}
.swipe-wrap
.swipe-wrap
.frame.added
.frame.added
%img
{
src:
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
src:
file_raw_path
}
%span
.swipe-bar
%span
.swipe-bar
%span
.top-handle
%span
.top-handle
%span
.bottom-handle
%span
.bottom-handle
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
%div
.onion-skin.view.hide
%div
.onion-skin.view.hide
.onion-skin-frame
.onion-skin-frame
.frame.deleted
.frame.deleted
%img
{
src:
"data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"
}
%img
{
src:
old_file_raw_path
}
.frame.added
.frame.added
%img
{
src:
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
src:
file_raw_path
}
.controls
.controls
.transparent
.transparent
.drag-track
.drag-track
...
...
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