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
Kazuhiko Shiozaki
gitlab-ce
Commits
bf17609e
Commit
bf17609e
authored
Dec 07, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename blob helper, bump version of gitlab_git to 7.2.21.
parent
e53b350c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
Gemfile.lock
Gemfile.lock
+1
-1
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+3
-3
app/views/projects/blob/_actions.html.haml
app/views/projects/blob/_actions.html.haml
+1
-1
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+2
-2
No files found.
Gemfile.lock
View file @
bf17609e
...
...
@@ -298,7 +298,7 @@ GEM
posix-spawn (~> 0.3)
gitlab_emoji (0.2.0)
gemojione (~> 2.1)
gitlab_git (7.2.2
0
)
gitlab_git (7.2.2
1
)
activesupport (~> 4.0)
charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0)
...
...
app/helpers/blob_helper.rb
View file @
bf17609e
...
...
@@ -30,7 +30,7 @@ module BlobHelper
nil
end
if
blob
&&
blob
.
text?
&&
!
blob
.
lfs_pointer?
if
blob
_viewable?
(
blob
)
text
=
'Edit'
after
=
options
[
:after
]
||
''
from_mr
=
options
[
:from_merge_request_id
]
...
...
@@ -72,8 +72,8 @@ module BlobHelper
icon
(
"
#{
file_type_icon_class
(
'file'
,
mode
,
name
)
}
fw"
)
end
def
viewable?
(
blob
)
blob
.
text?
&&
!
blob
.
lfs_pointer?
def
blob_
viewable?
(
blob
)
blob
&&
blob
.
text?
&&
!
blob
.
lfs_pointer?
end
def
blob_size
(
blob
)
...
...
app/views/projects/blob/_actions.html.haml
View file @
bf17609e
...
...
@@ -3,7 +3,7 @@
=
link_to
'Raw'
,
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
,
target:
'_blank'
-# only show normal/blame view links for text files
-
if
viewable?
(
@blob
)
-
if
blob_
viewable?
(
@blob
)
-
if
current_page?
namespace_project_blame_path
(
@project
.
namespace
,
@project
,
@id
)
=
link_to
'Normal View'
,
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
@id
),
class:
'btn btn-sm'
...
...
app/views/projects/diffs/_file.html.haml
View file @
bf17609e
...
...
@@ -25,7 +25,7 @@
=
"
#{
diff_file
.
diff
.
a_mode
}
→
#{
diff_file
.
diff
.
b_mode
}
"
.diff-controls
-
if
viewable?
(
blob
)
-
if
blob_
viewable?
(
blob
)
=
link_to
'#'
,
class:
'js-toggle-diff-comments btn btn-sm active has_tooltip'
,
title:
"Toggle comments for this file"
do
%i
.fa.fa-comments
...
...
@@ -40,7 +40,7 @@
.diff-content.diff-wrap-lines
-# Skipp all non non-supported blobs
-
return
unless
blob
.
respond_to?
(
'text?'
)
-
if
viewable?
(
blob
)
-
if
blob_
viewable?
(
blob
)
-
if
diff_view
==
'parallel'
=
render
"projects/diffs/parallel_view"
,
diff_file:
diff_file
,
project:
project
,
blob:
blob
,
index:
i
-
else
...
...
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