gitlabhq/app/views/tree/_tree.html.haml

44 lines
1 KiB
Plaintext
Raw Normal View History

2012-01-26 23:13:19 +01:00
%ul.breadcrumb
2012-01-29 20:30:03 +01:00
%li
%span.arrow
= link_to project_tree_path(@project, @ref) do
= @project.name
2012-01-26 23:13:19 +01:00
- tree.breadcrumbs(6) do |link|
\/
%li= link
2011-11-01 21:11:24 +01:00
.clear
2012-01-29 20:30:03 +01:00
%div.tree_progress
2012-10-02 09:26:24 +02:00
%div#tree-content-holder.tree-content-holder
2011-11-20 21:32:12 +01:00
- if tree.is_blob?
2012-10-15 20:51:03 +02:00
= render "tree/blob", blob: tree
2011-10-08 23:36:38 +02:00
- else
2012-10-02 09:26:24 +02:00
%table#tree-slider{class: "table_#{@hex_path} tree-table" }
2011-11-01 21:11:24 +01:00
%thead
2011-10-08 23:36:38 +02:00
%th Name
%th Last Update
%th
Last commit
= link_to "History", tree.history_path, class: "right"
2011-12-12 17:42:07 +01:00
2011-11-20 21:32:12 +01:00
- if tree.up_dir?
%tr.tree-item
2011-10-08 23:36:38 +02:00
%td.tree-item-file-name
= image_tag "file_empty.png", size: '16x16'
= link_to "..", tree.up_dir_path
%td
%td
2011-10-08 23:36:38 +02:00
= render_tree(tree.contents)
2011-10-08 23:36:38 +02:00
2012-10-15 20:51:03 +02:00
- if readme = tree.contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
= render "tree/readme", readme: readme
2011-12-12 17:42:07 +01:00
- unless tree.is_blob?
:javascript
// Load last commit log for each file in tree
$(window).load(function(){
ajaxGet('#{@logs_path}');
});