_blob.html.haml 1.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%ul.breadcrumb
  %li
    %i.icon-angle-right
    = link_to project_tree_path(@project, @ref) do
      = @project.path
  - tree_breadcrumbs(@tree, 6) do |title, path|
    %li
      - if path
        - if path.end_with?(@path)
          = link_to project_blob_path(@project, path) do
            %span.cblue
              = truncate(title, length: 40)
        - else
          = link_to truncate(title, length: 40), project_tree_path(@project, path)
      - else
        = link_to title, '#'

18
%ul.blob-commit-info.bs-callout.bs-callout-info.hidden-xs
19
20
21
  - blob_commit = @repository.last_commit_for_path(@commit.id, @blob.path)
  = render blob_commit, project: @project

22
%div#tree-content-holder.tree-content-holder
23
  .file-holder
24
    .file-title.clearfix
25
26
27
28
      %i.icon-file
      %span.file_name
        = blob.name
        %small= number_to_human_size blob.size
29
      %span.options.hidden-xs= render "actions"
30
31
32
33
34
35
    - if blob.text?
      = render "text", blob: blob
    - elsif blob.image?
      = render "image", blob: blob
    - else
      = render "download", blob: blob