2018-03-17 18:26:18 +05:30
|
|
|
- blob = file.blob
|
2017-09-10 17:25:29 +05:30
|
|
|
- path_to_file = file_project_job_artifacts_path(@project, @build, path: file.path)
|
2018-03-17 18:26:18 +05:30
|
|
|
- external_link = blob.external_link?(@build)
|
2016-01-29 22:53:50 +05:30
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
%tr.tree-item.js-artifact-tree-row{ data: { link: path_to_file, external_link: "#{external_link}" } }
|
2016-01-19 16:12:03 +05:30
|
|
|
%td.tree-item-file-name
|
2017-08-17 22:00:37 +05:30
|
|
|
= tree_icon('file', blob.mode, blob.name)
|
2018-03-17 18:26:18 +05:30
|
|
|
- if external_link
|
|
|
|
= link_to path_to_file, class: 'tree-item-file-external-link js-artifact-tree-tooltip str-truncated',
|
|
|
|
target: '_blank', rel: 'noopener noreferrer', title: _('Opens in a new window') do
|
|
|
|
%span>= blob.name
|
2021-01-29 00:20:46 +05:30
|
|
|
= sprite_icon('external-link', css_class: 'js-artifact-tree-external-icon')
|
2018-03-17 18:26:18 +05:30
|
|
|
- else
|
|
|
|
= link_to path_to_file, class: 'str-truncated' do
|
|
|
|
%span= blob.name
|
2016-01-19 16:12:03 +05:30
|
|
|
%td
|
2019-03-02 22:35:43 +05:30
|
|
|
= number_to_human_size(blob.size)
|