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
iv
gitlab-ce
Commits
9b49c466
Commit
9b49c466
authored
Jun 23, 2016
by
barthc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed path to link
parent
6f449848
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/views/search/results/_blob.html.haml
app/views/search/results/_blob.html.haml
+3
-3
app/views/shared/_file_highlight.html.haml
app/views/shared/_file_highlight.html.haml
+2
-2
No files found.
app/views/search/results/_blob.html.haml
View file @
9b49c466
...
...
@@ -2,10 +2,10 @@
.blob-result
.file-holder
.file-title
-
blob_
path
=
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
blob
.
ref
,
blob
.
filename
))
=
link_to
blob_
path
do
-
blob_
link
=
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
blob
.
ref
,
blob
.
filename
))
=
link_to
blob_
link
do
%i
.fa.fa-file
%strong
=
blob
.
filename
.file-content.code.term
=
render
'shared/file_highlight'
,
blob:
blob
,
first_line_number:
blob
.
startline
,
blob_
path:
blob_path
=
render
'shared/file_highlight'
,
blob:
blob
,
first_line_number:
blob
.
startline
,
blob_
link:
blob_link
app/views/shared/_file_highlight.html.haml
View file @
9b49c466
...
...
@@ -2,12 +2,12 @@
.line-numbers
-
if
blob
.
data
.
present?
-
link_icon
=
icon
(
'link'
)
-
path
=
blob_path
if
defined?
(
blob_path
)
-
link
=
blob_link
if
defined?
(
blob_link
)
-
blob
.
data
.
each_line
.
each_with_index
do
|
_
,
index
|
-
offset
=
defined?
(
first_line_number
)
?
first_line_number
:
1
-
i
=
index
+
offset
-# We're not using `link_to` because it is too slow once we get to thousands of lines.
%a
.diff-line-num
{
href:
"#{
path
}#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}
%a
.diff-line-num
{
href:
"#{
link
}#L#{i}"
,
id:
"L#{i}"
,
'data-line-number'
=>
i
}
=
link_icon
=
i
.blob-content
{
data:
{
blob_id:
blob
.
id
}}
...
...
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