2017-09-21 03:04:04 -04:00
|
|
|
- blob = file.blob
|
2017-10-03 06:34:24 -04:00
|
|
|
- path_to_file = file_project_job_artifacts_path(@project, @build, path: file.path)
|
2017-10-05 06:41:22 -04:00
|
|
|
- external_link = blob.external_link?(@build)
|
2016-01-18 04:18:16 -05:00
|
|
|
|
2017-10-04 15:01:27 -04:00
|
|
|
%tr.tree-item.js-artifact-tree-row{ data: { link: path_to_file, external_link: "#{external_link}" } }
|
2015-12-21 06:53:31 -05:00
|
|
|
%td.tree-item-file-name
|
2017-05-02 18:42:37 -04:00
|
|
|
= tree_icon('file', blob.mode, blob.name)
|
2017-10-04 15:01:27 -04:00
|
|
|
- if external_link
|
2017-12-04 06:00:52 -05:00
|
|
|
= link_to path_to_file, class: 'tree-item-file-external-link js-artifact-tree-tooltip str-truncated',
|
2017-10-04 12:15:31 -04:00
|
|
|
target: '_blank', rel: 'noopener noreferrer', title: _('Opens in a new window') do
|
2017-12-04 06:00:52 -05:00
|
|
|
%span>= blob.name
|
2017-10-03 01:33:13 -04:00
|
|
|
= icon('external-link', class: 'js-artifact-tree-external-icon')
|
2017-10-04 12:15:31 -04:00
|
|
|
- else
|
2017-12-04 06:00:52 -05:00
|
|
|
= link_to path_to_file, class: 'str-truncated' do
|
|
|
|
%span= blob.name
|
2016-01-04 09:07:49 -05:00
|
|
|
%td
|
2017-05-02 18:42:37 -04:00
|
|
|
= number_to_human_size(blob.size, precision: 2)
|