GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

_blob.html.haml 1.41 KB
Newer Older
1
.nav-block
2 3 4 5
  .tree-ref-holder
    = render 'shared/ref_switcher', destination: 'blob', path: @path

  %ul.breadcrumb.repo-breadcrumb
6
    %li
7 8 9 10 11 12 13 14 15 16 17
      = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
        = @project.path
    - tree_breadcrumbs(@tree, 6) do |title, path|
      %li
        - if path
          - if path.end_with?(@path)
            = link_to namespace_project_blob_path(@project.namespace, @project, path) do
              %strong
                = truncate(title, length: 40)
          - else
            = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path)
18
        - else
19
          = link_to title, '#'
20

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
%ul.blob-commit-info.hidden-xs
22
  - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path)
23 24
  = render blob_commit, project: @project

25
%div#blob-content-holder.blob-content-holder
26
  %article.file-holder
27
    .file-title
28
      = blob_icon blob.mode, blob.name
29
      %strong
30
        = blob.name
31
      %small
32
        = number_to_human_size(blob_size(blob))
33 34
      .file-actions.hidden-xs
        = render "actions"
35 36 37
    - if blob.lfs_pointer?
      = render "download", blob: blob
    - elsif blob.text?
Stan Hu's avatar
Stan Hu committed
38 39 40 41
      - if blob_svg?(blob)
        = render "image", blob: sanitize_svg(blob)
      - else
        = render "text", blob: blob
42 43 44 45
    - elsif blob.image?
      = render "image", blob: blob
    - else
      = render "download", blob: blob