File: _tree_file.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (19 lines) | stat: -rw-r--r-- 898 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- blob = file.blob
- external_link = blob.external_link?(@build)
- if external_link && Gitlab::CurrentSettings.enable_artifact_external_redirect_warning_page
  - path_to_file = external_file_project_job_artifacts_path(@project, @build, path: file.path)
- else
  - 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: "#{external_link}" } }
  %td.tree-item-file-name
    = tree_icon('file', blob.mode, blob.name)
    - if external_link
      = link_to path_to_file, class: 'tree-item-file-external-link js-artifact-tree-tooltip str-truncated' do
        %span>= blob.name
      = sprite_icon('external-link', css_class: 'js-artifact-tree-external-icon')
    - else
      = link_to path_to_file, class: 'str-truncated' do
        %span= blob.name
  %td
    = number_to_human_size(blob.size)