_tree.html.haml 1.32 KB
Newer Older
1
%ul.breadcrumb
2
  %li
3
    %i.icon-angle-right
4
    = link_to project_tree_path(@project, @ref) do
5
      = @project.path
6
  - tree_breadcrumbs(tree, 6) do |title, path|
7
    \/
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8 9 10 11 12
    %li
      - if path
        = link_to truncate(title, length: 40), project_tree_path(@project, path)
      - else
        = link_to title, '#'
13

14
%div#tree-content-holder.tree-content-holder
15 16 17 18 19
  %table#tree-slider{class: "table_#{@hex_path} tree-table" }
    %thead
      %tr
        %th Name
        %th Last Update
20 21 22 23 24 25 26 27 28
        %th
          Last Commit
           
          %i.icon-angle-right
           
          %small.light
            = link_to @commit.short_id, project_commit_path(@project, @commit)
            –
            = truncate(@commit.title, length: 50)
29
        %th= link_to "history", project_commits_path(@project, @id), class: "pull-right"
Saito's avatar
Saito committed
30

31
    - if @path.present?
32 33 34 35 36 37 38
      %tr.tree-item
        %td.tree-item-file-name
          = image_tag "file_empty.png", size: '16x16'
          = link_to "..", project_tree_path(@project, up_dir_path(tree))
        %td
        %td
        %td
gitlabhq's avatar
gitlabhq committed
39

40
    = render_tree(tree)
gitlabhq's avatar
gitlabhq committed
41

42
  - if tree.readme
43
    = render "projects/tree/readme", readme: tree.readme
Saito's avatar
Saito committed
44

45 46
%div.tree_progress

47 48
:javascript
  // Load last commit log for each file in tree
49
  $('#tree-slider').waitForImages(function() {
50 51
    ajaxGet('#{@logs_path}');
  });