summaryrefslogtreecommitdiff
path: root/app/views/projects/artifacts/_tree_file.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/artifacts/_tree_file.html.haml')
-rw-r--r--app/views/projects/artifacts/_tree_file.html.haml5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml
index 49dfe2d7c16..473b9debb3a 100644
--- a/app/views/projects/artifacts/_tree_file.html.haml
+++ b/app/views/projects/artifacts/_tree_file.html.haml
@@ -1,10 +1,11 @@
- blob = file.blob
- path_to_file = file_project_job_artifacts_path(@project, @build, path: file.path)
+- external_link = blob.external_link? && @project.public?
-%tr.tree-item.js-artifact-tree-row{ data: { link: path_to_file, external_link: "#{blob.external_link?}" } }
+%tr.tree-item.js-artifact-tree-row{ data: { link: path_to_file, external_link: "#{external_link}" } }
%td.tree-item-file-name
= tree_icon('file', blob.mode, blob.name)
- - if blob.external_link?
+ - if 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