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
Jérome Perrin
gitlab-ce
Commits
ff4b8cdc
Commit
ff4b8cdc
authored
Oct 04, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dry up external_link? usage
parent
decf0443
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
app/views/projects/artifacts/_tree_file.html.haml
app/views/projects/artifacts/_tree_file.html.haml
+8
-9
No files found.
app/views/projects/artifacts/_tree_file.html.haml
View file @
ff4b8cdc
-
blob
=
file
.
blob
-
is_external_link
=
blob
.
external_link?
-
path_to_file
=
file_project_job_artifacts_path
(
@project
,
@build
,
path:
file
.
path
)
%tr
.tree-item.js-artifact-tree-row
{
data:
{
link:
path_to_file
,
external_link:
"#{
is_external_link
}"
}
}
%tr
.tree-item.js-artifact-tree-row
{
data:
{
link:
path_to_file
,
external_link:
"#{
blob.external_link?
}"
}
}
%td
.tree-item-file-name
=
tree_icon
(
'file'
,
blob
.
mode
,
blob
.
name
)
=
link_to
path_to_file
,
class:
(
'tree-item-file-external-link js-artifact-tree-tooltip'
if
is_external_link
),
target:
(
'_blank'
if
is_external_link
),
rel:
(
'noopener noreferrer'
if
is_external_link
),
title:
(
_
(
'Opens in a new window'
)
if
is_external_link
)
do
%span
.str-truncated
>=
blob
.
name
-
if
is_external_link
-
if
blob
.
external_link?
=
link_to
path_to_file
,
class:
'tree-item-file-external-link js-artifact-tree-tooltip'
,
target:
'_blank'
,
rel:
'noopener noreferrer'
,
title:
_
(
'Opens in a new window'
)
do
%span
.str-truncated
>=
blob
.
name
=
icon
(
'external-link'
,
class:
'js-artifact-tree-external-icon'
)
-
else
=
link_to
path_to_file
do
%span
.str-truncated
=
blob
.
name
%td
=
number_to_human_size
(
blob
.
size
,
precision:
2
)
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