debian-mirror-gitlab/app/views/projects/artifacts/_tree_file.html.haml

18 lines
781 B
Text
Raw Normal View History

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}" } }
%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
= icon('external-link', class: 'js-artifact-tree-external-icon')
- else
= link_to path_to_file, class: 'str-truncated' do
%span= blob.name
%td
2019-03-02 22:35:43 +05:30
= number_to_human_size(blob.size)