2012-01-26 22:13:19 +00:00
|
|
|
%ul.breadcrumb
|
2012-01-29 19:30:03 +00:00
|
|
|
%li
|
2012-02-27 22:00:19 +00:00
|
|
|
%span.arrow
|
2012-09-17 16:39:57 +00:00
|
|
|
= link_to project_tree_path(@project, @ref), remote: true do
|
2012-02-27 22:00:19 +00:00
|
|
|
= @project.name
|
2012-01-26 22:13:19 +00:00
|
|
|
- tree.breadcrumbs(6) do |link|
|
|
|
|
\/
|
|
|
|
%li= link
|
2012-10-03 22:28:50 +00:00
|
|
|
|
2011-11-01 20:11:24 +00:00
|
|
|
.clear
|
2012-01-29 19:30:03 +00:00
|
|
|
%div.tree_progress
|
2012-10-03 22:28:50 +00:00
|
|
|
|
2012-10-02 07:26:24 +00:00
|
|
|
%div#tree-content-holder.tree-content-holder
|
2011-11-20 20:32:12 +00:00
|
|
|
- if tree.is_blob?
|
2012-10-03 22:28:50 +00:00
|
|
|
= render partial: "tree/tree_file", object: tree
|
2011-10-08 21:36:38 +00:00
|
|
|
- else
|
2012-10-02 07:26:24 +00:00
|
|
|
%table#tree-slider{class: "table_#{@hex_path} tree-table" }
|
2011-11-01 20:11:24 +00:00
|
|
|
%thead
|
2011-10-08 21:36:38 +00:00
|
|
|
%th Name
|
|
|
|
%th Last Update
|
|
|
|
%th
|
|
|
|
Last commit
|
2012-08-10 22:07:50 +00:00
|
|
|
= link_to "History", tree.history_path, class: "right"
|
2011-12-12 16:42:07 +00:00
|
|
|
|
2011-11-20 20:32:12 +00:00
|
|
|
- if tree.up_dir?
|
2012-10-03 22:40:56 +00:00
|
|
|
%tr.tree-item
|
2011-10-08 21:36:38 +00:00
|
|
|
%td.tree-item-file-name
|
2012-10-03 22:40:56 +00:00
|
|
|
= image_tag "file_empty.png", size: '16x16'
|
|
|
|
= link_to "..", tree.up_dir_path, remote: true
|
2011-10-23 07:17:57 +00:00
|
|
|
%td
|
|
|
|
%td
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2012-10-03 22:40:56 +00:00
|
|
|
= render_tree(tree.contents)
|
2011-10-08 21:36:38 +00:00
|
|
|
|
2012-10-03 22:40:56 +00:00
|
|
|
- if content = tree.contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
|
2012-07-10 17:15:33 +00:00
|
|
|
.file_holder#README
|
|
|
|
.file_title
|
|
|
|
%i.icon-file
|
|
|
|
= content.name
|
|
|
|
.file_content.wiki
|
2012-09-20 10:00:18 +00:00
|
|
|
- if gitlab_markdown?(content.name)
|
|
|
|
= preserve do
|
|
|
|
= markdown(content.data)
|
|
|
|
- else
|
|
|
|
= raw GitHub::Markup.render(content.name, content.data)
|
2011-12-12 16:42:07 +00:00
|
|
|
|
2011-10-08 21:36:38 +00:00
|
|
|
:javascript
|
|
|
|
$(function(){
|
2012-07-10 19:52:38 +00:00
|
|
|
history.pushState({ path: this.path }, '', "#{@history_path}");
|
|
|
|
});
|
|
|
|
|
2012-09-11 12:35:16 +00:00
|
|
|
- unless tree.is_blob?
|
|
|
|
:javascript
|
|
|
|
// Load last commit log for each file in tree
|
|
|
|
$(window).load(function(){
|
|
|
|
ajaxGet('#{@logs_path}');
|
|
|
|
});
|
2012-01-29 19:30:03 +00:00
|
|
|
|
2012-09-27 16:38:52 +00:00
|
|
|
- if @path.present? && request.xhr?
|
2011-12-20 06:49:14 +00:00
|
|
|
:javascript
|
|
|
|
$(window).unbind('popstate');
|
|
|
|
$(window).bind('popstate', function() {
|
|
|
|
if(location.pathname.search("tree") != -1) {
|
|
|
|
$.ajax({type: "GET", url: location.pathname, dataType: "script"})}
|
|
|
|
else { location.href = location.pathname;}});
|