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
59c3ec4e
Commit
59c3ec4e
authored
Dec 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use file-type specific file icon in blame view and diff item
parent
a3da3d8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
app/views/projects/blame/show.html.haml
app/views/projects/blame/show.html.haml
+1
-2
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+14
-6
No files found.
app/views/projects/blame/show.html.haml
View file @
59c3ec4e
...
...
@@ -6,7 +6,7 @@
#tree-holder
.tree-holder
.file-holder
.file-title
%i
.fa.fa-fil
e
=
blob_icon
@blob
.
mode
,
@blob
.
nam
e
%strong
=
@path
%small
=
number_to_human_size
@blob
.
size
...
...
@@ -43,4 +43,3 @@
-
blame_group
[
:lines
].
each
do
|
line
|
:erb
<%=
highlight
(
@blob
.
name
,
line
,
nowrap:
true
,
continue:
true
).
html_safe
%>
app/views/projects/diffs/_file.html.haml
View file @
59c3ec4e
...
...
@@ -2,19 +2,27 @@
.diff-header
{
id:
"file-path-#{hexdigest(diff_file.file_path)}"
}
-
if
diff_file
.
diff
.
submodule?
%span
=
icon
(
'archive fw'
)
-
submodule_item
=
project
.
repository
.
blob_at
(
@commit
.
id
,
diff_file
.
file_path
)
=
submodule_link
(
submodule_item
,
@commit
.
id
,
project
.
repository
)
%strong
=
submodule_link
(
submodule_item
,
@commit
.
id
,
project
.
repository
)
-
else
%span
=
blob_icon
blob
.
mode
,
blob
.
name
=
link_to
"#diff-
#{
i
}
"
do
%strong
=
diff_file
.
new_path
-
if
diff_file
.
deleted_file
=
"
#{
diff_file
.
old_path
}
deleted"
deleted
-
elsif
diff_file
.
renamed_file
=
"
#{
diff_file
.
old_path
}
renamed to
#{
diff_file
.
new_path
}
"
-
else
=
diff_file
.
new
_path
renamed from
%strong
=
diff_file
.
old
_path
-
if
diff_file
.
mode_changed?
%span
.file-mode
=
"
#{
diff_file
.
diff
.
a_mode
}
→
#{
diff_file
.
diff
.
b_mode
}
"
%small
=
"
#{
diff_file
.
diff
.
a_mode
}
→
#{
diff_file
.
diff
.
b_mode
}
"
.diff-controls
-
if
blob
.
text?
...
...
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